aere-docs/AERE-ERC7683-DESTINATION-SUMMARY.md
2026-10-31 14:46:52 +02:00

6.5 KiB

Spec 8 - ERC-7683 Destination Settler for Aere Network

Note added 2026-10-30 (consensus). Since block 25,080,000 (AIP-22 stage 5) headers no longer carry ECDSA commit seals: each carries the Falcon-512 seal of its proposer instead, and a commit still carries the ECDSA commit seal of its validator as an additional check. Where the note of 2026-09-24 below describes the headers, it describes chain 2800 below that block.

Note added 2026-09-24 (consensus). Where this document says that consensus is classical secp256k1 ECDSA and not post-quantum, read it as the per-block finality statement it was until block 24,300,000 (AIP-22 stage 4, 2026-10-25). Since that block every validator attributes a consensus vote only through its verified post-quantum seal, and a block is post-quantum final once the next anchor, at most 32 blocks later, carries the certificate that covers it; headers still carry classical ECDSA commit seals until AIP-22 stage 5 (this sentence corrected on 2026-10-25). It no longer describes all of consensus on chain 2800: since 2026-08-14 every anchor block must carry a certificate of validator post-quantum seals under its hash (Falcon-512, with SLH-DSA as well since 2026-09-04), and since 2026-09-05 (block 17,250,000) the nine AERE-client validators (nine of the ten) refuse a commit message without a valid Falcon-512 seal of its author, and since 2026-09-08 (block 17,700,000) any QBFT consensus message without one, while the tenth, the second client, enforced that seal only on commit messages until block 24,300,000 and attributes every consensus message only through it since (this clause corrected on 2026-10-12, 2026-10-25 and 2026-10-28; until 2026-10-28 it dated the refusal of every message type to 2026-09-05, the date of the commit layer alone). (Note applied to this document on 2026-09-27.)

Note added 2026-08-19. Statements in this document that consensus on chain 2800 is (or remains) classical secp256k1 ECDSA QBFT were written before the post-quantum header anchor went live, and remain true for block-by-block finality. Since block 13,014,000 anchor blocks (every 32nd block, on every one since block 13,889,296) also carry, under the block hash, a certificate of validator Falcon-512 seals, and since 2026-08-14 a node rejects an anchor block with fewer than three valid seals (f+1 of nine; eight or nine are carried in practice). That is a post-quantum checkpoint about every 16 seconds, not a per-block quorum: the claim published on 2026-08-15 that from block 14,050,000 no block finalizes without a post-quantum quorum was wrong (the per-block rule armed at that height is retired in the shipped code in favour of the anchor rules) and was withdrawn on 2026-08-19. Details: https://aere.network/quantum.html and the aere-node repository, anchor/README.md.

What was built (all new files, deployed origin contracts untouched)

  1. aere-contracts/contracts/intents/AereDestinationSettler.sol

    • Implements ERC-7683 IDestinationSettler.fill(bytes32 orderId, bytes originData, bytes fillerData) from the existing aere-contracts/contracts/intents/IERC7683.sol (reused, not redefined).
    • A solver (msg.sender = filler) delivers the promised output straight to the recipient on Aere via OpenZeppelin SafeERC20 (no custody), records the fill, emits Filled.
    • originData = the origin's declared output leg, matching AereSpokePool _buildResolved: abi.encode(bytes32 orderId, address outputToken, uint256 outputAmount, bytes32 recipient).
    • fillerData = abi.encode(address deliveredToken, uint256 deliveredAmount, address deliveredRecipient, bytes32 repaymentAddress).
    • Fail-closed reverts: OrderIdMismatch, ZeroRecipient, ZeroAmount/ZeroAddress, AlreadyFilled (duplicate), OutputMismatch (wrong token/recipient or short amount).
    • Views: fills, getFill, isFilled, fillCount, and fillCommitment(orderId) (canonical repayment binder = keccak256 over AERE_CHAIN_ID=2800, settler, orderId, filler, outputToken, outputAmount, recipient, repaymentAddress).
    • nonReentrant; checks-effects-interactions.
  2. Finality / repayment wiring (real reference, not a live cross-chain claim):

    • Declares IAereQbftFinalityLightClient matching the deployed aere-contracts/contracts/interop/AereZkQbftLightClient.sol (0xCaDA54FA...6488): the SP1 Groth16 QBFT-finality prover (guest qbft-lightclient-guest, quorum ceil(2N/3) = 5-of-7).
    • FILLED_EVENT_SIG + Filled log + fillCommitment are the on-chain surface an origin-side AereOutboundVerifierV2-style verifier consumes: it proves the Filled log was included in a QBFT-final Aere block (validator-set anchored) and repays the solver, no trusted relayer.
    • The light client is deployed on the consuming/origin chain (Aere is native on Aere), so the settler does NOT call it on-chain; documented, not faked.
  3. aere-contracts/test/destination-settler.test.js - RAN, 4 passing:

    • valid fill: delivers output, records fill, emits Filled, fillCommitment matches
    • duplicate fill reverts (AlreadyFilled)
    • mismatched-output reverts (OutputMismatch) - tested short amount, wrong recipient, wrong token
    • zero-recipient reverts (ZeroRecipient)
    • Command: npx hardhat test test/destination-settler.test.js from aerenew/contracts.
  4. aerenew/docs/AERE-ERC7683-DESTINATION.md - origin+destination composition, solver flow (lock on origin, fill on destination, prove-and-repay), proof shape, honest status, and the point that solver liquidity removes the bridge-liquidity bootstrap.

REAL test result

Compiled 1 Solidity file successfully. 4 passing (~1s), 0 failing.

Flags

  • [MEASURE] End-to-end cross-chain repayment (off-chain SP1 prover over the qbft-lightclient-guest ELF + origin-chain verifier deploy on a 2nd chain) is NOT exercised on one chain in the unit test. No live cross-chain flow claimed.
  • [VERIFY] Exact receipt-trie inclusion encoding for the Filled log: confirm against the final AereOutboundVerifierV2 guest.
  • [VERIFY] ERC-7683 struct shapes taken from the repo's vendored IERC7683.sol (canonical Input/Output/ResolvedCrossChainOrder/IDestinationSettler); matches AereSpokePool origin side.

Scope / honesty

Settlement/interop only. Aere consensus stays classical secp256k1 ECDSA QBFT; the finality proof is ABOUT that QBFT finality, verified classically (falconVerified required false). Deployed origin contracts (AereSpokePool, settlement hub) not modified. No em-dashes; brand "Aere Network"/"Aere", ticker AERE; solc 0.8.23.