Skip to content

Add MultiMesh fees adapter#6296

Open
kurzmichael02-hue wants to merge 2 commits intoDefiLlama:masterfrom
kurzmichael02-hue:master
Open

Add MultiMesh fees adapter#6296
kurzmichael02-hue wants to merge 2 commits intoDefiLlama:masterfrom
kurzmichael02-hue:master

Conversation

@kurzmichael02-hue
Copy link
Copy Markdown

@kurzmichael02-hue kurzmichael02-hue commented Mar 30, 2026

Name (to be shown on DefiLlama):

MultiMesh

Twitter Link:

https://x.com/MultiMesh_01

List of audit links if any:
Website Link:

https://themultimesh.com

Logo (High resolution, will be shown with rounded borders):
Current TVL:

0

Short Description (to be shown on DefiLlama):

Cross-chain swap aggregator powered by LI.FI routing. Swap any token across Ethereum, Arbitrum, Polygon, Optimism and BNB Chain in one click.

Category:

Aggregator

Github org/user:

kurzmichael02-hue

Summary by CodeRabbit

  • New Features
    • MultiMesh fee and revenue tracking added across Ethereum, Arbitrum, Polygon, Optimism, and BSC.
    • Provides daily aggregated metrics (Fees and Revenue) starting March 1, 2025, with methodology descriptions for each metric.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ab12ef5-04e5-40e0-846b-2b0b4dc24bd7

📥 Commits

Reviewing files that changed from the base of the PR and between 2a0c31a and 224f6ca.

📒 Files selected for processing (1)
  • fees/multimesh/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • fees/multimesh/index.ts

📝 Walkthrough

Walkthrough

New TypeScript adapter fees/multimesh/index.ts added; it fetches FeesCollected logs, filters by the MultiMesh integrator address, and aggregates daily fees (integrator + LI.FI fee) and daily revenue (integrator fee) across five chains starting 2025-03-01.

Changes

Cohort / File(s) Summary
MultiMesh Fee Adapter
fees/multimesh/index.ts
Added a new SimpleAdapter (version 2) that queries FeesCollected logs from a LI.FI fee collector (per-chain address), filters by _integrator, and aggregates dailyFees (_integratorFee + _lifiFee) and dailyRevenue (_integratorFee) per token. Configured for ETH, ARB, POLY, OPT, BSC; start date 2025-03-01; includes methodology strings.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Adapter as MultiMesh Adapter
    participant Blockchain as LI.FI Fee Collector

    Client->>Adapter: fetch(options)
    activate Adapter
    Adapter->>Blockchain: query `FeesCollected` logs (event ABI, chain-specific address)
    activate Blockchain
    Blockchain-->>Adapter: return logs (onlyArgs)
    deactivate Blockchain

    Adapter->>Adapter: filter logs by `_integrator` (MultiMesh)
    Adapter->>Adapter: aggregate per-token dailyFees (integratorFee + lifiFee)
    Adapter->>Adapter: aggregate per-token dailyRevenue (integratorFee)

    Adapter-->>Client: return { dailyFees, dailyRevenue }
    deactivate Adapter
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble logs beneath moonlit chains,
Counting integrator crumbs and LI.FI grains,
Five networks hum as numbers align,
Daily fees and revenue in a neat little line,
Hop—deployed from March, this burrow's fine. 🎋

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add MultiMesh fees adapter' clearly and concisely describes the main change: adding a new fees adapter module for the MultiMesh protocol.
Description check ✅ Passed The PR description includes key required information (Name, Twitter, Website, Short Description, Category, Github org/user) but is missing some template sections like audit links, logo, and optional fields. However, it provides sufficient detail for a new protocol listing, particularly for a fees adapter PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@llamabutler
Copy link
Copy Markdown

The multimesh adapter exports:

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

🦙 Running MULTIMESH adapter 🦙
---------------------------------------------------
Start Date:	Sun, 29 Mar 2026 07:29:35 GMT
End Date:	Mon, 30 Mar 2026 07:29:35 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Start Time
---       | ---        | ---           | ---       
ethereum  | 0.00       | 0.00          | 1/3/2025  
arbitrum  | 0.00       | 0.00          | 1/3/2025  
polygon   | 0.00       | 0.00          | 1/3/2025  
optimism  | 0.00       | 0.00          | 1/3/2025  
bsc       | 0.00       | 0.00          | 1/3/2025  
Aggregate | 0.00       | 0.00          |           

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@fees/multimesh/index.ts`:
- Line 4: The hardcoded LIFI_FEE_COLLECTOR constant is causing Arbitrum swaps to
be misattributed; replace the single address constant with chain-aware logic
that selects the LI.FI fee collector per chain (use CHAIN.ARBITRUM as a
detection case and the chain-specific address defined in the lifi aggregator
helper), e.g., add a function or map (referencing LIFI_FEE_COLLECTOR usage sites
and the CHAIN enum) and use it where the constant is read so Arbitrum uses
0xB021... while other chains use their respective collector.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c7d4a91f-4737-442d-a888-40becab29ddf

📥 Commits

Reviewing files that changed from the base of the PR and between 1d366dd and 2a0c31a.

📒 Files selected for processing (1)
  • fees/multimesh/index.ts

@llamabutler
Copy link
Copy Markdown

The multimesh adapter exports:

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

🦙 Running MULTIMESH adapter 🦙
---------------------------------------------------
Start Date:	Sun, 29 Mar 2026 07:38:48 GMT
End Date:	Mon, 30 Mar 2026 07:38:48 GMT
---------------------------------------------------

chain     | Daily fees | Daily revenue | Start Time
---       | ---        | ---           | ---       
ethereum  | 0.00       | 0.00          | 1/3/2025  
arbitrum  | 0.00       | 0.00          | 1/3/2025  
polygon   | 0.00       | 0.00          | 1/3/2025  
optimism  | 0.00       | 0.00          | 1/3/2025  
bsc       | 0.00       | 0.00          | 1/3/2025  
Aggregate | 0.00       | 0.00          |           

@bheluga bheluga self-assigned this Mar 30, 2026
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.

3 participants