BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

An Optimistic Bridge design capable of instant (but ratio-limited) deposit and withdrawal

TT
特邀专栏作者
2021-10-16 10:48
This article is about 2105 words, reading the full article takes about 4 minutes
It can be used for cross-chain deposit and withdrawal between any two EVM-based Layer1 protocols. The operation can be completed immediately and does not require the same consensus between the two protocols.
AI Summary
Expand
It can be used for cross-chain deposit and withdrawal between any two EVM-based Layer1 protocols. The operation can be completed immediately and does not require the same consensus between the two protocols.

overview

overview

In this paper, we propose a scheme for instant Optimistic ERC20 transfer (ie bridge) between two EVM-based chains. Instead of users having to wait for a long challenge time, the two-step mechanism (request/challenge) used in most Optimistic solutions (eg Optimistic bridges between mainnet and POS chains). This method can immediately complete the operation on the target chain (for example, minting Wrapped Token or extracting Token from the lockbox contract). Additionally, the approach is chain-consensus-agnostic, meaning it can be easily scaled to bridge assets on multiple EVM chains regardless of their consensus.

Program premise

  • Source chain S with token T

  • Destination Chain D with Wrapped Token W

  • Users who want to exchange token T on the source chain S for token W on the target chain D at a ratio of 1:1

  • The minter puts a certain amount of token W as collateral on the target chain D and mints token W for the user

Basic Design Concept

The basic idea is to allow anyone to be a minter who can mint tokens W infinitely, as long as:

  • Sum of recent CHALLENGE_PERIOD minted values ​​<= minter's collateral value locked on target chain D / COLLATERAL_RATIO; and

  • Minters have not been challenged for the last CHALLENGE_PERIOD.

Example (good case)

User wants to transfer USDT from ETH (source) to BSC (destination). Suppose COLLATERAL_RATIO (collateralization ratio) = 2, CHALLENGE_PERIOD (challenge period) = 1 day. The minter has locked 100k Warpped USDT on BSC as collateral, which means it can mint up to 50k USDT in any 1-day window on BSC.

  • At time 0, user 1 locks/transfers 20k USDT from ETH, the minter detects the event and mints 20k WUSDT to the user on BSC (the remaining quota is 30k at this time).

  • At time 12h, user 2 locks/transfers 30k USDT from ETH, and the minter detects the event and mints 30k WUSDT to the user on BSC (the remaining quota is 0 at this time).

  • At time 18h, User 3 locks/transfers 10k USDT from ETH, the minter monitors the event, however, it cannot mint any WUSDT because it has minted 50k in the most recent 1-day window.

  • At time 24.1h, the minter mints 10k USDT to user 3 on the BSC (the remaining quota is 10k at this time).

Example (with Challenge)

Assuming PENALTY_RATE (penalty rate) = 1

  • At time 0, User 1 locks/transfers 20k USDT from ETH. The minter detected the event, however, it minted 30k WUSDT, that is, an additional 10k WUSDT was minted to users on the BSC.

  • Within CHALLENGE_PERIOD, the verifier captures the malicious minter and initiates a challenge to the minter on the BSC with a majority vote.

  • expand

expand

Use Native Token instead of Wrapped Token on the target chain

If the destination chain has the same native token as the source chain (for example, USDT is issued on multiple chains), we can use the native token as collateral. When transferring tokens across chains, minters will not mint wrapped tokens, but withdraw tokens in the target chain contract, tokens may come from:

  • Native token locked locally (and minted/withdrawn on another chain)

  • Collateral, which provides liquidity through collateral.

If the native token of the target chain is exhausted, the hybrid solution can support both the native token and the wrapped token on the target chain:

  • If there is sufficient liquidity on the target chain. Only withdraw native tokens for cross-chain transfers;

  • If not, minters can withdraw native tokens and then make up the rest by minting wrapped tokens.

In a hybrid solution, wrapped tokens can

  • Convert natively to the native token as long as there is sufficient liquidity; or

  • Following our proposed method, transfer to another chain as a substitute for native tokens or wrapped tokens on another chain.

other extensions

  • Initial Wrapped Token transfer. Since minter collateral may not have wrapped tokens, we can still use a two-step mechanism or majority vote to create these initial wrapped tokens.

  • Multiple chains are supported. The minter can listen to multiple chains, and as long as the corresponding lock/transfer event is found on any chain, it can be minted.

  • Change validator set settings. We could start with a fixed set of validators with good reputations, but go further and change the protocol using the set of validators developed by the existing Optimistic bridge.

  • Large transfers. The two-step request/challenge mechanism can still be used, and the minter can continue to mint until the large transfer is satisfied.

  • Avoid Gas War. If multiple minters want to mint a lock/transfer event on the source chain, users can specify a preferred minter for cross-chain transfers, and only the preferred minter can mint within PREFERRED_MINT_PEROID (eg, 30 minutes)

resemblance

  • It has some similarities to lending protocols (such as Compound/Aave) with different "borrowing" constraints.

Cross-chain
Welcome to Join Odaily Official Community