Skip to content

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

Closed
dangerousfood wants to merge 1 commit into
masterfrom
codex/deepstate-robinhood
Closed

dangerousfood wants to merge 1 commit into
masterfrom
codex/deepstate-robinhood

Conversation

@dangerousfood

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

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

Bind 0x Settler to the canonical Robinhood deployment with direct-route validation, exact bounded input accounting, unmatched-input refunds, and unit, fuzz, gas, and live-fork coverage.

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

Copy link
Copy Markdown
Author

Superseded by #3, which adds the final Settler-native security boundaries and preserves the reviewed implementation as one commit without rewriting 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