Why we bridged the cheqd network to Ethereum, and our collaboration with Gravity Bridge to achieve it
We’re excited to share that we have now successfully set up a bridge to Ethereum for the cheqd network using the Gravity Bridge. A blockchain bridge or ‘cross-chain bridge’ enables users to transfer assets or any form of data seamlessly from one entirely separate protocol or ecosystem to another. As we build payment rails for digital identity (more on that below), we want to offer issuers, verifiers, and holders a choice on the means of settlement. We believe that widely-adopted stablecoins such as USDC offer price-stable currencies to designate such transactions, and therefore bridging to Ethereum makes obvious sense.
Before we get into why we chose to bridge to Ethereum with the Gravity Bridge, it’s worth sharing a little about what a bridge is, why we felt the time was right for us to do this, and ultimately what are the benefits to the cheqd network, our partners and end-users.
Introducing the CHEQ-ERC20 wrapped token
To create an ERC20 representation of the Cosmos based CHEQ token we’ve used a bridge. A blockchain bridge or ‘cross-chain bridge’ enables users to transfer assets or any form of data seamlessly from one entirely separate protocol or ecosystem to another (i.e. Solana to Ethereum, or in our case Cosmos to Ethereum and vice versa).
Bridges generally use some kind of mint-and-burn function to keep token supply constant across all platforms. When the token leaves one blockchain, it is burned or locked, and an equivalent token is minted on the opposite blockchain. Conversely, the equivalent token is burned or locked when the token moves back to its original network. This equivalent token is known as a ‘wrapped token’ because the original asset is put in a wrapper, a kind of digital vault that allows the wrapped version to be created on another blockchain.
The CHEQ-ERC20 wrapped token can be found here (you can also add it to your MetaMask wallet through this link — go to profile summary > click ‘more’ > ‘add token to MetaMask’ )
How do I transfer tokens to Ethereum and join a pool?
Why did we decide on a bridge to Ethereum?
As we build payment rails for trusted data (more on that below), we want to offer issuers, verifiers (the receivers of trusted data), and holders a choice on the means of settlement. We expect a preference for stablecoins to eliminate the volatility in either pricing or settling payments for trusted data.
More on this in our tokenomics for payment models.
Whilst the Cosmos ecosystem has these, they aren’t as widely adopted yet as either USDC or USDT, both of which are within the Ethereum ecosystem. Furthermore, as we want to work with fiat on and off-ramps to remove the need for end customers to worry about crypto, there are currently more of these available in the Ethereum ecosystem, although we’re sure the Cosmos ecosystem will catch up with new companies joining the likes of Kado.
A nice byproduct of this is providing easier access to CHEQ, whether you’re building upon the network, seeking to secure the network through staking or liquidity mining.
Ethereum was the first ecosystem we bridged to but it certainly won’t be the last.
What is the Gravity Bridge & how does it work?
The Gravity Bridge is a trustless, neutral bridge between the Ethereum and Cosmos ecosystems built by the Althea team. Built using the Cosmos SDK, it uses the validator set to sign transactions instead of a multi-sig or permissioned set of actors.
The neutrality here implies that the entire focus of the Gravity community is on providing the most effective and secure bridge possible instead of on a DeFi application on the local chain. This neutrality aggregates volume from a number of blockchains and sources, increasing efficiency and lowering costs. All control over the bridge is handled entirely by the Gravity Bridge validator set.
The Gravity Bridge has two defined components:
2) A Cosmos SDK module on the Gravity Bridge blockchain
The way Gravity Bridge works is similar to how all cross-chain bridges work, i.e. locking up a native token on one side of the bridge and minting a representation of that token on the other. The user then uses this representation before it is returned to the bridge and redeemed for the native asset on the other chain.
The most critical component for bridges to and from Ethereum is the Solidity contract. It holds the native assets being sent across the bridge.
Gravity.sol, the Solidity contract developed by the Althea team, holds funds for Gravity Bridge on Ethereum. In contrast to the prevailing trend in other bridge designs, at a mere 580 lines of code, Gravity.sol is compact and easy to review.
It has been audited by three independent teams (Informal, Least Authority, and Code4rena), and it is not upgradable, meaning that auditors found it cannot be tampered with by any malicious actor and does not contain any trusted parties of any kind.
Why did we decide to use the Gravity Bridge?
After exploring the options available, we felt the Gravity Bridge was the most suitable and could help us achieve our results in the fastest whilst safest way possible.
One of the key things that attracted us to the Gravity Bridge is the way in which the Ethereum contract has been highly optimised, utilising batches to dramatically reduce the cost of transfers between Cosmos and Ethereum.
We also felt the decentralised running of the network was most in line with our vision at cheqd. As it’s a non-custodial solution, a stake can be slashed for any misbehaviour in accurately bridging assets or secure messages.
In addition, as a native bridge, the value of tokens on the destination chain and the absence of double spending are guaranteed by the same consensus as on the consensus chain. This means all the validators are coming to a consensus that the individual owns the tokens that are registered on both sides (the same amount of tokens has been launched on both sides of the bridge — i.e. on both chains).
Finally, we also saw the bridge as a powerful way to ensure having a token on another chain doesn’t fracture liquidity like wrapped tokens through a custodian would do.
Potential issues identified
One of the issues that was raised with the Gravity Bridge is down to the upgrade process. Given the team’s warranted focus on simplicity, it has led to the Solidity contract (gravity.sol) being non-upgradeable, whereas the other bridges can be upgraded by multi-sig wallets. This means the validators and their delegators are completely in control of the Gravity Bridge, and no one else can change the code.
Although we recognise this concern, we feel that the validators on the Gravity Bridge chain have a legitimate governance process and have acted in line with our principles to date. We also plan to set up a validator node on the Gravity chain and engage more in the governance and running of the bridge itself.
What other bridging options did we explore?
Whilst beginning our investigation into bridges, we came across varying bridging techniques available, mainly in the Cosmos ecosystem, although these remain much the same across protocols.
Although many of the wrapped tokens available require a custodian to manage this minting and burning (aka. centralised or trusted bridges), the more innovative bridges that now exist (aka. noncustodial, decentralised or trustless bridges) do this through automated methods using contracts on either side of the bridge, as we’ll come on to.
As mentioned, our initial priority with a bridge is for ease of accessing stablecoins for settling payments for trusted data that will be facilitated on the cheqd network. With this in mind, our bridging requirements at this stage are less complex than they might be in the future (for example, we aren’t necessarily in need of a fully-fledged solution that allows the bridging of smart contracts across protocols like EVMos will in time enable).
If you’re a project looking at bridging, we’d recommend you check out this great explainer video put together on bridges by Ken Timsit from Cronos (Cronos also plan to use the Gravity Bridge, launching in Q2)
Evmos is a Secondary Bridge leveraging a third party — the Connext Peer-to-Peer Bridge. Connext acts as an intermediary to provide liquidity on both sides by locking up purchased tokens and adding these
Essentially when using EVmos you don’t have an Ethereum contract (like Gravity does with Gravity.sol), but it uses the existing contracts of the tokens that exist on the other side. Therefore, given other third parties provide the liquidity, we felt this would be a greater overhead for our team compared to Gravity and more centralised.
That said, we are excited by EVMos and the great team working on this project, who look to have an exciting year ahead with four different DEXs, lending protocol, two perpetual platforms and at least three NFT collections for the NFT marketplaces.
Connext is a peer-to-peer bridge / cross-chain swap. It uses a similar method to the Hashed Timelock Contract, a transactional agreement used on the Bitcoin network to produce conditional payments wherein the receiver or the beneficiary must acknowledge the receipt of payment before a predetermined time or a preset deadline.
Basically, when you want to transfer tokens, there is one router which will be assigned and takes the responsibility of fronting the liquidity. In exchange, they will wait to get paid after the transaction is completed on Ethereum with the same amount of tokens.
Connext’s network utilises nxtp, a lightweight protocol for generalised cross-chain transfers. Nxtp is made up of a simple contract that uses a locking pattern (mentioned above) to prepare and fulfil transactions, a network of off-chain routers that participate in pricing auctions and pass calldata between chains and a user-side SDK that finds routes and prompts on-chain transactions.
Thorchain is a blockchain protocol built on Cosmos that aims to “make all of crypto liquid”. It seeks to do this by enabling the trading of non-native crypto assets, such as trading Bitcoin for Ethereum, but in a completely decentralised way. In essence, it does much of what Coinbase and Binance do — but without a third party ever taking control of the funds.
The Thorchain protocol also powers a decentralised exchange (DEX) by the same name. Like Uniswap or SushiSwap, the Thorchain DEX allows anyone to trade or lend their crypto assets by providing liquidity to an asset pool and, in exchange, earn a return (or “yield”) on those assets. With 1.5 million transactions to date and >80 validators, it is a leading solution, however, for our use case, it just didn’t offer the simplicity and ease of enabling a $CHEQ token on Ethereum.
Since we completed our investigation, Osmosis has also spent some time exploring how they plan to bridge their DEX’s requirements. Axelar, Wormhole and Nomad were also discussed here — all options we came across but did less investigating at the time. You can also find the RFPs for these Bridge proposals links: Axelar, Gravity Bridge, Nomad, Wormhole
A brilliant panel with some of the bridge providers can be found here, and the write-up also available here. The Osmosis Discord has had perhaps the most lively debate since Robo McGobo created a special channel for bridge discussions, and representatives from the various teams have been quite responsive there.
Looking forward; the cheqd <> Gravity Bridge Partnership
We’re excited to be working with the Gravity Bridge / Althea team to explore more ways in which our networks complement each other, as ultimately, they both seek to offer seamless experiences in DeFi & Web 3.0 for users. Watch out for our upcoming blogs around “Seamless experiences, powered by cheqd and Gravity Bridge”.
Huge thanks to the Gravity Bridge and Althea teams for building this out — we’re thrilled to reach this important milestone for cheqd and play a part in the future of the Gravity Bridge.
Happy bridging — all aboard the Gravity express!