Bonding Curve
The bonding curve governs the price dynamics of Wavefront tokens. It enforces strict supply control policy and ensures that whenever Wavefront tokens are minted, they are backed by liquidity.
Each token issued via Wavefront has a built-in virtual bonding curve, functioning as a constant function market maker (CFMM) with two reserves: a base token (e.g., ETH) and the issued token (Wavefront Token or WFT). The bonding curve dynamically adjusts to market demand, determining the market price of WFTs. This ensures that the market price of WFT remains above or equal to the floor price, providing ample liquidity and promoting price discovery. The virtual bonding curve uses the xy=k invariant.
Key Features
Single-Sided Liquidity: Allows liquidity provision for WFTs without the risk of impermanent loss, leading to deeper liquidity pools and better price stability.
Credit: Enables borrowing against WFT without risk of liquidation, no duration, no interest, and no oracle, creating a risk-free borrowing mechanism.
Demand-Based Reserve Shifts: Every buy and sell increases the floor and market price, enhancing liquidity and credit.
Initial State
The virtual bonding curve negates the necessity for upfront capital, offering deep liquidity and minimal slippage for WFTs from inception, without relying on external liquidity incentives. Initially, the entire WFT supply is minted into the bonding curve reserves, balanced by a quantity of virtual ETH for accounting purposes. The circulating WFT supply starts at zero.
Pricing and Transactions
WFT pricing within the bonding curve varies from the floor price to a theoretical maximum of infinity. Users can buy or sell WFT at the current market price from these reserves. Buying WFT from the market reserves brings them into circulation, while selling WFT to the market reserves removes them from circulation.
Example
To better understand the bonding curve's functionality, let's consider a scenario that begins with an empty bonding curve, undergoes some operations, and then winds down to empty again. This example will illustrate how the bonding curve works and demonstrate how 1 WFT is always backed liquidity. For the sake of simplicity we will ignore fees and reserve shifts.
Initial State: The bonding curve has 0 circulating WFT and 0 ETH backing it. Reserve equation is set to (100 virtual ETH) * (100 WFT) = 10,000.
Buy WFT: A user spends 33.33 ETH to purchase WFT from the bonding curve. The calculation is as follows: (100 virtETH + 33.33 ETH)(100 WFT - y WFT) = 10,000 -> y = 25 WFT
This example illustrates how the bonding curve achieves single-sided liquidity without any upfront liquidity provision. WFT itself serves as the "LP". Note that there are now 25 WFT in circulation, backed by 33.33 ETH of liquidity.
Buy WFT: A user spends 66.67 ETH to purchase WFT from the bonding curve. The calculation is as follows: (100 virtETH + 33.33 ETH + 66.67 ETH)(75 WFT - y WFT) = 10,000 -> y = 25 WFT
Sell WFT: A user now sells 25 WFT back to the bonding curve. The calculation is as follows: (100 virtETH + 100 ETH - x ETH)(50 WFT + 25 WFT) = 10,000 -> x = 66.67 ETH.
Sell WFT: A user now sells 25 WFT back to the bonding curve. The calculation is as follows: (100 virtETH + 33.33 ETH - x ETH)(75 WFT + 25 WFT) = 10,000 -> x = 33.33 ETH.
With the system winded down completely, there is no longer any WFT in circulation and no need for ETH in the bonding curve to back it. However, the bonding curve still functions as needed, with WFT available for purchase from the reserves.
Single-Sided Liquidity
When purchasing WFT, the transaction involves inputting ETH and in return, receiving WFT. Consequently, holders maintain just the WFT, subjecting them exclusively to WFT's market variations in relation to ETH. This concept mirrors a single-sided liquidity position. Swap fees go to WFT holders by shifting the bonding curve to increase the floor and market price, also increasing borrowing power.
Credit
The bonding curve's ensured floor price allows WFT holders to borrow ETH risk-free, as the value of WFT will never fall below the floor price. This eliminates the need for liquidation measures or oracles. Essentially, holders borrow their exit liquidity, making the last WFT always redeemable at the floor price. Some key distinctions include:
No liquidation
No duration
No interest or fees
No Oracles
No deposits (WFT does not leave wallet, borrow directly)
Demand-Based Reserve Shifts
Reserve shifts happen when ever circulating WFT is burnt or external ETH is put into the bonding curve. This happens internally on buys and sells, but can also happen externally. Every swap on the bonding curve will push the floor and market price of a WFT up and when demand is low (small amount of WFT circulating) the increase in floor and market price is more aggressive. As the floor price shifts up the borrowing power of WFT also increases so you can see that instead of distributing swap fees as reward tokens to WFT holders the bonding curve increases their value and borrowing power.
When circulating WFT is burnt, the bonding curve adjusts to ensure all circulating WFT can be sold to retrieve the real ETH in reserves. This induces a secondary burn on reserve WFT, shifting the floor and market price upwards. If WFT is burnt outside of swap fees a burn function can be called to induce the shift as needed.
When external ETH is injected in the bonding curve (say from swap fees) the bonding curve also shifts but this time the virtual ETH reserves are shifted. So injecting ETH will both increase the real ETH reserves and induce a secondary shift on the virtual ETH reserves. This is done to ensure that all circulating WFT can be sold to pull out all the real ETH in the reserves. If a token were to have revenue outside of swap fees a donate function can be called to induce this shift as needed.
Last updated