Cronos Gravity Bridge Testnet “Pioneer 11”: Release Notes
This technical blog post includes more detailed release notes about the test bridge launched on June 28th, 2022.
This technical blog post includes more detailed release notes about the test bridge launched on June 28th, 2022.
The Cronos team is thrilled to announce the launch of the Cronos Gravity Bridge testnet “Pioneer 11” on the 28th of June 2022. The Cronos Gravity Bridge aims to connect Cronos with the Ethereum network, funnelling additional liquidity to the Cronos ecosystem.
In this article, following up on the previous post (Introducing Cronos Gravity Bridge Testnet “Pioneer 11”), we will share more details about the “Pioneer 11” testnet.
The Pioneer 11 testnet is a dedicated testnet created specifically for the purpose of testing the Cronos Gravity Bridge. It connects to the Ethereum Goerli testnet. It is distinct from the official Cronos testnet (https://evm-t3.cronos.org) which is used by app developers to test their Dapps.
Overall Design & the Gravity Module
The Cronos Gravity Bridge testnet “Pioneer 11” involves:
A solidity smart contract on the Ethereum testnet (“CronosGravity.sol”), which holds the native ERC20 assets being sent across the bridge.
A set of orchestrators and relayers in charge of synchronising the state of Ethereum and Cronos (testnets). In the gravity bridge model, each Cronos validator is expected to run the orchestrators, which means that the decentralization/security model of the bridge is the same as that of the Cronos chain. The orchestrators are in charge of listening to both chains. The role of the relayer(s) is to send signed updates to the Gravity Bridge contract on Ethereum, while earning fees from the transactions batch.
A Cosmos SDK module in charge of minting assets at the Cosmos layer of Cronos chain, subject to consensus among the Cronos validators.
A Cronos hook module allows the automatic conversion between the assets at the Cosmos layer of Cronos chain, and the equivalent assets at the EVM (Ethereum compatible) layer of Cronos chain.
On the “Pioneer 11” testnet, the Gravity Bridge module is directly incorporated into Cronos.
The Cronos Gravity Bridge documentation is published here.
CronosGravity.sol and Transaction Batch
CronosGravity.sol uses an enhanced version of security.sol and functions as a vault to store Ethereum assets securely.
Specifically, when users send tokens to CronosGravity.sol on Ethereum, these tokens are locked in the CronosGravity.sol contract.
Conversely, when users are sending tokens back from the Cronos side to the Ethereum side, the smart contract releases these tokens on Ethereum.
As for Cronos to Ethereum transfers, the Gravity module creates transaction batches for those tokens. The batches are signed and submitted by the Orchestrators. The transaction batch mechanism aims to pool Ethereum transactions across many transfers with the optimized cost, given that transaction fees are high on the Ethereum mainnet network.
Some major function calls in CronosGravity.sol include:
sendToCronos is triggered when depositing tokens from Ethereum to Cronos. It includes the destination and bridge amount, which emits an event picked up by orchestrators and relayed to Cronos. This finally triggers a mint event on Cronos for those tokens.
DenomToERC20Lookup ensures that the asset has a registered ERC20 contract either from the ERC20 contract flow or the asset originated on the Ethereum chain.
Since the Gravity module creates transaction batches, relayers can submit batches to the submitBatch function call.
submitBatch then verifies the signatures and executes the transfers before emitting a TransactionBatchExecutedEvent.
Interested parties may refer to the Code structure intro for more details.
Cronos Hook
The “hook” mechanism on Cronos extends the transaction processing logic. It allows the native Cosmos-based tokens generated by the Gravity module to be converted automatically into CRC20 tokens. This makes the direct transfers between ERC20 and CRC20 possible, given that Cronos users interact only with CRC20 tokens, not with the Cosmos layer of the Cronos chain.
When it comes to hooks, gravity-hooks trigger the asset conversion between the originated asset (Cosmos) and the representative asset (CRC20), and evm-hooks allow an IBC transfer from a contract account whenever a specific transfer event is fired from the CRC20 contract.
Orchestrators and Relayers
Gravity Orchestrators is a single binary that combines the EthSigner, Oracle, and Relayer. Cronos validators need to run the orchestrators that relay the state of the Ethereum chain to Cronos. The security of the bridge and Cronos are on the same level as they rely on the same set of validators.
Gravity Relayers is a node that updates the Gravity contract on Ethereum while earning fees from the transactions batch.
The relayers and orchestrators overall are in charge of relaying the state of each chain and eliminating the possibility of double-spend.
Get Started
The “Pioneer 11” testnet binary is now released as v0.8.0-gravity-alpha0. On the Pioneer 11 testnet, the gravity bridge module is directly incorporated into Cronos, bringing its features to the Cronos testnet.
Cronos validators and full node hosts can get started and try it out with the “Pioneer 11” node setup guide in hand.
For testers, you may request ETH testing tokens at our public faucet, and begin interacting with the chain by referring to the below instructions on interacting with Cronos bridge:
If you have further feedback and questions, you are always welcome to drop an email to contact@cronoslabs.org or contact us on the Discord server.
Cronos team