Skip to content

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

Closed
dangerousfood wants to merge 4 commits into
masterfrom
codex/deepstate-integration
Closed

dangerousfood wants to merge 4 commits into
masterfrom
codex/deepstate-integration

Conversation

@dangerousfood

@dangerousfood dangerousfood commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Integrates Deepstate into 0x Settler on Robinhood Chain using the same production deployment and settlement model as the LI.FI integration.

  • expose a DEEPSTATE self-funded action only through RobinHoodMixin
  • pin the canonical Robinhood Chain engine at 0x6cf19308C22FC82ea620Fa0B3E94948d20f27B96
  • use 0x ppm semantics and the signed transaction buy token, recipient, and final slippage check
  • require every fill to use the declared direct market and direction with sorted token addresses
  • force every leg to noRest
  • cap ERC-20 authority with an exact temporary approval and clear it after settlement
  • reject non-exact input accounting, including fee-on-transfer/rebasing behavior
  • refund only the selected but unmatched input to the signed recipient while retaining the unselected balance for later actions
  • support ERC-20 and native input/output without forwarding unrelated native balance
  • keep the action unavailable on all non-Robinhood Settlers

Verification

  • Deepstate unit suite: 14/14 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 local unit/FV/invariant coverage: 115 tests passed, including a 20,000-call Uniswap V4 invariant run
  • RobinHoodSettler size: 22,904 bytes (1,672 bytes below EIP-170)
  • Deepstate execution gas snapshot: 205,054 gas
  • production builds: passed
  • VIP/action selector collision check: passed
  • existing gas snapshot comparison: no regressions
  • scoped Foundry lint, formatting, and diff checks: passed
  • npm audit: 0 vulnerabilities

Upstream base

Merged current 0xProject/0x-settler@1df90874 before implementation and verification.

dangerousfood and others added 4 commits August 1, 2026 14:37
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Pin settlement to the canonical Robinhood Chain engine, validate direct routes, bound and account for input exactly, refund unmatched input, and cover the action with unit, fuzz, gas, and live-fork tests.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@dangerousfood dangerousfood changed the title feat: add bounded Deepstate settlement action feat: integrate canonical Deepstate settlement on Robinhood Chain Aug 28, 2026
@dangerousfood dangerousfood reopened this Aug 28, 2026
@dangerousfood

Copy link
Copy Markdown
Author

Superseded by #2, which contains the identical reviewed tree as a single commit without rewriting branch history.

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