Overview
This project is a proof of concept for a decentralized bridge secured by stake weighted attestations on the Rootstock blockchain. The goal is to reduce friction moving between Rootstock and other blockchains to both facilitate increased usage and reduce liquidity fragmentation. Liquidity fragmentation is one of the primary challenges in crypto today, with the ever-increasing number of blockchains in the ecosystem with limited interoperability resulting in difficulties moving supposedly fungible (equivalent) assets between blockchains. This results in a poor user experience and inefficient markets, as well as reducing the rate of adoption for new protocols thus hampering the pace of innovation.
Stake weighted attestation allows not only instantaneous settlement but also the ability to transfer between non VM-compatible chains such as Ethereum and Solana, or Bitcoin.
Objective
This proof of concept aims to showcase the potential of Rootstock as a base EVM layer securing decentralized bridges. It includes smart contracts that handle bridging operations, attestation verification, and slashing mechanisms.
What it does
Attesters can stake assets on the Rootstock chain. In return they are able to sign BridgeRequest from users depositing various funds (ERC20s or native currencies) into Vault contracts. Once the economic value of attestations (as measured by the cumulative stake value of all attesters having signed) exceeds the economic value of the bridge, anyone can collate the published attestations and call the destination vault with them and the original BridgeRequest to release funds to the user. In order to incentivise participating both in the protocol and the release procedure a reward is provided to both attesters and fund releasers. Note however that the user themselves, the UI/app, or anyone else can call the release as well!
How we built it
Leveraging cryptography primitives and the recent EIP712 standard for typed data hashing allows us to encode, sign, verify and attest to arbitrary message data across chains/protocols.
Challenges we ran into
EIP712 is a fairly new standard and few examples or documentation exist. To ensure the implementation behaves as expected comprehensive anvil fork tests had to be created.
Accomplishments that we're proud of
What we learned
Cross-chain bridging is complex. Beyond the technical solution and implementation lies the challenge of liquidity provision and execution. This protocol provides the framework for trustlessly initiating and settling transfers across different chains, however someone still has to provide the liquidity for the bridge so incorporating incentive structures that motivate market makers to participate is further challenging.
What's next for Roostock Bridge
- Further developing and exploring the game theory around incentives and rewards for providing liquidity (market making) on the protocol, across chain.
- Incorporate liquidity provision in the vault implementation. A uniswap v2 style pool but cross chain to allow users and attesters to not just stake but also generate fees from liquidity provision.
- Explore uniswap v4 hooks to bootstrap crosschain liquidity wherever uniswap pools are deployed.
- Dynamic fee setting to reflect the prevailing market dynamics for specific bridge vectors.
- RFQ protocol implementation allowing market makers or liquidity providers to compete for specific swaps. Balancing this implementation so that the auction period doesn't delay the otherwise potentially instantaneous bridge yet still provides enough time for MMs and LPs to contest the request in a way that provides the user with optimal price execution and minimal slippage.
Log in or sign up for Devpost to join the conversation.