4.7 KiB
Spec 8 - ERC-7683 Destination Settler for Aere Network
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)
-
aere-contracts/contracts/intents/AereDestinationSettler.sol- Implements ERC-7683
IDestinationSettler.fill(bytes32 orderId, bytes originData, bytes fillerData)from the existingaere-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, andfillCommitment(orderId)(canonical repayment binder = keccak256 over AERE_CHAIN_ID=2800, settler, orderId, filler, outputToken, outputAmount, recipient, repaymentAddress). - nonReentrant; checks-effects-interactions.
- Implements ERC-7683
-
Finality / repayment wiring (real reference, not a live cross-chain claim):
- Declares
IAereQbftFinalityLightClientmatching the deployedaere-contracts/contracts/interop/AereZkQbftLightClient.sol(0xCaDA54FA...6488): the SP1 Groth16 QBFT-finality prover (guestqbft-lightclient-guest, quorum ceil(2N/3) = 5-of-7). FILLED_EVENT_SIG+Filledlog +fillCommitmentare the on-chain surface an origin-sideAereOutboundVerifierV2-style verifier consumes: it proves theFilledlog 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.
- Declares
-
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.jsfrom aerenew/contracts.
-
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.