MilkyWay Docs
  • INTRODUCTION
    • Welcome to MilkyWay
    • Mission and Vision
    • MILK
      • Tokenomics
    • Whitepaper (PDF)
  • User Guides
    • For Liquid Stakers
      • Quick Start
      • For Celestia (milkTIA)
        • Technical Architecture
          • Liquid Staking Process
          • Withdrawal Process
          • Exchange Rate
          • Compound Staking Rewards
          • Claim Process
          • Limits and Restrictions
        • Integrating with milkTIA
          • Contract Specifications
          • APIs specification
        • Using third party apps
          • Camelot
          • Demex
          • Dymension
          • Levana
          • Margined
          • Mars
          • Osmosis
          • UX
      • For Initia (milkINIT)
        • Technical Architecture
          • Liquid Staking Process
          • Withdrawal Process
          • Exchange Rate
          • Compound Staking Rewards
          • Claim Process
          • Limits and Restrictions
        • Integrating with milkINIT
          • Liquid staking module specifications
          • Chains specifications
      • For Bablyon (milkBABY)
        • Technical Architecture
          • Liquid Staking Process
          • Withdrawal Process
          • Exchange Rate
          • Compound Staking Rewards
          • Claim Process
          • Limits and Restrictions
        • User Flow
        • One-Click Stake
        • Integrating with milkBABY
          • Liquid staking module specifications
          • Chains specifications
    • For Restakers
      • Quick Start
      • For Restakers
        • Creating a wallet
        • Restaking your assets
    • Bridging
      • Hyperlane
      • IBC Eureka
  • Infrastructure Operators
    • For MilkyWay Validators
      • Quick Start
      • For Validators
        • Consesus node
        • Validator node
    • For Service Operators
      • Quick Start
      • For Operators
        • Operator Management
        • Opt-in and Opt-out Services
  • For Service Developers
    • Quick Start
    • For Services Admins
      • Service Management
      • Inviting Operators to Join Your Service
      • Creating Rewards Distribution Plan
  • Architecture
    • Modular Liquid Staking
      • Overview
      • Liquid Staking 101
    • Modular Restaking
      • Overview
        • Technical Architecture
        • Design Philosophy
        • Programmable Rules
        • Economic Model
        • Use Cases
      • Restaking 101
  • Modules
    • x/assets
    • x/ibc-hooks
    • x/liquidvesting
    • x/operators
    • x/pools
    • x/restaking
    • x/rewards
    • x/services
    • x/tokenfactory
  • SECURITY
    • Audits
    • Bug Bounty Program
  • APPENDIX
    • Official Links
    • Frequently Asked Questions
    • Glossary
    • Branding Resources
Powered by GitBook
On this page
  • Exchange Rate of milkTIA and TIA
  • How do we update the exchange rate?
  1. User Guides
  2. For Liquid Stakers
  3. For Celestia (milkTIA)
  4. Technical Architecture

Exchange Rate

Exchange Rate of milkTIA and TIA

In the MilkyWay protocol, it is important to maintain an accurate milkTIA: TIA exchange rate. Exchange rate is based on the following formula:

ExchangeRate=TotalLiquidStakedTokenTotalNativeToken+TotalRewardsExchangeRate = \frac {TotalLiquidStakedToken}{Total NativeToken + TotalRewards}ExchangeRate=TotalNativeToken+TotalRewardsTotalLiquidStakedToken​

TotalNativeToken = Staked TIA + accrued staking rewards. TotalLiquidStakedToken = milkTIA 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 TIA, she then receives 100 milkTIA in return.

ExchangeRate=100100=1.0ExchangeRate = \frac {100} {100} = 1.0ExchangeRate=100100​=1.0

Let’s assume that time has passed and 10 rewards were accrued. Now, the new exchange rate would be:

ExchangeRate=100100+10=0.91ExchangeRate = \frac {100} {100+10} = 0.91ExchangeRate=100+10100​=0.91

If Alice decides to withdraw her TIA, she receives 110 TIA for 100 milkTIA 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 osmoTIA is transferred to Celestia to stake on behalf of the MilkyWay users. Once it is staked, Celestia protocol begins to accrue staking rewards every block. To update the exchange rate on the staking contract on Osmosis, 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:

  1. IBC transfer the withdrawn staking rewards to the staking contract on Osmosis

  2. Upon the staking rewards arriving on Osmosis, the staking contract updates the exchange rate. This increases the value of milkTIA over time.

PreviousWithdrawal ProcessNextCompound Staking Rewards

Last updated 1 month ago

The coordinator periodically monitors the accrued staking rewards of the delegations from the Staker multisig account and signs and MsgTransfer in a transaction and broadcast it to Celestia.

WithdrawDelegatorReward