lcdETH balance accrual
Creating a bond involves calling a function called createBond()
with a minimum amount of ETH which then mints an NFT to the caller which denotes their bond data.
struct BondData {
uint256 ethAmount; // in wei amount
uint256 claimedLcdETHAmount; // in wei amount
uint64 startTime;
uint64 endTime; // timestamp of bondIn/bondOut event
BondStatus status;
}
The bond accrues lcdETH
according to a bonding curve which looks like this -
The accrual curve is asymptotic, i.e., it approaches but never exceeds a certain capped value.
The equation for accrued lcdLUSD
accrual is given by -
\[ accruedLcdETH = \frac{bondAmount}{redemptionPrice} \cdot \frac{t}{t + \alpha} \]
α
parametrizes the slope of the curve and could be automatically adjusted by the protocol in order to control the speed of the value accrual which depends on the evolving price premiumt
denotes time
Since the rate of lcdETH accrual is the change in accrued lcdETH per unit time, if everything else remains constant -
- Larger bonds accrue lcdETH faster than smaller bonds
- Younger bonds accrue lcdETH faster than older bonds
lcdETH accrual cap
The lcdETH cap is an upper bound on the amount of lcdETH that the bond can accrue, based on the accrual curve mentioned above.
The lcdETH cap is calculated by the following formula:
\[ cap = \frac{bondAmount}{redemptionPrice} \]