Skip to content

1inch-U91: add cronos, monad, hyperevm to the 1inch lineage (AR, LO) + fix robinhood mode classification - #9969

Open
dodgervl wants to merge 8 commits into
duneanalytics:mainfrom
dodgervl:1inch-updates-91
Open

1inch-U91: add cronos, monad, hyperevm to the 1inch lineage (AR, LO) + fix robinhood mode classification#9969
dodgervl wants to merge 8 commits into
duneanalytics:mainfrom
dodgervl:1inch-updates-91

Conversation

@dodgervl

@dodgervl dodgervl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description:

Adds cronos, monad and hyperevm to the main 1inch lineage: AggregationRouterV6
(AR) and Limit Order Protocol (LO), following the standard per-chain pattern — 9 models per
chain (raw_calls / stream / executions / transfers / LOP trades), meta config entries
(exposed ["ar", "lo"] like fantom, start 2026-08-01), source declarations, and the LOP
passthrough wired into dex_<chain>_trades. Cross-chain (CC) models are deferred until
the escrow decodings are sorted out separately.

The intent stack on these chains is deployed at non-canonical addresses shared by all
three (same deployer): settlement 0x65497e56... and the Limits/Fusion/CrossChain
access tokens — not the canonical 0xacce55... vanity set. The router is the canonical
0x1111111254... on cronos and monad; hyperevm has a chain-specific router
(0x5281602a...). Cronos uses base_transfers (no transfers_from_traces table),
same handling as robinhood.

Also carries two config-only robinhood mode-classification fixes:

  • Fusion settlement: the config listed the canonical settlement addresses, which are
      not deployed on robinhood — so oneinch.swaps shows 0 fusion there. The real
      chain-specific settlement 0xb55ba9617dafae1236313c3cb7806439ceefbd13 matches ~36.9k
      of 48.7k router fill calls currently misflagged as mode='limits'.
  • Cross-chain v1.2 factory: robinhood's dominant escrow factory line
      (0x50d26ea1..., 862 src escrows vs 209 on v1) was missing from
      escrow_factory_addresses, so its fills also sit in limits. With the factory added
      they are cc-flagged and excluded from the LO stream (cc-flagged fills never enter
      oneinch.swaps from the LO side; mode='cross-chain' rows come only from the CC
      stream, which stays v1-only until the CC iteration). Same story for the new chains'
      cross-chain fills: excluded now, surfacing as mode='cross-chain' when CC lands.

Also adds robinhood to the oneinch_cc_executions schema blockchain list (missed in #9918).

Validation

  • Compiled-model runs on Dune (2026-08-25): robinhood LO = 40,739 fusion / 1,071
      cross-chain-flagged (209 v1 + 862 v1.2) / 12,948 limits; new chains classify cleanly
      (classic/fusion/limits), zero unclassified calls.
  • CI-table QA (clamped window ≥ 2026-08-15): oneinch_swaps reconciles exactly against
      prod — robinhood prod limits 7,462 = 4,630 fusion misflags + 2,556 plain + 276 v1.2
      cc-flagged; cross-chain 43 = 43 (CC stream unchanged); robinhood CC output matches
      prod in the same window — all rows trace to the v1 factory, zero garbage rows from
      the v1.2 line.
  • CI iterations ran with the 1inch-U90: add robinhood to the main 1inch lineage (AR, LO, CC v1.1) #9918 easy-date TEMP clamp (2026-08-15); reverted before
      review, so the branch head builds full history.

Post-merge

Full refresh needed (history changes that merge can't repair): oneinch_swaps,
oneinch_intent_accounts, oneinch_robinhood_lo, oneinch_robinhood_lo_executions,
oneinch_robinhood_lop_venue_settled_fills, dex_robinhood_trades, and initial builds
of the 27 new models + dex_{cronos,monad,hyperevm}_trades. Note oneinch_blockchains,
oneinch_intent_resolvers and oneinch_evms_ptfc iterate the blockchain config without
being graph descendants of the per-chain models, so they need explicit selection (all
cheap). As on #9918, state:modified.macros+ over-selects unrelated chains.

The robinhood cfg listed the canonical multichain settlement addresses (SettlementV3 0xabd4..., SettlementV3v1 0x2ad5...), but neither is deployed on robinhood. The chain uses its own settlement deployment at 0xb55ba9617dafae1236313c3cb7806439ceefbd13 (deployed 2026-06-10, same batch as the access tokens), so no LO fill ever matched and all fusion swaps were flagged as mode='limits'.
…oss-chain v1.2)

Adds the august 2026 deployment wave to the 1inch lineage:

- meta cfg: chain configs (cronos uses base_transfers + clone runtime code at offset 11; monad/hyperevm standard) with chain-specific SimpleSettlement as fusion settlement and both cross-chain factories for LO arg detection; access token overrides (non-vanity addresses on these chains)
- AR/LO cfg: per-chain AggregationRouterV6 macros (hyperevm has a chain-specific router address 0x5281602a...)
- CC cfg: v1_2 method set (new selectors, immutables shifted by the dynamic `parameters` field) and a shared v1.2 raw-parsing contracts macro: factory on decoded tables, escrow clones resolved from creation traces, dst escrow address computed with the v1.2 CREATE2 salt (8 fields + keccak(parameters)), validated against all on-chain deployments
- 12 models + schema per chain (sonic/robinhood templates), sources for decoded ARV6/EscrowFactoryV1_2/access-token tables
- parent schema: 12 union model blockchain lists + lop_venue_settled_fills/lop_own_trades entries per chain
- dex_{cronos,monad,hyperevm}_trades: union in the 1inch-LOP passthrough
…+ LO only)

