Skip to content

Add opt-in integrator taker fees - #29

Merged
dangerousfood merged 1 commit into
masterfrom
codex/integrator-taker-fee
Aug 13, 2026
Merged

dangerousfood merged 1 commit into
masterfrom
codex/integrator-taker-fee

Conversation

@dangerousfood

Copy link
Copy Markdown
Collaborator

Summary

  • add opt-in fillWithIntegratorFee and fillRouteWithIntegratorFee entrypoints
  • calculate integrator fees independently from the same per-leg gross matched output and floor rounding as the protocol taker fee
  • cap integrator fees at 100 bps and leave rests, cancels, and maker claims fee-free
  • preserve every legacy entrypoint, storage field, and radix matching function unchanged
  • support ERC20 and native ETH settlement, per-token route consolidation, and atomic rollback

Verification

  • 381 non-invariant tests passed
  • 38 stateful invariant properties passed at 256 runs x 64 calls
  • adjusted 100% line, statement, branch, and function coverage
  • 1,253 complete-domain SMT obligations passed
  • 26 Halmos symbolic tests passed
  • Slither: 80 detectors, 0 findings
  • production runtime: 22,321 bytes, 2,255-byte EIP-170 margin
  • isolated integrator-fee gas snapshots checked in CI

Fee semantics

For each matched route leg, protocol and integrator fees are each floor(grossMatchedOutput * bps / 10_000). Both use the original gross output, so neither fee compounds on the other. Caller settlement occurs first, followed by protocol fees, integrator fees, and any excess native-ETH refund.

@dangerousfood
dangerousfood force-pushed the codex/integrator-taker-fee branch from 9e22154 to 1da94fc Compare August 4, 2026 01:10
@dangerousfood
dangerousfood force-pushed the codex/integrator-taker-fee branch from 1da94fc to 40db8a0 Compare August 4, 2026 02:36
@dangerousfood
dangerousfood merged commit 3764217 into master Aug 13, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant