feat: record first announcement time in OrderRegistrator - #435
Open
deacix wants to merge 4 commits into
Open
Conversation
Co-authored-by: Sergej Kunz <info@deacix.de>
Co-authored-by: Sergej Kunz <info@deacix.de>
Co-authored-by: Sergej Kunz <info@deacix.de>
…y signature Co-authored-by: Sergej Kunz <info@deacix.de>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
deacix
marked this pull request as ready for review
August 7, 2026 11:58
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from #430 per review feedback (split by repo; Fusion-specific auction mechanics move to
fusion-protocol). This PR is the only limit-order-protocol change the anchored auction needs.What
OrderRegistrator.registerOrderkeeps its exact master semantics — permissionless, ECDSA/ERC-1271-validated,OrderRegistered(order, extension, signature)emitted on every call — and additionally recordsannouncedAt[orderHash] = block.timestampon the first registration. The timestamp is write-once: repeated registrations re-emit the event (re-broadcast, as today) but can never move the recorded time.IOrderRegistratorgains one view:Why
A Fusion auction starts at an absolute timestamp baked into the order at build time; a maker that signs slowly (a multisig collecting signatures) misses its own auction window and degrades to the floor price. The announcement-anchored auction extension — now open as fusion-protocol#223, inheriting the auction base extracted from
SimpleSettlement— starts the schedule fromannouncedAtinstead. This contract is the anchor's source of truth, and the write-once rule is what makes the anchor trustworthy: nobody can restart an auction by re-announcing.Notes
deploy-helpers.jsnow refuses to deployOrderRegistratorwithout an explicit create3 salt, since the default salt resolves to the already-occupied address.SafeOrderBuilderis untouched and works as-is against the new registrator. One ops note: aSafeOrderBuilderinstance wired to the old registrator keeps announcing fine but records no anchor, so an anchored-auction order announced that way fails closed at fill (OrderNotAnnounced) — Safe flows that want anchoring must go through the new registrator (a rewiredSafeOrderBuilderor the MultiSend batch directly).SafeOrderBuilderflow, a Safe announcing via one MultiSend batch (SignMessageLib.signMessage+registerOrderwith an empty signature validated through ERC-1271 — the patternSafeOrderBuilderalready uses internally), and the negative gate: an empty signature for a contract maker that has not presigned revertsBadSignature.deploy-Permit2Proxy.jslint fix (getNamedAccountswas not destructured), whichyarn lintfails on at master; kept as a separate commit.Verification
yarn lintclean; full suiteyarn test:cigreen (179 passing); coverage onOrderRegistrator.solis 100% statements/branches/functions/lines; docs regenerated for the touched interface only.