The purpose of this repository is to develop and release a new set of staking, distrbution and slashing modules for the Cosmos Hub that are compatible with cosmos-skd 0.43 and do not need to wait on cosmos-sdk 0.45 to included in a Gaia release and Cosmos hub Upgrade.
This repo represents an opinated design for adding liquid staking to the Cosmos SDK. The
There are a few core goals.
- Staked assets should be able to converted into liquid staked assets without unbonding.
- The smallest change set possible on the existing staking, slashing and distrbution modules.
- Assets are expected to be minimally fungible. Assets have a denom of "cosmosvaloperxxxx[recordId]". Record ID is a pointer to a non fungible asset that recieves the rewards from the tokenized stake.
- Governance rights are bound to the validator.
- Alice bonds 500 ATOM to iqlusion.io
- Alice executes MsgTokenizeShares for the 500_000_000uatom and 500_000_000cosmosvaloper1xxxx42 in return.
- Alice does an OTC deal with Bob for 250_000_000cosmosvaloper1xxxx42 assets.
- Bob exectutes MsgRedeemTokensforShares for 250_000_000cosmosvaloper1xxxx42 which now becomes a delegation of 250atom to iqlusion.
- While the shares were tokenized, TokenizedShareRecord 42 is recieving the full 500 atom of rewards minus iqlusion's commission.
- Once Bob redeems his tokens for shares, now TokenizedShareRecord 42 will only recieve 250 atoms worth of rewards.
- Alice can execute MsgWithdrawTokenizeShareRecordReward pass these rewards back to Alice's account.
liquidstakingd tx staking tokenize-share cosmosvaloper1qp49fdjtlsrv6jkx3gc8urp2ncg88s6mcversm 1000000stake cosmos1qp49fdjtlsrv6jkx3gc8urp2ncg88s6macdkug
liquidstakingd query distribution tokenize-share-record-rewards cosmos1qp49fdjtlsrv6jkx3gc8urp2ncg88s6macdkug
liquidstakingd tx distribution withdraw-tokenize-share-reward
liquidstakingd tx staking redeem-tokens 1000cosmosvaloper14tlxr8mcr3rg9mjp8d96f9na0v6mjtjlqnksqy1
This flow requires an itegration with CosmWasm that is not part of this repo at this time.
- Alice bonds 500 ATOM to iqlusion.io
- Alice executes MsgTokenizeShares for the 500_000_000uatom and 500_000_000cosmosvaloper1xxxx42 in return.
- There is a staking DAO contract in cosmwasm that is will to accept tokenizedshares from iqlusion.
- Alice excutes a multimsg sending 500_000_000cosmosvaloper1xxxx42 and MsgTransferTokenizeShareRecord to the address of the Staking DAO contract.
- The Staking contract queries the state to see shares to atom ratio for iqlusion and the pending rewards in the share record.
- Alice recieve 500_000_000ustatom from the staking dao contract.
Please join our testnet for Release 0.2.
persistent_peers = "[email protected]:26656,[email protected]:26656,[email protected]:26656"