EVM

Introduction

This document outlines the main functionalities of the Brotocol Bridge as deployed on EVM-compatible blockchains. The core aspects of the bridging operation are implemented in the BridgeEndpoint contract, which acts as the main entry and exit point for cross-chain operations, ensuring that assets are securely locked, minted/burned, transferred, and released. The BridgeEndpointWithSwap contract extends this functionality by incorporating swaps, allowing bridging and swapping to occur in within a single transaction.

The Brotocol ecosystem offers two main features in its EVM implementation:

  • The bridging of ERC-20 assets: these contracts interact with Brotocol's off-chain protocol actors to allow the transfer of assets back and forth between EVM-compatible blockchains and Stacks.

  • The swapping of tokens in the bridging process via external liquidity aggregators.

EVM Chain Bridge

This is a simplified representation on the EVM Chain Bridge's main goal.

*To see more information on the registry contract, see the auxiliary contracts section.

Bridge Endpoint

This endpoint's main responsibility is serving as the entry and exit point for assets moving along Brotocol's cross-chain bridge. Sometimes, it also involves swapping to other tokens as part of the peg-in process.

Auxiliary Contracts

These contracts do not include the implementation of any core functionality but they serve as a support for other contracts to facilitate calculations and common storage management.

  • Bridge Registry: this contract keeps a record of approved tokens, validators, relayers and fees. It also keeps a record of the generated orders and their statuses. Its latest version can be found at BridgeRegistry.sol.

Last updated