Engineering · DEX

AERE goes MEV-resistant, batch-auction DEX live

On May 31, 2026 AERE Network deployed a batch-auction DEX on chain 2800. Three small contracts that together replace the worst part of crypto UX: getting sandwiched by MEV bots. Users sign EIP-712 orders off-chain (zero gas, zero front-running risk). An authorised solver collects open orders, finds a single uniform clearing price per token pair, and submits the whole batch atomically. Sandwich attacks become structurally impossible, the batch executes in one transaction, so no one can insert a tx between two orders.

What this changes: AereSwap remains available for direct (immediate-fill) swaps. But the recommended path for any user-facing trade is now /swap.html with MEV-protected mode toggled on, a single signature instead of a pending transaction sitting in the mempool waiting to be sandwiched. Users get fair-market execution; solvers compete for the spread; bots can't profit from front-running.

The three contracts

ContractAddressWhat it does
AereSettlement 0x9C2957b1622567B4802E4AFd4c42FB2ec70dE875 Core batch-settlement contract. Solvers call settle(orders, signatures, executions) with arrays of pre-signed user orders + execution amounts. Contract verifies each EIP-712 signature, checks per-order deadlines and minBuy floors, atomically transfers sell tokens (via VaultRelayer) and buy tokens. Replay protection via per-order hash mapping.
AereVaultRelayer 0x9FCA122e87E36D7cba20DbEA7b9b7354A4Cece91 Token allowance proxy. Users approve THIS contract once per token (typically MaxUint256); the settlement contract uses it to pull tokens during batch settlement. Lets us upgrade the settlement contract later without users having to re-approve.
AereSolverRegistry 0xDBD29332a9993d2816EF0bD240288E03a8103f3B Permissioned solver allowlist for Phase 1. Foundation curates initial solver set; bootstrap solver address is the deployer (will be rotated to a dedicated cold/hot solver on aere-infra). Phase 2 (post-audit) opens permissionless bonded-solver entry, anyone posting an AERE bond can solve; bond slashable for misbehavior.

Why batch-atomic clearing kills MEV

The fundamental front-running attack on a normal AMM is the sandwich:

  1. User submits a swap transaction → goes to public mempool.
  2. Bot reads the pending tx, sees user wants to buy AERE.
  3. Bot front-runs with its own buy, pushing the AMM price up.
  4. User's tx executes at the new (worse) price.
  5. Bot back-runs with a sell, pocketing the spread.

The whole attack relies on the bot being able to insert transactions between the user's mempool arrival and the user's tx execution. Batch settlement removes that surface:

Batch-auction settlement with a single uniform clearing price is a well-established primitive for neutralising sandwich MEV. Applied on AERE, it makes front-running structurally impossible rather than merely discouraged.

The order flow

Two user-facing steps. One on-chain transaction (paid by solver).

// Step 1: User signs the order off-chain (no gas).
order = {
  user: 0xUSER,
  sellToken: 0xUSDC,
  buyToken: 0xAERE,
  sellAmount: 1000_000000,          // 1000 USDC
  minBuyAmount: 9800_000000000000000000,  // ≥ 9800 AERE (slippage floor)
  validTo: now + 120,               // valid for 2 minutes
  salt: random_uint256()            // replay protection
}
signature = signTypedData(order)    // EIP-712

// Step 2: Order posted to order book. Solver picks it up + matches with other orders.

// Step 3: Solver submits batch (their tx, their gas).
AereSettlement.settle(
  [order_1, order_2, order_3...],
  [sig_1, sig_2, sig_3...],
  [exec_1, exec_2, exec_3...]     // each: executedBuyAmount per order
)

// Step 4: Atomically, in one tx:
// - Sigs verified
// - sellToken pulled from each user → solver (via VaultRelayer)
// - buyToken pushed from solver → each user (must satisfy each minBuyAmount)
// - Trade events emitted

What's still pending

  1. Foundation deploys the default solver Docker container to aere-infra. The solver: listens to an order-book endpoint, runs the clearing-price algorithm every ~10s, builds batches, submits via settle(). Uses AereSwapRouter for inter-batch liquidity routing when in-batch order matching isn't enough.
  2. Order book API backed by a Postgres schema in the existing aere-explorer-db.
  3. /swap.html UI update, toggle for "Direct swap" (legacy AereSwap, immediate fill) vs "Protected swap" (MEV-resistant intent). Default to Protected after solver is live.
  4. Phase 2: bonded permissionless solver entry. Audit pass. Slashing logic for misbehaviour.

What this composes with

What's next

Tier 1.10 adds Fee Monetization / Sequencer Fee Sharing, developers earn a share of the gas their contracts generate, a structural incentive for builders to deploy on AERE. Tier 1.11 tunes sub-second block times. Tier 1.12 adds Symbiotic-secured bridge economics.

The DEX layer just got fair. The work continues.

← Back to all posts