Exchange Rate
Exchange Rate of milkINIT and INIT
In the MilkyWay protocol, it is important to maintain an accurate milkINIT: INIT exchange rate. Exchange rate is based on the following formula:
TotalNativeToken = Staked INIT + accrued staking rewards. TotalLiquidStakedToken = milkINIT minted
It will initially start at a 1:1 ratio and will be dynamically updated based on the accrued staking rewards. To understand how this works, let’s consider an example:
Alice is MilkyWay’s first user and she stakes 100 INIT, she then receives 100 milkINIT in return.
Let’s assume that time has passed and 10 rewards were accrued. Now, the new exchange rate would be:
If Alice decides to withdraw her INIT, she receives 110 INIT for 100 milkINIT based on the new exchange rate.
Please note that this is an illustrative example of how the exchange rate works and did not account for the validator’s commission and the MilkyWay DAO fee.
How do we update the exchange rate?
During the delegation process, the deposited INIT is transferred to Initia to stake on behalf of the MilkyWay users. Once it is staked, Initia protocol begins to accrue staking rewards every block. To update the exchange rate on the staking contract on our Initia L2, it's the responsibility of operators to regularly claim rewards and send them back to the staking contract, thereby updating the exchange rate. In MilkyWay, it leverages the authz module to grant limited authorization to withdraw staking rewards to the grantee account from the staker multisig account and the grantee account has limited authorization to IBC transfer from the rewards collector multisig account.
Here’s a step-by-step breakdown of what happens in the background:
IBC transfer the withdrawn staking rewards to the staking contract on Initia
Upon the staking rewards arriving on Initia, the staking contract updates the exchange rate. This increases the value of
milkINIT
over time.
Last updated