Trustless Bridge for Native Tokens
Last updated
Last updated
We use the Vaulta () blockchain network. The Vaulta blockchain is a next-generation Layer-1 built for speed, scale and finality. Your transfers, swaps, and app interactions happen almost instantly with low (or no) fees.
Vaulta EVM is a powerful feature of the Vaulta blockchain that brings the best of Ethereum's capabilities to the Vaulta ecosystem. It allows you to use popular Ethereum-based applications (dApps) on Vaulta, benefiting from faster speeds, lower costs, and a more eco-friendly environment.
Vaulta EVM technology allow entities to run their own EVM layers on the Vaulta blockchain. Exsat runs it’s own EVM layer, the Exsat EVM.
RPC:
Block explorer:
RPC:
Block explorer:
The Vaulta EVM system is run in a way that each EVM transaction is actually part of Vaulta transactions. The EVM runtime contract will process Vaulta transactions invoking EVM transactions.
We will use evm_runtime to represent the Vaulta account of the evm runtime contract.
Each Vaulta account has a mapped reserved EVM address. The rule is using the uint64 value of the Vaulta name as the last 8 bytes of the EVM address, and then pad the rest with 0xbb. E.g. the name “eosio.evm” is mapped to “0xbbbbbbbbbbbbbbbbbbbbbbbb5530ea015b900000”
The basic trustless bridge mechanism for the EVM native token is easy:
Deposit:
User transfer Vaulta side token to the evm_runtime with the target EVM address as memo.
The Vaulta side token will be locked in the evm_runtime.
Same amount of EVM side token will be mint and transfer to the target EVM address.
Withdraw
User transfers to the reserved address of the target account name.
The EVM side token will be burned.
Same amount of Vaulta side token will be unlocked and send to the target account.
As native token of EVM will only be minted when there’s same amount of Vaulta side token locked in the evm_runtime, it is guaranteed that we will have enough tokens to release.
The precision used for the native token in Vaulta and EVM can be different. e.g. the BTC in Exsat EVM can have 18 decimals while the Vaulta side one can only have 8.
Clearly, one can send an amount with higher precision than the Vaulta during the withdraw process. In basic mode, we will block such calls to avoid generating inconsistency. We also introduced an advanced mode to handle this case.
To hold the dusts, we allow each Vaulta account to open a bridge balance. User can use the “open” action to open the balance. This balance can be used to hold “dusts” beyond native token precision and to hold the gas for call EVM contracts. User can deposit to this balance by sending some tokens to evm_runtime with the eos name of the target balance (in string) as memo.
We will call this balance the bridge balance.
In advanced mode, deposit and withdraw operation is the same as the basic mode with one exception: during the withdraw process, the Vaulta token will go to the bridge balance instead of being sent to the target account. User need to claim the token separately.