👉 Discover the future of cross-chain transactions with Across Protocol
Introduction to Across Protocol
Across Protocol is an innovative cross-chain solution that combines an Optimistic Oracle, bonded relayers, and a single-sided liquidity pool to enable decentralized, near-instant transactions from Rollup chains to the Ethereum mainnet. Currently, Across supports bidirectional bridging between Ethereum Layer 1 (L1) and Layer 2 (L2) solutions like Optimism, Arbitrum, and Boba Network.
Key Features:
- Decentralized Architecture: Leverages Optimistic Oracle for dispute resolution.
- Instant Transactions: Minimizes delays in cross-chain transfers.
- Capital Efficiency: Uses a single liquidity pool for multiple L2 networks.
How Across Protocol Works
Cross-Chain Deposit Workflow
In the Across Protocol, deposits from L2 to L1 can follow several paths, but depositors never lose funds. In all scenarios, tokens deposited on L2 are transferred to the L1 liquidity pool via the native bridges of Optimism or Arbitrum to repay liquidity providers.
Possible Deposit Flows:
- Instant Relay (No Dispute)
- Instant Relay (With Dispute)
- Slow Relay (No Dispute)
- Slow Relay (With Dispute)
- Slow Relay Accelerated to Instant Relay
Key Roles:
Role | Description |
---|---|
Depositor | Users transferring assets from L2 to L1. |
Relayer | Nodes facilitating asset transfers between L1 and L2. |
Liquidity Provider (LP) | Supplies assets to the liquidity pool. |
Disputor | Challenges relay actions via the Optimistic Oracle. |
👉 Explore how Across ensures secure cross-chain transfers
Contract Architecture
Repository Structure
Across Protocol’s smart contracts are hosted on GitHub:
bash
git clone https://github.com/across-protocol/contracts-v1
cd contracts-v1
Key Directories:
– contracts/
: Core smart contracts.
– deploy/
: Deployment scripts.
– networks/
: Addresses of deployed contracts across chains.
Core Contracts
1. BridgeAdmin.sol
- Purpose: Manages L1 liquidity pools and L2 deposit boxes.
- Key Functions:
whitelistToken()
: Links L1/L2 tokens.setCrossDomainAdmin()
: Configures L2 deposit contracts.relayMessage()
: Sends cross-chain messages via L2-specific messengers.
2. BridgeDepositBox.sol (L2)
- Functions:
bridgeTokens()
: Transfers tokens from L2 to L1 via native bridges.deposit()
: Initiates cross-chain transfers (emitsFundsDeposited
event).
3. BridgePool.sol (L1)
- Functions:
addLiquidity()
/removeLiquidity()
: Manages LP positions.relayDeposit()
: Processes slow relays.speedUpRelay()
: Converts slow relays to instant.disputeRelay()
: Challenges incorrect relays.
Key Mechanisms
Liquidity Provision
- LP Tokens: Minted based on the exchange rate between L1 tokens and pool reserves.
- Fees: Dynamic fee model (
lpFeeRatePerSecond
) incentivizes LPs.
Relay Lifecycle
- Slow Relay:
- Relayer posts bond; funds are locked during the challenge period.
- Instant Relay:
- Pays recipient immediately; relayer earns fees post-challenge.
- Dispute:
- Incorrect relays are penalized via Optimistic Oracle.
Deployment Process
Contracts are deployed in this order:
1. BridgeAdmin
(L1)
2. WETH Bridge Pool (L1)
3. L2 Messengers (Optimism, Arbitrum, Boba)
4. L2 Deposit Boxes
FAQs
1. How does Across ensure security?
Across uses bonded relayers and an Optimistic Oracle to penalize malicious actors. Disputes trigger oracle-mediated resolution.
2. What’s the difference between slow and instant relays?
- Slow Relay: Lower fees but delayed processing (~30 mins).
- Instant Relay: Higher fees for near-instant settlement.
3. How are LPs compensated?
LPs earn fees from relay transactions and liquidity mining, calculated via _exchangeRateCurrent()
.
4. Can anyone become a relayer?
Yes, but relayers must stake bonds to participate. Malicious actions result in bond forfeiture.
5. What tokens does Across support?
Initially ETH/WETH, with plans for ERC-20 expansion.
6. How does Across compare to other bridges?
Unlike atomic swaps, Across minimizes capital lockup via a shared liquidity pool and Optimistic Oracle.
Conclusion
Across Protocol offers a secure, capital-efficient bridge solution by combining Optimistic Oracle validation with single-sided liquidity pools. Its modular design supports multiple L2 networks while ensuring decentralized dispute resolution.
For developers, the contract architecture is transparent and extensible, with ongoing improvements in V2.
👉 Learn more about cross-chain innovations with Across
Note: This analysis covers Across V1 contracts. V2 updates may introduce additional features.