Integrate rToken
There are 2 ways for Cosmos Eco projects to integrate into StaFiHub to get their own liquid staking derivatives.
Integrating with Interchain Accounts(ICA): It is a more decentralized way that enables the chain security to maintain rToken among Cosmos-SDK based projects, if which have already integrated Interchain accounts module.
Integrating with Multisig Accounts: We provide this way to support projects that do not support ICA yet. rToken security relies on the chain security and offchain relay. If ICA is supported in the future, it will migrate to the way of using ICA.
Cycle Flow Chart
Integrating with Multisig Accounts
Integrating with Interchain Accounts
Phase 1
Phase 2
Conclusion
Similarity
The two integration methods are cyclical, the length of a cycle is one ERA which equals to 1 day.
Each cycle is started with a new Era and contains several transaction steps, each of them needs to process a specific transaction such as
Delegate
,Undelegate
,Withdraw Reward
orTransfer
. After each step, StaFiHub will issue an event which will be listened by rToken relay service to start the next step.All transactions included in a cycle are completed on the pool accounts.
Diversity
Transactions on the Multisig Account pool are completed by the relay, while transactions on the Interchain Account Pool are completed by the StaFiHub.
The transaction results of the Multisig Account pool need to be monitored by the rToken relay service and reported to the StaFiHub, while the transaction results of the Interchain Account pool are directly notified to the StaFiHub by the IBC protocol.
For Multisig Account pool and Interchain Account pool phase 1, all the information required by the transactions is queried by the rToken relay service on StaFiHub and the target chain, while for Interchain Account pool phase 2, StaFiHub is able to collect the information through Interchain Query and build the transactions itself. At this point, the rToken relay service will be downsized and rToken will be completely decentralized.
Last updated