Skip to content

Add ChimpX AI-powered DeFi aggregator trades on BNB Chain#9357

Open
dhruvalgupta2003 wants to merge 7 commits intoduneanalytics:mainfrom
dhruvalgupta2003:feat/add-chimpx-bnb-trades
Open

Add ChimpX AI-powered DeFi aggregator trades on BNB Chain#9357
dhruvalgupta2003 wants to merge 7 commits intoduneanalytics:mainfrom
dhruvalgupta2003:feat/add-chimpx-bnb-trades

Conversation

@dhruvalgupta2003
Copy link
Copy Markdown

Description

Adds ChimpX to dex_aggregator.trades on BNB Chain.

ChimpX is an AI-powered DeFi aggregator that lets users execute swaps, bridges, lending, borrowing, staking, and perpetuals through natural language. Volume is recorded on-chain via the ChimpXVolumeRegistry contract which emits VolumeRegistered events after each successful user action.

Contract: 0x8327839597934e1490f90D06F2b0A549dFC7edeB (BNB Chain, deployed block 82131810)

Changes

  • New: dbt_subprojects/dex/models/_projects/chimpx/bnb/chimpx_bnb_trades.sql
  • New: dbt_subprojects/dex/models/_projects/chimpx/bnb/_chimpx_bnb_schema.yml
  • New: dbt_subprojects/dex/seeds/chimpx/chimpx_bnb_trades_seed.csv
  • Modified: dex_aggregator_trades.sql — added chimpx_bnb_trades to as_is_models

Note on token columns

The registry contract records aggregated USD notional volume across action types (swap, bridge, lend, borrow, stake, perps) rather than individual token pair swaps. As a result, token_bought/sold_address and token_bought/sold_amount_raw are NULL. amount_usd is populated from the volumeUsd field (18-decimal fixed-point). Happy to discuss the best approach if Dune prefers a different table or pattern.

Related issue

Closes #9356

Adds ChimpX to dex_aggregator.trades. ChimpX is an AI agent that executes
swaps, bridges, lending, borrowing, staking, and perpetuals on BNB Chain.
Volume is tracked via on-chain VolumeRegistered events from ChimpXVolumeRegistry
(0x8327839597934e1490f90D06F2b0A549dFC7edeB, deployed block 82131810).

New files:
- dbt_subprojects/dex/models/_projects/chimpx/bnb/chimpx_bnb_trades.sql
- dbt_subprojects/dex/models/_projects/chimpx/bnb/_chimpx_bnb_schema.yml
- dbt_subprojects/dex/seeds/chimpx/chimpx_bnb_trades_seed.csv

Modified:
- dex_aggregator_trades.sql: added chimpx_bnb_trades to as_is_models

Closes duneanalytics#9356
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 23, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions github-actions bot marked this pull request as draft February 23, 2026 19:16
@github-actions github-actions bot added WIP work in progress dbt: dex covers the DEX dbt subproject labels Feb 23, 2026
@dhruvalgupta2003
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@dhruvalgupta2003
Copy link
Copy Markdown
Author

recheck

github-actions bot added a commit that referenced this pull request Feb 23, 2026
@dhruvalgupta2003
Copy link
Copy Markdown
Author

recheck

1 similar comment
@dhruvalgupta2003
Copy link
Copy Markdown
Author

recheck

@dhruvalgupta2003 dhruvalgupta2003 marked this pull request as ready for review February 24, 2026 12:24
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Feb 24, 2026
@dhruvalgupta2003
Copy link
Copy Markdown
Author

Reverted trace_address back to ARRAY[-1] — the correct array(bigint) type expected by the aggregator UNION. The previous CAST(NULL AS VARCHAR) fix caused a TYPE_MISMATCH since all other as_is_models (cow_protocol, paraswap, etc.) output array(bigint).

The uniqueness test failure (24 rows) from the earlier run appears to be pre-existing in dex_aggregator_trades and unrelated to this PR — happy to investigate further if needed.

recheck

@dhruvalgupta2003
Copy link
Copy Markdown
Author

recheck

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.

[CONTRIBUTION] Add ChimpX AI-powered DeFi aggregator to dex.trades on BNB Chain

1 participant