Skip to main content
A liquidity ad is the on-chain offer that makes peer-to-peer bridging possible. When a Maker posts an ad, they’re committing to exchange a specific token on one chain for a specific token on another, at a stated rate and up to a stated amount. Bridgers browse available ads and select the one that matches their desired route.

What a liquidity ad contains

Every ad specifies:
  • Source chain and token — the chain and token a Bridger must deposit
  • Destination chain and token — the chain and token the Maker provides
  • Available amount — the total liquidity the Maker is offering
  • Rate — the exchange ratio the Maker is willing to accept
  • Ad ID — a unique identifier used to reference the ad in orders and proofs
These parameters are stored on-chain in the AdManager contract and are publicly visible to all Bridgers browsing the marketplace.

Ad lifecycle

1

Create

The Maker calls createAd on the AdManager contract, specifying the token pair, destination chain, and rate. The ad is now visible in the marketplace but holds no liquidity yet.
2

Fund

The Maker calls fundAd to deposit destination-chain tokens into the contract. Only funded ads can be matched with Bridger orders.
3

Matched by a Bridger

A Bridger selects the ad and deposits source-chain tokens on the OrderPortal. A cryptographically signed order is created, binding the trade terms to both chain IDs and contract addresses.
4

Locked for order

The Maker calls lockForOrder, reserving a portion of their ad’s liquidity exclusively for this trade. The locked amount is appended to the on-chain Merkle Mountain Range as a commitment.
5

Settled

The relayer generates a ZK proof and submits it to both chains. Each chain’s Verifier contract validates the proof and releases funds to the respective recipients simultaneously.
6

Closed

After all pending orders settle, the Maker can call closeAd to withdraw any remaining unlocked funds and permanently close the ad.
A Maker can withdraw unused (unlocked) funds at any time using withdrawFromAd. Locked funds remain reserved until an order settles or times out.

Browsing the marketplace

As a Bridger, you can filter available ads by:
  • Source chain — the chain you’re depositing on
  • Destination chain — the chain you want to receive tokens on
  • Token pair — the specific tokens being exchanged
  • Rate — how much destination token you receive per unit of source token deposited
The marketplace shows only funded ads with sufficient liquidity to fulfill your order. Once you select an ad, the trade terms are locked in via an EIP-712 signed order that both parties cannot alter.
Compare rates across multiple ads before selecting one. Since Makers compete for Bridger volume, you’ll often find favorable rates during periods of high liquidity.

How settlement works

Settlement releases tokens to both parties at the same time, with no manual coordination required.
The relayer submits a ZK proof to the AdManager on the destination chain. The Verifier contract checks that the proof correctly attests to a valid deposit on the source chain. If valid, the Maker’s locked tokens are released directly to the Bridger’s specified recipient address.
The relayer also submits a proof to the OrderPortal on the source chain. Once verified, the Bridger’s deposited source tokens are released to the Maker’s designated recipient address.
Each proof consumes a nullifier — a one-time cryptographic value derived from the trade. Once a nullifier is recorded on-chain, any attempt to replay the same proof is rejected. This is enforced independently on each chain.

Ad parameters reference

ParameterDescription
adIdUnique identifier for the ad
adTokenDestination-chain token the Maker provides
orderTokenSource-chain token the Bridger deposits
adChainIdChain ID where the ad is posted
orderChainIdChain ID where Bridgers deposit
balanceTotal tokens currently in the ad
lockedTokens reserved for in-progress orders
openWhether the ad accepts new orders
Do not close an ad while orders are in progress. Closing an ad withdraws all unlocked funds, but locked amounts remain reserved until their orders settle.