Welcome to StaFiHub
  • StaFiHub Introduction
    • Tokenomics
  • Chain
    • Getting started
      • Introduction
      • Install
      • Join The Mainnet
      • Join The Public Testnet
      • Validator FAQ
    • Concepts
      • General Concepts
      • rToken Concepts
      • Genesis Parameters
    • Cli Client
      • Introduction
      • Bank
      • Debug
      • Keys
      • Gov
      • Ledger
      • rBank
      • Relayers
      • rVote
      • Staking
    • gRPC, REST, and Tendermint Endpoints
    • Resources
      • StaFiHub Validator Program
  • rToken
    • Integrate rToken
      • Integrating with Interchain Accounts
      • Integrating with Multisig Accounts
      • Integrate into rToken App
    • Delegation Algorithm
    • Liquidity Grant Program
    • rATOM Migration
  • User
    • Join Public Testnet
      • Testing Guide
    • User Guide
      • rToken Dapp Guide
      • Get FIS Token on StaFiHub
      • Claim Airdropped FIS Token
      • How to get a StaFiHub Address
      • rPool Guide For MintDrop Programs
      • rATOM V1 Migration
      • StaFiHub rBridge Guide
      • IBC Transfer With Keplr Wallet
      • Swap ICS20 FIS to ERC20 FIS
    • FAQ
Powered by GitBook
On this page
  • Cycle Flow Chart
  • Integrating with Multisig Accounts
  • Integrating with Interchain Accounts
  • Conclusion
  1. rToken

Integrate rToken

PreviousStaFiHub Validator ProgramNextIntegrating with Interchain Accounts

Last updated 2 years ago

There are 2 ways for Cosmos Eco projects to integrate into StaFiHub to get their own liquid staking derivatives.

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.

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

  1. The two integration methods are cyclical, the length of a cycle is one ERA which equals to 1 day.

  2. 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 or Transfer. After each step, StaFiHub will issue an event which will be listened by rToken relay service to start the next step.

  3. All transactions included in a cycle are completed on the pool accounts.

Diversity

  1. Transactions on the Multisig Account pool are completed by the relay, while transactions on the Interchain Account Pool are completed by the StaFiHub.

  2. 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.

  3. 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.

Integrating with Interchain Accounts(ICA):
Integrating with Multisig Accounts: