Contract Specifications
Last updated
Last updated
The codebase of our Liquid Staking Protocol can be found on , inside the repository. Particularly, you will find two smart contracts:
The : it contains the logic that allows to stake TIA tokens in exchange for our milkTIA Liquid Staking Token, as well as unstaking such token to receive back TIA.
The : this is where all the fees collected by MilkyWay are stored and managed.
Both contracts are deployed on the mainnet at the following addresses:
Staking Contract
osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0
Treasury Contract
osmo1r88fszmnpn8ez5wc42pssd2597mhtrdzex7tzzulj98fmqee2fksg7z5yh
In order to liquid stake some TIA and receive milkTIA, you will need to broadcast a transaction containing a /cosmwasm.wasm.v1.MsgExecuteContract
message having the following structure:
When creating this message, please note the following:
Make sure the contract address is the one of our liquid staking contract: (osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0
)
Make sure the user has bridged the amount of TIA they want to liquid stake to the Osmosis mainnet using IBC. This because we only support IBC TIA to be liquid staked (denom: ibc/D79E7D83AB399BFFF93433E54FAA480C191248FC556924A2A8351AE2638B3877
)
Make sure the amount of tokens to be liquid staked is multiplied by 1.000.000
when creating the message. This means that if the users wants to liquid stake 10.5 TIA, you should set 10500000
as the amount.
In order to liquid unstake some milkTIA and receive back TIA, you will need to broadcast a transaction containing a /cosmwasm.wasm.v1.MsgExecuteContract
message having the following structure:
When creating this message, please note the following:
Make sure the contract address is the one of our liquid staking contract: (osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0
)
Make sure the amount of tokens to be liquid unstaked is multiplied by 1.000.000
when creating the message. This means that if the users wants to liquid unstake 10.5 milkTIA, you should set 10500000
as the amount.
After you request your milkTIA to be unstaked, it will need around 14 days for them to be available again. Once that time has passed, you can use the following message in order to claim your tokens:
When creating this message, please note the following:
Make sure the contract address is the one of our liquid staking contract: (osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0
)
The batch_id
provided matches the value returned by the liquid_unstake
operation execution.