Skip to content

track matcha-xyz auto mode frontend fees and new allium helper to track the native and erc20 token transfers#6213

Merged
treeoflife2 merged 1 commit into
DefiLlama:masterfrom
treeoflife2:matcha-xyz-auto
Mar 18, 2026
Merged

track matcha-xyz auto mode frontend fees and new allium helper to track the native and erc20 token transfers#6213
treeoflife2 merged 1 commit into
DefiLlama:masterfrom
treeoflife2:matcha-xyz-auto

Conversation

@treeoflife2

@treeoflife2 treeoflife2 commented Mar 18, 2026

Copy link
Copy Markdown
Member

https://matcha.xyz/matcha-auto

Summary by CodeRabbit

  • New Features
    • Added support for Matcha XYZ fee tracking across multiple blockchain networks.
    • Enables daily aggregation of fees, revenue, and protocol revenue metrics.

@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

A new fee adapter for Matcha XYZ is introduced alongside refactored helper utilities. The adapter retrieves EVM token transfers across multiple chains with customizable filtering, leveraging a newly extracted chain-mapping utility from the Allium helper module.

Changes

Cohort / File(s) Summary
New Fee Adapter
fees/matcha-xyz.ts
Introduces SimpleAdapter implementation with per-chain configuration, fetch function that calls getEVMTokenTransfers with blacklist and address filters, and returns aggregated dailyFees, dailyRevenue, and dailyProtocolRevenue.
Chain Mapping Utilities
helpers/allium.ts
Adds ALLIUM_CHAIN_MAP constant mapping CHAIN enums to Allium-recognized chain names, and exports getAlliumChain helper function for chain lookup fallback.
Token Transfer Refactoring
helpers/token.ts
Imports getAlliumChain from allium module instead of defining locally. Adds new getEVMTokenTransfers function with GetEVMTokenTransfersParams type, supporting parameterized filters (toAddresses, fromAddresses, tokens, blacklist variants) for flexible token transfer querying.

Sequence Diagram

sequenceDiagram
    participant Adapter as Matcha Adapter
    participant Transfer as getEVMTokenTransfers
    participant Allium as Allium Helper
    participant Query as Allium Query Engine
    
    Adapter->>Transfer: fetch(options)
    Transfer->>Allium: getAlliumChain(chain)
    Allium-->>Transfer: mapped chain name
    Transfer->>Query: queryAllium(complex filter query)
    Query-->>Transfer: token transfer events
    Transfer->>Transfer: createBalances() aggregate
    Transfer-->>Adapter: { dailyFees, dailyRevenue, dailyProtocolRevenue }
    Adapter-->>Adapter: return composite object
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A new adapter hops into place,
Matcha chains join the fee-tracking race,
Filters and mappings, helpers refine,
Token transfers counted line by line,
Revenue streams now perfectly defined! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal—only a URL reference to matcha.xyz/matcha-auto with no structured information about the PR changes or context. Add details explaining what matcha-xyz auto mode is, how fees are tracked, describe the new allium helper functionality, and justify the changes with methodology or implementation details.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding matcha-xyz auto mode fee tracking and a new allium helper for token transfer tracking.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ghost

ghost commented Mar 18, 2026

Copy link
Copy Markdown

The matcha-xyz.ts adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees matcha-xyz.ts

🦙 Running MATCHA-XYZ.TS adapter 🦙
---------------------------------------------------
Start Date:	Tue, 17 Mar 2026 11:36:13 GMT
End Date:	Wed, 18 Mar 2026 11:36:13 GMT
---------------------------------------------------

------ ERROR ------
Error: Allium API Key is required[Ignore this error for github bot]
    at _queryAllium (/home/runner/work/dimension-adapters/dimension-adapters/helpers/allium.ts:77:11)
    at /home/runner/work/dimension-adapters/dimension-adapters/helpers/allium.ts:10:71
Allium API Key is required[Ignore this error for github bot]

@treeoflife2

Copy link
Copy Markdown
Member Author
🦙 Running MATCHA-XYZ adapter 🦙
---------------------------------------------------
Start Date:     Fri, 13 Mar 2026 00:00:00 GMT
End Date:       Sat, 14 Mar 2026 00:00:00 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Daily protocol revenue | Start Time
---       | ---        | ---           | ---                    | ---
ethereum  | 4.33 k     | 4.33 k        | 4.33 k                 | 1/6/2023
arbitrum  | 78.00      | 78.00         | 78.00                  | 1/6/2023
base      | 2.34 k     | 2.34 k        | 2.34 k                 | 1/6/2023
bsc       | 62.00      | 62.00         | 62.00                  | 1/6/2023
polygon   | 45.00      | 45.00         | 45.00                  | 1/6/2023
monad     | 22.00      | 22.00         | 22.00                  | 1/6/2023
plasma    | 28.00      | 28.00         | 28.00                  | 1/6/2023
avax      | 50.00      | 50.00         | 50.00                  | 1/6/2023
optimism  | 0.00       | 0.00          | 0.00                   | 1/6/2023
unichain  | 0.00       | 0.00          | 0.00                   | 1/6/2023
scroll    | 0.00       | 0.00          | 0.00                   | 1/6/2023
mantle    | 0.00       | 0.00          | 0.00                   | 1/6/2023
linea     | 0.00       | 0.00          | 0.00                   | 1/6/2023
mode      | 0.00       | 0.00          | 0.00                   | 1/6/2023
abstract  | 0.00       | 0.00          | 0.00                   | 1/6/2023
Aggregate | 6.95 k     | 6.95 k        | 6.95 k                 |



FEES BREAKDOWN 👇

label        | Daily fees | Daily revenue
---          | ---        | ---
Trading Fees | 6951       | 6951

@treeoflife2 treeoflife2 merged commit f7ca527 into DefiLlama:master Mar 18, 2026
1 of 3 checks passed
@treeoflife2 treeoflife2 deleted the matcha-xyz-auto branch March 18, 2026 14:09
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