Background
Homogeneity, liquidity, and built-in yield are the attributes that determine vToken's ability to meet a variety of DeFi use cases. Therefore, vToken's cross-chain DeFi interaction scenario will become the core of expanding XCM use cases. XCM Action needs to achieve the following goals:
- Support users to mint vToken on the target chain;
- Expand the application of vToken liquidity on the Bifrost chain, support cross-chain swaps and liquidation.
XCM Action Pallet will be released in two versions:
V1: Supports contract invocation on EVM-compatible chain.
V2: Supports Pallet invocation on Substrate parachain.
*The following content is all in V1 version
Execution Logic
XCM vToken Mint
https://whimsical.com/xcm-mint-LMkTCW3tbp2mtUkcJcNMLe
On the target chain:
- The user initiates a vToken cross-chain minting request, signs and calls the Bifrost SDK;
- The Bifrost XCM SDK (module or contract) packages the cross-chain transfer and XCM Action Pallet call request, and executes it.
On Bifrost:
- Cross-chain transfer to the user's Bifrost address;
- The XCM Action module calls the user's address to transfer the token to the XCM Action module address;
- The XCM Action module address completes the vToken minting based on the corresponding interface logic;