Skip to main content

Cross-Chain Bridge

What is StAztecOFTAdapter?

StAztecOFTAdapter enables cross-chain bridging of stAztec via LayerZero V2. It is deployed on Ethereum (the home chain) and uses the OFT (Omnichain Fungible Token) standard to lock stAztec locally and mint synthetic representations on destination chains.

When bridging back, the synthetic tokens are burned on the destination chain and the original stAztec is unlocked on Ethereum.

The adapter is owned by OllaGovernance, which configures peer connections (setPeer) and enforced gas options for each destination chain.

How it works

  1. User approves stAztec to the adapter and calls send() with the destination chain and amount.
  2. The adapter locks the stAztec tokens and sends a LayerZero message.
  3. On the destination chain, a corresponding OFT contract mints synthetic stAztec to the recipient.
  4. To bridge back, the process reverses: burn on destination, unlock on Ethereum.

Configuration

After deployment, governance must configure:

  • setPeer(dstEid, peerAddress): Register the OFT contract address on each destination chain.
  • setEnforcedOptions(dstEid, msgType, options): Set minimum gas budgets for cross-chain messages.
    • Message type 1 (SEND): ~200,000 gas.
    • Message type 2 (SEND_AND_CALL): ~350,000–500,000 gas.