Skip to main content

Overview

Users deposit and withdraw from RollApps by utlizing Dymension's validation processes. This bridging functionality is included out-of-the-box with RollApps, giving users immediate access to large amount of liquidity such as native USDC, USDT, and more. eIBC is a bridging protocol built on top of IBC that enables users to transfer out of RollApps (i.e., withdraw) without waiting for the completion of dispute periods.

Users submit withdrawal requests from RollApps for a fee that is denominated in the amount of tokens they are willing to pay. eIBC fulfillers submit fulfillment orders and receive the total amount with the fee at the end of the dispute period.

dymint-overview

Setting up eIBC

Anyone can fulfill eIBC orders. It is recommended for RollApp teams to fund and operate eIBC clients in order to fulfill user demands for withdrawals particularly around the genesis (beginning) of the RollApp.

Allocate an appropriate amount of tokens that will be used to fulfill eIBC orders and opening liquidity pools to a deployer-owned Dymension address that will transfer to an eIBC client.

Allocating tokens on Genesis

Example

        "hubgenesis": {
"params": {
"genesis_triggerer_allowlist": [
{ "address": "DYMENSION_ADDRESS" }
]
},
"state": {
"is_locked": false,
"genesis_tokens": [
{
"denom": "DENOM",
"amount": "AMOUNT"
}
]
}
},

To add tokens to Dymension immediately after genesis (i.e. for liquidity pools, eIBC client), funds can be transferred on the genesis event.

Genesis bridge uses the first IBC connection, it is thus important that a connection is made to Dymension to properly distribute tokens. RPC should be exposed only after the IBC connection to Dymension is made.

Creating eIBC order on a RollApp (i.e., withdrawal)

Users may create an eIBC demand order on the RollApp to withdraw funds:

rollapp tx ibc-transfer transfer transfer channel-0 \
${RECEIVER_ADDR} \
${AMOUNT_TO_TRANSFER}${DENOM} -b block \
--from ${FROM_USER} --keyring-backend test --memo '{"eibc": {"fee": "FEE_AMOUNT"}}' \

Querying eIBC orders

Users may query the current status of an eIBC order:

dymd query eibc list-demand-orders status [rollapp] [recipient] [type] [denom] [fulfilled] [fulfiller] [limit] [flags]

Fulfilling orders

Users may manually fullfill an eIBC order instead of running an automated eIBC client:

dymd tx eibc fulfill-order <order-id> <expected-fee-amount>

Updating fees

Users may not cancel the eIBC transaction after submitting but the recipient may update the eIBC order on Dymension:

dymd tx eibc update-demand-order <order-id> <new-fee-amount>