feat(dex): add Ekubo v3 trades on Robinhood Chain to dex.trades - #9925
feat(dex): add Ekubo v3 trades on Robinhood Chain to dex.trades#9925moodysalem wants to merge 3 commits into
Conversation
Ekubo Core is deployed at the same deterministic address on Robinhood Chain (0x00000000000014aA86C5d3c41765bb24e11bd701, block 33534) as on Ethereum, and is by some distance its busiest deployment: ~273k swaps in the last 14 days vs ~128k on Ethereum. None of it currently lands in dex.trades. This mirrors the existing ekubo_v3_ethereum models and reuses the shared ekubo_compatible_pools / ekubo_compatible_liquidity_events macros, so swaps continue to be read from Core's topic-less (log0) swap records while pools come from the decoded PoolInitialized event. - ekubo_v3_robinhood_pools - ekubo_v3_robinhood_base_liquidity_events - ekubo_v3_robinhood_base_trades (+ seed test, 40 real trades) - register in dex_robinhood_base_trades and the ekubo_* aggregators Native ETH is mapped to WETH (0x0bd7d308f8e1639fab988df18a8011f41eacad73).
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
PR SummaryMedium Risk Overview New Robinhood models cover pools, liquidity events, and base trades (swaps derived from liquidity events with Note: builds depend on Robinhood Ekubo Core decoding being available; CI may fail until those source tables exist. Reviewed by Cursor Bugbot for commit 5da9cbe. Configure here. |
|
| chain | address | namespace | name | abi_id |
|---|---|---|---|---|
| robinhood | 0x00000000000014aA86C5d3c41765bb24e11bd701 (Ekubo Core) |
uniswap_v4 |
PoolManager |
2c87fbca… |
| robinhood | 0x8366a39cc670b4001a1121b8f6a443a643e40951 (genuine PoolManager) |
uniswap_v4 |
PoolManager |
2c87fbca… |
| ethereum | 0x00000000000014aA86C5d3c41765bb24e11bd701 |
ekubo_v3 |
Core |
2dac1f79… |
| arbitrum | 0x00000000000014aA86C5d3c41765bb24e11bd701 |
ekubo_v3 |
Core |
2dac1f79… |
| base | 0x00000000000014aA86C5d3c41765bb24e11bd701 |
ekubo_v3 |
Core |
2dac1f79… |
Ekubo Core is deployed at the same CREATE2 address on every chain, and is correctly registered as ekubo_v3 / Core on ethereum, arbitrum and base. Only the Robinhood entry is wrong, and it carries the exact same abi_id as the genuine Robinhood Uniswap v4 PoolManager.
Could someone explain how this happened? Ekubo Core and the Uniswap v4 PoolManager share no bytecode, no ABI and no deployer, so an automatic bytecode or ABI match shouldn't be possible. My guess is a multi-instance or bytecode-matching submission of the PoolManager that over-matched, but I'd rather understand it than assume.
Impact
Good news first: no data is corrupted. Ekubo Core's event topic0s don't match any Uniswap v4 event signature, so the mis-registration decodes to zero rows. uniswap_v4_robinhood.poolmanager_evt_{swap,initialize,modifyliquidity} contain only 0x8366a3…, so dex.trades Uniswap v4 numbers on Robinhood are unaffected.
The problem is that it blocks the correct decoding:
- A submission of
0x0000…14aAunderekubo_v3/Coreforrobinhoodis liable to be auto-rejected as "already decoded", since the registry believes that address is covered. - Until that is resolved,
ekubo_v3_robinhood.core_evt_poolinitializedcan't exist — which is the one dependency of this PR.
Ask
Could the decoding team remove or correct the uniswap_v4/PoolManager entry for 0x00000000000014aA86C5d3c41765bb24e11bd701 on robinhood, so the pending ekubo_v3/Core submission can go through and join the existing ekubo_v3_multichain tables?
It's also worth checking whether the same over-match hit other addresses on robinhood — if one non-PoolManager address was swept in, others may have been too.
Happy to open this as a separate issue or take it to the #decoding Discord channel if that's a better venue than this PR — just say which.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
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 5da9cbe. Configure here.
|
Follow-up: the over-match is not limited to Ekubo Core — it looks systemic on Evidence query: https://dune.com/queries/8262401
Every other chain has exactly one PoolManager registered, as expected. Robinhood has 2,704, of which only A sample of the over-matched set: They're heavily weighted toward leading-zero vanity addresses, which makes me suspect an address-pattern or prefix-based match rather than a true bytecode match — but that's speculation, hence the ask for an explanation. To restate the impact, since the number looks alarming: no query results are wrong today. The over-matched addresses emit no Uniswap v4-shaped events, so they contribute zero rows and So the ask broadens slightly: rather than just fixing the one Ekubo entry, it's probably worth purging the 2,703 non-emitting |
…x-trades # Conflicts: # dbt_subprojects/dex/models/trades/robinhood/_schema.yml # dbt_subprojects/dex/models/trades/robinhood/dex_robinhood_base_trades.sql
|
Pushed an update addressing the review and integration state:
I also rechecked the Dune catalog: the Robinhood Ekubo decoded source is still absent, while the Core address is still associated with the incorrect @cursor review |
|
I have read the CLA Document and I hereby sign the CLA |

Summary
Adds Ekubo v3 on Robinhood Chain to
dex.trades.Ekubo Core is deployed at the same deterministic address on Robinhood Chain as everywhere else —
0x00000000000014aA86C5d3c41765bb24e11bd701, created at block 33534 (2026-06-04). It is currently Ekubo's busiest deployment, and none of it reachesdex.tradestoday:The chain hosts Ekubo's ve(3,3) deployment ("STONX") — tokenized equities (AAPL, NVDA, TSLA, GME, SPY, GOOGL, COST…) and ETH quoted against USDG. Those pools have done roughly $21.4M of volume across ~133k swaps in the first nine days since launch.
Approach
This is a straight mirror of the existing
ekubo_v3_ethereummodels and reuses the shared macros unchanged:ekubo_compatible_pools— pools from the decodedPoolInitializedeventekubo_compatible_liquidity_events— swaps from Core's topic-less (log0) swap records, exactly as on EthereumOne thing worth calling out for reviewers, because it looks unusual at first glance: Ekubo Core has no
Swappedevent in its ABI. Swaps are written with a rawlog0to save gas, which is why the shared macro reads{{ source(blockchain, 'logs') }}withtopic0 is nulland slices the packed payload rather than joining a decoded event table. That is pre-existing behaviour on Ethereum, not something introduced here.The swap record is 116 bytes:
so
poolId = substr(data, 21, 32),delta0 = substr(data, 53, 16)anddelta1 = substr(data, 69, 16), sign-extended asint128— which is what the macro already does.Native ETH is mapped to WETH
0x0bd7d308f8e1639fab988df18a8011f41eacad73, matching the macro's convention on other chains.Files
New:
dbt_subprojects/dex/models/_projects/ekubo/robinhood/ekubo_v3_robinhood_pools.sqldbt_subprojects/dex/models/_projects/ekubo/robinhood/ekubo_v3_robinhood_base_liquidity_events.sqldbt_subprojects/dex/models/_projects/ekubo/robinhood/_schema.ymldbt_subprojects/dex/models/trades/robinhood/platforms/ekubo_v3_robinhood_base_trades.sqldbt_subprojects/dex/seeds/trades/ekubo_v3_robinhood_base_trades_seed.csvsources/_sector/dex/liquidity/robinhood/_sources.ymlModified:
dbt_subprojects/dex/models/trades/robinhood/dex_robinhood_base_trades.sql— register the platform modeldbt_subprojects/dex/models/trades/robinhood/_schema.yml— model docs +check_dex_base_trades_seeddbt_subprojects/dex/seeds/trades/_schema.yml— seed column typesdbt_subprojects/dex/models/_projects/ekubo/ekubo_pools.sql,ekubo_base_liquidity_events.sql— add robinhood to the aggregatorsDependency: contract decoding (submitted)
These models reference
ekubo_v3_robinhood.core_evt_{poolinitialized,positionupdated,positionfeescollected,feesaccumulated}. Ekubo Core is already decoded on ethereum/arbitrum/base (ekubo_v3_multichain); Robinhood Chain has now been submitted for decoding under the sameekubo_v3/Coreproject+contract naming, so it should join that multichain table.Note the swap side needs no decoding at all, but the poolId → token mapping comes from the decoded
PoolInitializedevent, which is why the dependency exists.See the comments below for a registry problem on
robinhoodthat may block that submission.Testing
dbt parse— passesdbt compile --select ekubo_v3_robinhood_pools ekubo_v3_robinhood_base_liquidity_events ekubo_v3_robinhood_base_trades— passes; compiled SQL reviewedI develop Ekubo Protocol, so happy to answer anything about the contracts or the log encoding.