x/onboardingmodule is a custom Canto module that automatically swaps a small amount of bridged IBC tokens for $CANTO, and converts the remaining IBC tokens into their corresponding ERC20 tokens on the Canto EVM.
x/onboardingmodule consists of two components, which are both executed in the
- The swap component checks the recipient's $CANTO balance on the Canto EVM, and automatically swaps a a small amount of bridged IBC tokens for $CANTO if it is below the governance-controlled threshold (
- The convert component automatically converts the remaining bridged IBC tokens into their corresponding ERC20 tokens on the Canto EVM.
The behavior of the module is non-atomic, meaning that IBC transfers are still processed even if one or both of the components fail.
- Only token pairs on the whitelist can be created as a pool.
- Pool creation fails if the token pair is not on the whitelist.
- Initial whitelist:
- There is a limit on the number of $CANTO tokens for each pool.
- Deposits will fail if the amount of $CANTO for the pool exceeds 10,000 Canto.
- Double swaps are disabled.
For risk management purposes, a swap will fail if the input coin amount exceeds a pre-defined limit (10 USDC, 10 USDT, 0.01 ETH) or if the swap amount limit is not defined.
The module has three parameters which are controlled by governance:
EnableOnboarding: Enables or disables the module (default value:
AutoSwapThreshold: The threshold balance of $CANTO below which the swap component is triggered (default value:
WhitelistedChannels: The list of IBC channels the module is enabled for. (default value:
["channel-0"]– Gravity Bridge)