A bonding curve is a financial instrument proposed by Simon de la Rouviere in his Medium articles. ETH is bonded in a smart contract to mint tokens, and unbonded to burn them. Every bonding and unbonding changes the price of the token according to a predefined formula. The “curves” represent the relationship between the price of a single token and the token supply. The result is an ETH-backed token that rewards early adopters.

An example supply versus price graph. The area below the curve is equal to the amount of ETH EE that must be spent to increase the supply from S0S_0 to S1S_1, or that is going to be received when S1S0S_1-S_0 tokens are unbonded.

Inside a transaction, the price paid/received per token is not constant and depends on the amount that is bonded or unbonded. This complicates the calculations.

Let’s say for an initial supply of S0S_0, we want to bond TT tokens which are added to the new supply S1=S0+TS_1=S_0+T. The ETH EE that must be spent for this bonding is defined as

E=S0S1PdSE = \int_{S_0}^{S_1} P\, dS

which is illustrated in the figure above. If one wanted to unbond TT tokens, the upper limit for the integral would be S0S_0 and the lower S0TS_0-T, with E corresponding to the amount of ETH received for the unbonding.

Linear Curves

A linear relationship for the bonding curves are defined as

P(S)=P0+SIpP(S) = P_0 + S I_p

where P0P_0 is the initial price of the token and IpI_p is the price increment per token.

Bonding Tokens

Let us have EE ETH which we want to bond tokens with. Substituting PP into the integral above with the limits S0S0+TS_0\to S_0+T, we obtain EE in terms of the tokens TT that we want to bond:

E(S,T)=TP0+TIpS+12T2IpE(S, T) = T P_0 + T I_p S + \frac{1}{2} T^2 I_p

where SS is the supply before the bonding. Solving this for TT, we obtain the tokens received in a bonding as a function of the supply and ETH spent:

T(S,E)=S2Ip2+2EIp+2SP0Ip+P02P0IpS.\boxed{T(S, E) = \frac{\sqrt{S^2I_p^2 + 2E I_p + 2 S P_0 I_p + P_0^2}-P_0}{I_p} - S.}

Unbonding Tokens

Let us have T tokens which we want to unbond for ETH. Unbonding TT tokens decreases the supply from S0S_0 to S0TS_0-T, which we apply as limits for the above integral and obtain:

E(S,T)=TP0+TIpS12T2Ip.\boxed{E(S, T) = T P_0 + T I_p S - \frac{1}{2} T^2 I_p.}

Breaking Even in PoWH3D

PoWH3D is one of the applications of bonding curves with a twist: 1/10th of every transaction is distributed among token holders as dividends. When you bond tokens with EE ETH, you receive 9/10E9/10 E worth of tokens and 1/10E1/10 E is distributed to everybody else in proportion to the amount they hold.

This means you are at a loss when you bond P3D (the token used by PoWH3D). If you were to unbond immediately, you would only receive 81% of your money. Given the situation, one wonders when exactly one can break even with their investment. The activity in PoWH3D isn’t deterministic; nonetheless we can deduce sufficient but not necessary conditions for breaking even in PoWH3D.

Sufficient Bonding

Let us spend E1E_1 ETH to bond tokens at supply S0S_0. The following calculations are done with the assumption that the tokens received

T1=T(S0,9E1/10)T_1 = T(S_0, 9E_1/10)

are small enough to be neglected, that is T1S0T_1 \ll S_0 and S1S0S_1 \approx S_0. In other words, this only holds for non-whale bondings.

Then let others spend E2E_2 ETH to bond tokens and raise the supply to S2S_2. The objective is to find an E2E_2 large enough to earn us dividends and make us break even when we unbond our tokens at S2S_2. We have

S2=S0+T(S0,E2).S_2 = S_0 + T(S_0, E_2).

Our new share of the P3D pool is T1/S2T_1/S_2 and the dividends we earn from the bonding is equal to

110T1S2E2.\frac{1}{10}\frac{T_1}{S_2}E_2.

Then the condition for breaking even is

910E(S2,T1)+110T1S2E2E1.\boxed{\frac{9}{10} E(S_2, T_1) + \frac{1}{10}\frac{T_1}{S_2}E_2 \geq E_1.}

This inequality has a lengthy analytic solution which is impractical to typeset. The definition should be enough:

