RougeBridge Contract

The RougeBridge.sol contract is a multi-asset bridge contract deployed on Base mainnet (0x0c09C764AdC024497729cd452ECfeE8869d35d83) that handles ETH and ERC-20 deposits/releases with enhanced security features.

Features

  • Multi-token support — ETH and any ERC-20 token (USDC, etc.)
  • Pausable — Guardian can pause all operations in emergencies
  • Timelock — Large withdrawals require a delay period before execution
  • Guardian role — Separate from owner; can pause but cannot withdraw
  • Replay protection — Processed L1 transaction IDs are tracked to prevent double-releases
  • Owner = multisig — Deploy with a Gnosis Safe as owner for production

Key Functions

Deposits

function depositETH(string calldata rougechainPubkey) external payable;
function depositERC20(address token, uint256 amount, string calldata rougechainPubkey) external;

Users call these to lock assets in the contract. Events are emitted for the relayer to pick up.

Releases (Owner Only)

function releaseETH(address to, uint256 amount, bytes32 l1TxId) external;
function releaseERC20(address token, address to, uint256 amount, bytes32 l1TxId) external;

The relayer (owner) calls these to release assets when a user burns their wrapped tokens on L1. If the amount exceeds largeWithdrawalThreshold, a timelock is queued instead.

Timelock

function executeTimelock(uint256 requestId) external;  // Owner, after delay
function cancelTimelock(uint256 requestId) external;    // Guardian

Large releases are queued with a configurable delay (default 24 hours). The guardian can cancel suspicious requests during the delay window.

Admin

function pause() external;                              // Guardian or Owner
function unpause() external;                             // Owner only
function setGuardian(address newGuardian) external;      // Owner
function setSupportedToken(address token, bool) external;// Owner
function setLargeWithdrawalThreshold(uint256) external;  // Owner

Events

EventDescription
BridgeDepositETHETH deposited for bridging
BridgeDepositERC20ERC-20 deposited for bridging
BridgeReleaseETHETH released to user
BridgeReleaseERC20ERC-20 released to user
TimelockQueuedLarge release queued with delay
TimelockExecutedQueued release executed
TimelockCancelledQueued release cancelled by guardian

Deployment

The contract is live on Base mainnet (chain ID 8453) at 0x0c09C764AdC024497729cd452ECfeE8869d35d83; the XRGE BridgeVault is at 0xb3f52f2C1bD5692494655cF59d8EE296D23bFAb5. Base Sepolia (chain ID 84532) is used for testing. For production, the contract owner should be a Gnosis Safe multisig.