How it works? Is it decentralized? Are there any limitations? let's look at it
Thread plan:
- A bridge, kesako?
- Features of Ad Astra
- Journey of a token on Ad Astra
- Decentralization of the Ad Astra bridge
- Contract addresses
- Conclusion
1) A bridge, kesako?
Let's go back to basics, blockchains are closed ecosystems that do not communicate with the outside world. Indeed, nothing is planned to communicate with external servers or even other blockchains, why?
Suppose it's possible and imagine that I can from a smart contract retrieve my Twitter news feed and take action based on that (a decentralized giveaway). A blockchain being an unfalsifiable register, a transaction must be verifiable by all the validators, therefore reproducible, with such a decentralized giveaway nothing would assure me that within 3 hours, 3 minutes or even 3 seconds the information will be always verifiable.
So to guarantee a tamper-proof register, a blockchain must cut itself off from the external world, but by doing so we cut ourselves off from other blockchains. Except that as a real world user we need to interact with multiple blockchains and therefore potentially move our funds.
A first solution is to go through a centralized exchange which has funds on all the blockchains and which will allow us to travel. The other solution, which is the one that interests us, is to go through a decentralized bridge whose sole role is to transfer funds from one blockchain to another. That's good because last night, and after months of work, Elrond deployed its Ad Astra bridge to move its tokens between Ethereum and Elrond (both directions work).
2) Features of Ad Astra
Ad Astra is a bridge for transferring assets between Ethereum and Elrond, only fungible tokens are supported, so we forget about NFTs.
Fees are applied by the bridge: 0 USDC for an ETH -> Elrond transfer, 50 USDC for an Elrond -> ETH transfer.
For the moment only the USDC can be bridged, it is not fixed, the bridge contains a whitelist of tokens that can be used.
There is a maximum amount of tokens that can be bridged in a single transaction, this amount is not fixed and is different for each whitelist token.
There is a minimum amount defined per token whitelist, currently 2500 for USDC, which according to the code is used to cover potential fees (I know ETH is expensive but $2500??????) (Update: The minimum amount has changed)
3) Journey of a token on Ad Astra
We have our USDC on Ethereum and we send it (and block it) in the contract on the ETH side of the bridge, upon receipt of payment the contract on the ETH side will store the information of the transfer to be made. Every X minutes, the bridge, which is an off-chain entity, will read in the contract on the ETH side the pending transfers and execute them all and it happens in two actions:
On the ETH side, the transfer is marked as carried out
We mint the token on the Elrond side and send it to the wallet
For an Elrond -> Eth transfer it's the same process the other way around.
Small subtlety: we transfer ERC20 and ESDT tokens, we therefore exclude the native ETH and EGLD tokens from the transfer, to carry out such a transfer (if one day they whitelist all that) we will use a tokenized version (= wrapped) of these tokens natives. To summarize: We block our tokens in a smart contract on one side and it comes out on the other and it's an off-chain entity that does all that, an off-chain entity? This is the subject of the next part.
4) Decentralization of the Ad Astra bridge
We are going to talk about what makes this bridge interesting because we are going to see how it is decentralized (with some limits that we will see later)
I told you that an off-chain entity is responsible for managing the smart contracts to transfer the tokens deposited in the smart contracts from one side to the other. This entity is a decentralized network of relayers which operates by a proof of stake consensus, does that ring a bell? And yes, in other words the entity that manages the transfers has almost everything from a blockchain!
To simplify, this network of relayers will exercise its power through a multisig on each side, multisig which is the admin of the bridge contracts and as it is proof of stake each relayer will pledge EGLDs to be able to validate the transfers, a malicious relayer will lose some of his pledged EGLDs.
So we have everything of a parallel blockchain, except that instead of validating blocks we validate transfers on the bridge. There is however a major limitation there are currently only 10 validators of which 5 are from the Elrond team and it takes 7 validations out of the 10 for a transfer to take place.
This is a limitation as Elrond only needs the agreement of 2 other validators to pass a transfer but also has veto power over all transfers, using his 5 votes to say "no". Still, this number is not fixed so to see over time, so we still have a functional bridge that is at least technically decentralized.
5) Contract addresses
On the Ethereum side we have 2 contracts:
1st contract:
This contract is used to transfer tokens from Elrond to an Eth wallet, it is this contract that will manage the "multisig" part on the Eth side
Address: 0x1Ff78EB04d44a803E73c44FEf8790c5cAbD14596
2nd contract:
This contract will allow eth users to deposit assets in order to initiate a transfer to Elrond
Address: 0x92A26975433A61CF1134802586aa669bAB8B69f3
On the Elrond side we have more contracts and I will list the 5 main ones:
Like ERC20Safe, this contract allows Elrond users to deposit assets in order to initiate a transfer to Eth
Address: erd1qqqqqqqqqqqqqpgqhxkc48lt5uv2hejj4wtjqvugfm4wgv6gyfkqw0uuxl
When assets arrive on Elrond, you need the mint, but it is not possible to mint any token, you need the rights (the Elrond team cannot mint USDC for example), conversely we will burn when tokens leave Elrond. This contract will therefore create a wrapped version of the esdt which can be mint & burn.
Address: erd1qqqqqqqqqqqqpgq305jfaqrdxpzjgf9y5gvzh60mergh866yfkqzqjv2h
This contract allows to wrap the native EGLD in order to have an esdt version of it
Address: (not found but maybe not deployed as there is only USDC at the moment)
The Elrond equivalent of Bridge.sol, allows assets to be sent from Eth to the designated Elrond wallet
Address: (unimportant because calls BridgedTokensWrapped)
Manages multisig on the Elrond side but also actions related to proof of stake (staking & slashing)
Address: erd1qqqqqqqqqqqqqpgqxexs26vrvhwh2m4he62d6y3jzmv3qkujyfkq8yh4z2
6) Closing
So much for this bridge thread that has the potential to be a huge banger for the Elrond ecosystem.
Writing by Fusee
Tweet Share
You can check if you are not dealing with a scam
Check now