The CC escrow decodings will be handled separately, so this PR ships classic/fusion/limits only:
- exposed=["ar", "lo"] for the 3 chains (fantom precedent); cc union models drop them via the config loops
- delete the 9 per-chain cc models (cc, cc_executions, cc_raw_calls) + their schema entries
- transfers models keep ar+lo streams only
- revert the v1.2 methods/contracts config (oneinch_cc_contracts_cfg_macro.sql is back to upstream state)
- drop the now-unused creations_parent_code_offset from the 3 chain cfgs (robinhood keeps 21)
- drop EscrowFactoryV1_2 source declarations

escrow_factory_addresses stay in the meta cfg (like fantom): they drive LO factory_in_args
detection, so cross-chain fills keep mode='cross-chain' in swaps instead of polluting limits,
and the LO-side rows won't change when the CC iteration lands.

Also add robinhood to the oneinch_cc_executions schema blockchain list (missed in duneanalytics#9918;
the model unions robinhood via the config loop since robinhood is cc-exposed).
…ement

Robinhood deployed a second escrow factory line (0x50d26ea1..., live since 2026-07-15, now dominant: 862 src escrows vs 209 on v1). Without it in escrow_factory_addresses all its cross-chain fills classify as limits. Also moves a Jinja comment out of the return([...]) expression in oneinch_blockchains_cfg_macro - comments are invalid inside expressions and broke compilation of every oneinch model.
Clamp every oneinch model's date_from to 2026-08-15 via oneinch_easy_date() so CI scans ~10 days instead of full history (CI rebuilds all oneinch models because shared macros changed). New chains lose nothing (first activity 2026-08-17). Same pattern as duneanalytics#9918.
@github-actions github-actions Bot added WIP work in progress dbt: dex covers the DEX dbt subproject labels Aug 25, 2026
@dodgervl
dodgervl marked this pull request as ready for review August 25, 2026 19:18
@github-actions github-actions Bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Aug 25, 2026
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large surface area (new chains + robinhood mode reclassification affects swaps/trades keys) and production risk if the TEMP easy-date commit ships without revert and full refresh.

Overview
Adds cronos, monad, and hyperevm to the 1inch dbt lineage with the standard per-chain AggregationRouterV6 (AR) and Limit Order Protocol (LO) stack—raw calls, decoded calls, executions, transfers, LOP own trades / venue-settled fills—and registers them in meta (exposed: ar, lo only; CC deferred). Chain-specific router/settlement/access-token addresses are wired in cfg macros (hyperevm uses a non-canonical router at 0x5281…).

Robinhood gets config-only fixes: the real fusion SimpleSettlement address and the dominant cross-chain v1.2 escrow factory so LO fills classify as fusion/cross-chain instead of limits; oneinch_cc_executions schema meta now lists robinhood.

Shared macros clamp date_from via a TEMP oneinch_easy_date() (2026-08-15) for CI—must be reverted before merge so production builds full history. dex_cronos_trades, dex_monad_trades, and dex_hyperevm_trades union in 1inch LOP rows via oneinch_lop_dex_trades_passthrough.

Reviewed by Cursor Bugbot for commit 7c14288. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7c14288. Configure here.

-- Production tables must be built with full history: revert before merge + full refresh as needed.
{% macro oneinch_easy_date() %}
{{ return("2026-08-15") }}
{% endmacro %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI date clamp left in macros

High Severity

oneinch_easy_date() still returns 2026-08-15 and is folded into every 1inch date_from. The file itself is marked as a temporary CI clamp to revert before merge. If this ships, full refreshes of oneinch_swaps and the other shared models drop all history before that date across every chain.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Flag hardcoded date literals in model SQL that look like development filters

Reviewed by Cursor Bugbot for commit 7c14288. Configure here.

… 1inch-updates-91

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dbt: dex covers the DEX dbt subproject ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant