Integrate RSP

Table of Contents

RSP members (with existing channel_id) can integrate RSP through the following three options:

Option 1 - Bifrost SLP API

circle-check

Showcase 1: Staking Rewardsarrow-up-right - A PoS Data Platform

Showcase 2: Subwalletarrow-up-right - Polkadot Wallet

Integrating Steps

  1. Get your UI & UX ready.

  2. Integrate Bifrost (Polkadot) vToken Mint API: vtokenminting_mint

    Call dataarrow-up-right: 0x7300080000e40b54020000000000000000000000000100000000

    • Check Bifrost Token indexes and decimals at here.

    • Input your channel_id (Apply you channel id via here)

Option 2 - Bifrost SLPx API (Cross-chain)

circle-check

Integrating with EVM Contract

Showcase: Moonbeam, Astar, Manta (Omni.lsarrow-up-right) - An omni-chain liquid staking dapp

Integrating Steps

  1. Get your UI & UX ready.

Integrating with Parachain

Showcase: Hydration’s Treasury Minted vDOT via SLPx

Hydration democracyarrow-up-right called Bifrost SLPx via XCM and minted 1M DOT to vDOT: https://hydration.subscan.io/referenda/138?tab=preimagearrow-up-right

chevron-rightCheck the Preimagehashtag

Inside of this preimage, it contained the call dataarrow-up-right to call SLPx mint for vDOT.

Integrating Steps

  1. Construct a XCM batch call to call Bifrost-Polkadot API: slpx_mint

circle-info

The cases below demonstrate the workflow of how to mint and redeem vToken on Hydration (parachain) via Bifrost SLPx, which leveraged by XCM.

Let’s assume Alice wants to mint DOT to vDOT on Hydration, a utility.batchAll call is needed:

Extrinsic Call Dataarrow-up-right, which includes several calls inside

  • Call 1:

Call xToken sending 1 DOT to Alice’s derived account on Bifrost.

  • Call 2:

Call xToken sending 0.02 BNC to Alice’s derived account on Bifrost.

circle-info

Check Bifrost Token indexes and decimals at herearrow-up-right.

  • Call 3:

Execute slpx_mint

FAQs:

  1. Why do I need to send 0.02 BNC when minting/redeeming DOT?

Because after the user on Hydration sends an XCM transact with the command to Bifrost, it needs the derived address of the Hydration user to perform the SLPx mint operation, and there is no asset in the derived address, which will cause the transaction fail.

  1. How that derived account is being calculated?

Option 3 - Bifrost Dapp Portal

circle-check
  1. Make sure you already have a channel_id

  2. Generate your Bifrost Dapp Portal

Bifrost Dapp frontend has adapted to the RSP. Attach your channel ID at the end of app.bifrost.ioarrow-up-right, for instance, https://app.bifrost.io/?channel=[channel_id]arrow-up-right. All stakes via this link will be counted as your valid minting.

circle-info

For example, the channel_id of Staking Rewards is 1, the vToken minting of users who enter the Bifrost Dapp through the https://app.bifrost.io/?channel=1arrow-up-right will be counted as the effective minting amount of Staking Rewards.

Last updated

Was this helpful?