Skip to content

feat: integrate canonical Deepstate settlement on Robinhood Chain - #3

Merged
dangerousfood merged 1 commit into
masterfrom
codex/deepstate-robinhood-settler
Aug 28, 2026
Merged

dangerousfood merged 1 commit into
masterfrom
codex/deepstate-robinhood-settler

Conversation

@dangerousfood

Copy link
Copy Markdown

Summary

Adds a production-scoped Deepstate action to 0x Settler on Robinhood Chain.

  • expose DEEPSTATE only through RobinHoodMixin
  • pin the canonical engine at 0x6cf19308C22FC82ea620Fa0B3E94948d20f27B96
  • require the pinned engine to contain code when production Settlers are deployed
  • use the standard SettlerSwapAbstract action-mixin architecture
  • use 0x ppm funding and the signed buy token, recipient, and final slippage check
  • require every fill to use the declared direct market and direction with sorted token addresses
  • force every fill to noRest
  • restrict the engine from generic BASIC calls so validated execution cannot be bypassed
  • cap ERC-20 authority with an exact temporary approval and clear it after settlement
  • reject non-exact input accounting, including fee-on-transfer and rebasing behavior
  • refund only selected but unmatched input while retaining unselected input for later actions
  • support ERC-20 and native input/output without forwarding unrelated native balance
  • keep the action unavailable on non-Robinhood Settlers

Verification

  • Deepstate unit suite: 16/16 passed
  • bounded ERC-20 spend fuzzing: 100,000 runs passed
  • live Robinhood fork at block 48,052,050: passed against the deployed engine
    • real resting maker order created and consumed
    • live 10 bps protocol fee verified
    • unmatched input refunded
    • taker remainder did not rest
    • no Settler token residue
    • temporary allowance cleared
  • broader default-profile unit/FV/invariant coverage: 190 tests passed
  • SafeGuard suite under its required London profile: 20/20 passed
  • Uniswap V4 invariant: 20,000 calls with zero reverts
  • production builds: passed
  • VIP/action selector collision check: passed
  • scoped Foundry lint, formatting, and diff checks: passed
  • existing gas snapshot comparison: no regressions

Gas Optimization

  • Deepstate execution gas snapshot: 205,054 gas
  • RobinHoodSettler runtime size: 22,928 bytes, leaving 1,648 bytes below EIP-170
  • RobinHoodSettlerIntent runtime size: 20,456 bytes, leaving 4,120 bytes below EIP-170
  • RobinHoodSettlerMetaTxn runtime size: 19,649 bytes, leaving 4,927 bytes below EIP-170
  • action calldata reuses the signed transaction recipient and buy token rather than encoding duplicates

Upstream base

Based on 0xProject/0x-settler@1df90874.

Add a chain-scoped Settler action for the canonical Deepstate engine with direct-route validation, exact bounded input accounting, unmatched-input refunds, no-rest enforcement, generic-call isolation, and live-fork coverage.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@dangerousfood

Copy link
Copy Markdown
Author

Review has moved upstream to 0xProject#640: 0xProject#640

@dangerousfood dangerousfood reopened this Aug 28, 2026
@dangerousfood
dangerousfood merged commit 9eb7483 into master Aug 28, 2026
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