E2suff(S0,E1):=solve for E_2{910E(S2,T1)+110T1S2E2=E1}E^{\text{suff}}_2(S_0, E_1) := \text{solve for E_2E\_2}\left\{\frac{9}{10} E(S_2, T_1) + \frac{1}{10}\frac{T_1}{S_2}E_2 = E_1\right\}

and

E2E2suff.E_2 \geq E^{\text{suff}}_2.

E2suffE^{\text{suff}}_2 can be obtained from the source of this page in JavaScript from the function sufficient_bonding. The function involves many power and square operations and may yield inexact results for too high values of S0S_0 or too small values off E1E_1, due to insufficient precision of the underlying math functions. For this reason, the calculator is disabled for sensitive input.

S0S_0 versus E2suffE^{\text{suff}}_2 for E1=100E_1 = 100.

The relationship between the initial supply and sufficient bonding is roughly quadratic, as seen from the graph above. This means that the difficulty of breaking even increases quadratically as more people bond into P3D. As interest in PoWH3D saturates, dividends received from the supply increase decreases quadratically.

Logarithmic plot of S0S_0 versus E2suffE^{\text{suff}}_2 for changing values of E1E_1.

The relationship is not exactly quadratic, as seen from the graph above. The function is sensitive to E1E_1 for small values of S0S_0.

Sufficient Unbonding

Let us spend E1E_1 ETH to bond tokens at supply S0S_0 and receive T1T_1 tokens.

Then let others unbond T2T_2 P3D to lower the supply to S2S_2. The objective is to find a T2T_2 large enough to earn us dividends and make us break even when we unbond our tokens at S2S_2. We have

S2=S0T2.S_2 = S_0 - T_2.

Our new share of the P3D pool is T1/S2T_1/S_2 and the dividends we earn from the bonding is equal to

110T1S2E(S2,T2)\frac{1}{10}\frac{T_1}{S_2} E(S_2, T_2)

Then the condition for breaking even is

910E(S2,T1)+110T1S2E(S2,T2)E1.\boxed{\frac{9}{10} E(S_2, T_1) + \frac{1}{10}\frac{T_1}{S_2} E(S_2, T_2) \geq E_1.}

Similar to the previous section, we have

T2suff(S0,E1):=solve for T_2{910E(S2,T1)+110T1S2E(S2,T2)=E1}T^{\text{suff}}_2(S_0, E_1) := \text{solve for T_2T\_2}\left\{\frac{9}{10} E(S_2, T_1) + \frac{1}{10}\frac{T_1}{S_2} E(S_2, T_2) = E_1\right\}

and

T2T2suff.T_2 \geq T^{\text{suff}}_2.

T2suffT^{\text{suff}}_2 can be obtained from the function sufficient_unbonding.

S0S_0 versus T2suffT^{\text{suff}}_2 for E1=100E_1 = 100.

The relationship between S0S_0 and T2suffT^{\text{suff}}_2 is linear and insensitive to E1E_1. Regardless of the ETH you invest, the amount of tokens that need to be unbonded to guarantee your break-even is roughly the same, depending on your entry point.

Calculator

Below is a calculator you can input S0S_0 and E1E_1 to calculate E2suffE^{\text{suff}}_2 and T2suffT^{\text{suff}}_2.

S0S_0
E1E_1
E2suffE^{\text{suff}}_2
T2suffT^{\text{suff}}_2

For the default values above, we read this as:

For 100 ETH worth of P3D bonded at 3,500,000 supply, either a bonding of ~31715 ETH or an unbonding of ~3336785 P3D made by other people is sufficient to break even.

In order to follow these statistics, you can follow this site.

Conclusion

Bonding curve calculations can get complicated because the price paid per token depends on the amount of intended bonding/unbonding. With this work, I aimed to clarify the logic behind PoWH3D. Use the formulation and calculator at your own risk.

The above conditions are only sufficient and not necessary to break even. As PoWH3D becomes more popular, it gets quadratically more difficult to break even from a supply increase. PoWH3D itself doesn’t generate any value or promise long-term returns for its holders. However every bond, unbond and transfer deliver dividends. According to its creators, P3D is intended to become the base token for a number of games that will be built upon PoWH3D, like FOMO3D.