Skip to content

feat: add evently fees adapter (MegaETH)#6335

Merged
FelixBruguera merged 4 commits intoDefiLlama:masterfrom
isonips:feat/add-evently
Apr 4, 2026
Merged

feat: add evently fees adapter (MegaETH)#6335
FelixBruguera merged 4 commits intoDefiLlama:masterfrom
isonips:feat/add-evently

Conversation

@isonips
Copy link
Copy Markdown
Contributor

@isonips isonips commented Apr 4, 2026

Rename Megamble → evently (evently.market)

Name (to be shown on DefiLlama):

evently

Twitter Link:

https://x.com/eventlymarket

List of audit links if any:

None yet (audit in progress with Pashov/CertiK)

Website Link:

https://evently.market

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

https://icons.llama.fi/evently.jpg

Current TVL:

(check https://evently.market)

Chain:

MegaETH

Short Description (to be shown on DefiLlama):

Fully onchain prediction markets on MegaETH. Trade your conviction on crypto, politics and more with instant liquidity via LMSR pricing.

Category:

Prediction Market

forkedFrom:

No

methodology:

TVL is the total USDM locked in evently prediction market contracts on MegaETH (contract: 0x7c56aa113be4a867936c55013b03387c7b9cd41a)

Github org/user:

isonips

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 2026

Warning

Rate limit exceeded

@FelixBruguera has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 39 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 39 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 85dfedfe-c72e-4a70-9be6-e7d6d544fa2d

📥 Commits

Reviewing files that changed from the base of the PR and between 2f39cf3 and fc87f57.

📒 Files selected for processing (1)
  • dexs/evently/index.ts

Walkthrough

Added a new evently adapter module for MegaETH Mainnet that calculates daily fees and volume by querying contract events (MarketFinalized and BetPlaced), computing metrics from treasury and creator fees. Removed the legacy megamble adapter from the codebase.

Changes

Cohort / File(s) Summary
New Evently Adapter
dexs/evently/index.ts
New adapter for evently (evently.market) on MegaETH chain. Implements fetch function that queries MarketFinalized events to compute daily fees and revenue splits, and BetPlaced events for trading volume. Exports adapter with version 2, hourly pull configuration, and detailed methodology for fees and revenue attribution.
Removed Megamble Adapter
fees/megamble.ts
Removed legacy adapter that previously tracked per-click fees from a MegaETH game contract, including fixed click price calculations and 15/10/5 revenue split logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

fees, dexs, methodology

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Income Statement Compliance ⚠️ Warning The adapter's mathematical income statement formula is correct (dailyRevenue + dailySupplySideRevenue = dailyFees), but it violates labeling conventions by using source labels instead of destination labels. Replace source labels (METRIC.TRADING_FEES, 'Market Creator Fees') with destination labels ('Trading Fees To Treasury', 'Trading Fees To Market Creators') and update breakdownMethodology keys accordingly. Clarify methodology strings from '% of fees' to '% of total pool at settlement'.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding an evently fees adapter for MegaETH, matching the PR's primary objective.
Description check ✅ Passed The PR description follows the repository template and includes all key protocol metadata: name, Twitter, website, logo, chain, category, and methodology.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Breakdown Methodology Check ✅ Passed All breakdown labels used in .add() calls have corresponding entries in breakdownMethodology, and breakdownMethodology is properly exported in the adapter.
Version 2 Required ✅ Passed The new evently adapter in dexs/evently/index.ts correctly exports version: 2 as required for new adapters. Line 61 explicitly declares version: 2 within the adapter object definition, and the file is properly exported as default export.

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

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

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 evently adapter exports:

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

🦙 Running EVENTLY adapter 🦙
---------------------------------------------------
Start Date:	Fri, 03 Apr 2026 07:57:17 GMT
End Date:	Sat, 04 Apr 2026 07:57:17 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775289436 (2026-04-04T07:57:16.000Z)

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: 3

🤖 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/evently/index.ts`:
- Around line 26-33: The loop currently sums treasuryFee and creatorFee into
dailyFees only; change it to add three labeled entries per log: add treasuryFee
to dailyRevenue (protocol) with a label (e.g., "treasury"), add creatorFee to
dailySupplySideRevenue (supply-side) with a label (e.g., "creator"), and still
add the combined amount to dailyFees; locate the loop that iterates
finalizedLogs and the balances created via options.createBalances(), and update
the .add(USDM, amount, "label") calls to use BigInt(log.treasuryFee.toString())
and BigInt(log.creatorFee.toString()) separately while also adding their sum to
dailyFees.
- Around line 60-67: The meta.methodology block currently documents Fees,
Revenue, and Volume but is missing a breakdownMethodology mapping for the
individual labels used in .add() calls (specifically the separated treasury and
creator fee labels); add a breakdownMethodology object alongside
meta.methodology that contains clear descriptions for each label used in .add()
(e.g., the treasury fee label, the creator fee label, and any other fee labels),
referencing the same label names used in the .add() calls so consumers can map
each metric to its description.
- Around line 46-51: The returned object currently sets dailyRevenue to
dailyFees which is incorrect; update the return in fees/evently/index.ts so that
dailyFees remains the gross fees, dailyUserFees (or dailySupplySideRevenue)
reflects creator/market fees as dailyFees * 0.02, and dailyRevenue reflects the
protocol/treasury portion as dailyFees * 0.03 (i.e., dailyRevenue = dailyFees *
0.03 and dailySupplySideRevenue/dailyUserFees = dailyFees * 0.02), keeping
dailyVolume unchanged and ensuring the property names used match the rest of the
adapter (dailyFees, dailyRevenue, dailySupplySideRevenue/dailyUserFees,
dailyVolume).
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 931a000a-983b-4c68-bab8-7160ec6b4cd5

📥 Commits

Reviewing files that changed from the base of the PR and between 48b81b3 and ebfe9c3.

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

Comment on lines +60 to +67
meta: {
methodology: {
Fees:
"5% of total pool at market finalization (3% treasury + 2% creator). Tracked via MarketFinalized event.",
Revenue: "Same as Fees — all fees go to treasury and market creators.",
Volume: "Sum of all bets placed on prediction markets (BetPlaced).",
},
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Add breakdownMethodology entries for fee labels.

Per coding guidelines, every label used in .add() calls must appear in a breakdownMethodology object with clear descriptions. After separating treasury and creator fees with labels, add corresponding entries:

♻️ Proposed methodology update
       meta: {
         methodology: {
           Fees:
             "5% of total pool at market finalization (3% treasury + 2% creator). Tracked via MarketFinalized event.",
-          Revenue: "Same as Fees — all fees go to treasury and market creators.",
+          Revenue: "3% treasury fee from finalized markets.",
+          SupplySideRevenue: "2% creator fee paid to market creators.",
           Volume: "Sum of all bets placed on prediction markets (BetPlaced).",
         },
+        breakdownMethodology: {
+          "Settlement Fees": "Total fees (5%) collected at market finalization",
+          "Settlement Fees To Treasury": "3% treasury fee retained by protocol",
+          "Settlement Fees To Creators": "2% creator fee paid to market creators",
+        },
       },

As per coding guidelines: "Include breakdownMethodology object in fees adapters that documents all labels used in .add() calls with clear descriptions."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@fees/evently/index.ts` around lines 60 - 67, The meta.methodology block
currently documents Fees, Revenue, and Volume but is missing a
breakdownMethodology mapping for the individual labels used in .add() calls
(specifically the separated treasury and creator fee labels); add a
breakdownMethodology object alongside meta.methodology that contains clear
descriptions for each label used in .add() (e.g., the treasury fee label, the
creator fee label, and any other fee labels), referencing the same label names
used in the .add() calls so consumers can map each metric to its description.

@FelixBruguera FelixBruguera self-assigned this Apr 4, 2026
@llamabutler
Copy link
Copy Markdown

The evently adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs evently

🦙 Running EVENTLY adapter 🦙
---------------------------------------------------
Start Date:	Fri, 03 Apr 2026 12:15:18 GMT
End Date:	Sat, 04 Apr 2026 12:15:18 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775304917 (2026-04-04T12:15:17.000Z)

@llamabutler
Copy link
Copy Markdown

The evently adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs evently

🦙 Running EVENTLY adapter 🦙
---------------------------------------------------
Start Date:	Fri, 03 Apr 2026 12:00:00 GMT
End Date:	Sat, 04 Apr 2026 12:00:00 GMT
---------------------------------------------------

Slice 0:
Start Date:	Fri, 03 Apr 2026 12:00:00 GMT
End Date:	Fri, 03 Apr 2026 13:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775221199 (2026-04-03T12:59:59.000Z)


Slice 1:
Start Date:	Fri, 03 Apr 2026 13:00:00 GMT
End Date:	Fri, 03 Apr 2026 14:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775224799 (2026-04-03T13:59:59.000Z)


Slice 2:
Start Date:	Fri, 03 Apr 2026 14:00:00 GMT
End Date:	Fri, 03 Apr 2026 15:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775228399 (2026-04-03T14:59:59.000Z)


Slice 3:
Start Date:	Fri, 03 Apr 2026 15:00:00 GMT
End Date:	Fri, 03 Apr 2026 16:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775231999 (2026-04-03T15:59:59.000Z)


Slice 4:
Start Date:	Fri, 03 Apr 2026 16:00:00 GMT
End Date:	Fri, 03 Apr 2026 17:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775235599 (2026-04-03T16:59:59.000Z)


Slice 5:
Start Date:	Fri, 03 Apr 2026 17:00:00 GMT
End Date:	Fri, 03 Apr 2026 18:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775239199 (2026-04-03T17:59:59.000Z)


Slice 6:
Start Date:	Fri, 03 Apr 2026 18:00:00 GMT
End Date:	Fri, 03 Apr 2026 19:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775242799 (2026-04-03T18:59:59.000Z)


Slice 7:
Start Date:	Fri, 03 Apr 2026 19:00:00 GMT
End Date:	Fri, 03 Apr 2026 20:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775246399 (2026-04-03T19:59:59.000Z)


Slice 8:
Start Date:	Fri, 03 Apr 2026 20:00:00 GMT
End Date:	Fri, 03 Apr 2026 21:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775249999 (2026-04-03T20:59:59.000Z)


Slice 9:
Start Date:	Fri, 03 Apr 2026 21:00:00 GMT
End Date:	Fri, 03 Apr 2026 22:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775253599 (2026-04-03T21:59:59.000Z)


Slice 10:
Start Date:	Fri, 03 Apr 2026 22:00:00 GMT
End Date:	Fri, 03 Apr 2026 23:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775257199 (2026-04-03T22:59:59.000Z)


Slice 11:
Start Date:	Fri, 03 Apr 2026 23:00:00 GMT
End Date:	Sat, 04 Apr 2026 00:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775260799 (2026-04-03T23:59:59.000Z)


Slice 12:
Start Date:	Sat, 04 Apr 2026 00:00:00 GMT
End Date:	Sat, 04 Apr 2026 01:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775264399 (2026-04-04T00:59:59.000Z)


Slice 13:
Start Date:	Sat, 04 Apr 2026 01:00:00 GMT
End Date:	Sat, 04 Apr 2026 02:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775267999 (2026-04-04T01:59:59.000Z)


Slice 14:
Start Date:	Sat, 04 Apr 2026 02:00:00 GMT
End Date:	Sat, 04 Apr 2026 03:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775271599 (2026-04-04T02:59:59.000Z)


Slice 15:
Start Date:	Sat, 04 Apr 2026 03:00:00 GMT
End Date:	Sat, 04 Apr 2026 04:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775275199 (2026-04-04T03:59:59.000Z)


Slice 16:
Start Date:	Sat, 04 Apr 2026 04:00:00 GMT
End Date:	Sat, 04 Apr 2026 05:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775278799 (2026-04-04T04:59:59.000Z)


Slice 17:
Start Date:	Sat, 04 Apr 2026 05:00:00 GMT
End Date:	Sat, 04 Apr 2026 06:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775282399 (2026-04-04T05:59:59.000Z)


Slice 18:
Start Date:	Sat, 04 Apr 2026 06:00:00 GMT
End Date:	Sat, 04 Apr 2026 07:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775285999 (2026-04-04T06:59:59.000Z)


Slice 19:
Start Date:	Sat, 04 Apr 2026 07:00:00 GMT
End Date:	Sat, 04 Apr 2026 08:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775289599 (2026-04-04T07:59:59.000Z)


Slice 20:
Start Date:	Sat, 04 Apr 2026 08:00:00 GMT
End Date:	Sat, 04 Apr 2026 09:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775293199 (2026-04-04T08:59:59.000Z)


Slice 21:
Start Date:	Sat, 04 Apr 2026 09:00:00 GMT
End Date:	Sat, 04 Apr 2026 10:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775296799 (2026-04-04T09:59:59.000Z)


Slice 22:
Start Date:	Sat, 04 Apr 2026 10:00:00 GMT
End Date:	Sat, 04 Apr 2026 11:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775300399 (2026-04-04T10:59:59.000Z)


Slice 23:
Start Date:	Sat, 04 Apr 2026 11:00:00 GMT
End Date:	Sat, 04 Apr 2026 12:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775303999 (2026-04-04T11:59:59.000Z)



====== TOTAL DAILY AGGREGATED (sum of slots per chain) ======

MEGAETH 👇
End timestamp: 1775303999 (2026-04-04T11:59:59.000Z)
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 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: 2

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

Inline comments:
In `@dexs/evently/index.ts`:
- Around line 72-73: The wording for Revenue and SupplySideRevenue is
misleading: update the string values for the keys Revenue and SupplySideRevenue
in dexs/evently/index.ts to state that the percentages apply to the total
settlement pool (e.g., "3% of the total settlement pool at settlement" and "2%
of the total settlement pool at settlement") so the description matches the
implementation that treats these as percentages of the total pool rather than
"of the fees."
- Around line 35-37: Change the labels used when recording revenue destinations:
instead of passing the source label METRIC.TRADING_FEES into dailyRevenue.add
and dailySupplySideRevenue.add, use destination-specific labels such as "Trading
Fees To Treasury" (for dailyRevenue) and "Trading Fees To Market Creators" (for
dailySupplySideRevenue) while keeping dailyFees.add using the source label
METRIC.TRADING_FEES; also update the corresponding breakdownMethodology keys to
match these new destination labels so the revenue dimension keys are consistent
with the added labels (refer to the dailyFees, dailyRevenue,
dailySupplySideRevenue add calls and breakdownMethodology entries).
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 298cdc36-a752-4254-9c34-e094c9037c24

📥 Commits

Reviewing files that changed from the base of the PR and between ebfe9c3 and 2f39cf3.

📒 Files selected for processing (2)
  • dexs/evently/index.ts
  • fees/megamble.ts
💤 Files with no reviewable changes (1)
  • fees/megamble.ts

Comment on lines +35 to +37
dailyFees.add(USDM, treasuryFee + creatorFee, METRIC.TRADING_FEES);
dailyRevenue.add(USDM, treasuryFee, METRIC.TRADING_FEES);
dailySupplySideRevenue.add(USDM, creatorFee, "Market Creator Fees")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use destination-specific labels for revenue dimensions.

dailyRevenue currently uses a source label (METRIC.TRADING_FEES). For income-statement consistency, dailyRevenue and dailySupplySideRevenue should use destination labels (e.g., “...To Treasury”, “...To Market Creators”), and breakdownMethodology keys should match.

🔧 Proposed label fix
-    dailyRevenue.add(USDM, treasuryFee, METRIC.TRADING_FEES);
-    dailySupplySideRevenue.add(USDM, creatorFee, "Market Creator Fees")
+    dailyRevenue.add(USDM, treasuryFee, "Trading Fees To Treasury");
+    dailySupplySideRevenue.add(USDM, creatorFee, "Trading Fees To Market Creators")
...
-    Revenue: {
-      [METRIC.TRADING_FEES]: "3% treasury fee from finalized markets",
-    },
+    Revenue: {
+      "Trading Fees To Treasury": "Treasury share from finalized market trading fees",
+    },
...
-    SupplySideRevenue: {
-      "Market Creator Fees": "2% creator fee paid to market creators from finalized markets",
-    },
+    SupplySideRevenue: {
+      "Trading Fees To Market Creators": "Creator share from finalized market trading fees",
+    },

Based on learnings: "Always provide breakdown labels even when there is only one source/destination of fees. Use source-of-fees labels for dailyFees ... Use detailed destination labels for dailyRevenue/dailySupplySideRevenue."

Also applies to: 80-85

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dexs/evently/index.ts` around lines 35 - 37, Change the labels used when
recording revenue destinations: instead of passing the source label
METRIC.TRADING_FEES into dailyRevenue.add and dailySupplySideRevenue.add, use
destination-specific labels such as "Trading Fees To Treasury" (for
dailyRevenue) and "Trading Fees To Market Creators" (for dailySupplySideRevenue)
while keeping dailyFees.add using the source label METRIC.TRADING_FEES; also
update the corresponding breakdownMethodology keys to match these new
destination labels so the revenue dimension keys are consistent with the added
labels (refer to the dailyFees, dailyRevenue, dailySupplySideRevenue add calls
and breakdownMethodology entries).

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@llamabutler
Copy link
Copy Markdown

The evently adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs evently

🦙 Running EVENTLY adapter 🦙
---------------------------------------------------
Start Date:	Fri, 03 Apr 2026 12:00:00 GMT
End Date:	Sat, 04 Apr 2026 12:00:00 GMT
---------------------------------------------------

Slice 0:
Start Date:	Fri, 03 Apr 2026 12:00:00 GMT
End Date:	Fri, 03 Apr 2026 13:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775221199 (2026-04-03T12:59:59.000Z)


Slice 1:
Start Date:	Fri, 03 Apr 2026 13:00:00 GMT
End Date:	Fri, 03 Apr 2026 14:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775224799 (2026-04-03T13:59:59.000Z)


Slice 2:
Start Date:	Fri, 03 Apr 2026 14:00:00 GMT
End Date:	Fri, 03 Apr 2026 15:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775228399 (2026-04-03T14:59:59.000Z)


Slice 3:
Start Date:	Fri, 03 Apr 2026 15:00:00 GMT
End Date:	Fri, 03 Apr 2026 16:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775231999 (2026-04-03T15:59:59.000Z)


Slice 4:
Start Date:	Fri, 03 Apr 2026 16:00:00 GMT
End Date:	Fri, 03 Apr 2026 17:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775235599 (2026-04-03T16:59:59.000Z)


Slice 5:
Start Date:	Fri, 03 Apr 2026 17:00:00 GMT
End Date:	Fri, 03 Apr 2026 18:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775239199 (2026-04-03T17:59:59.000Z)


Slice 6:
Start Date:	Fri, 03 Apr 2026 18:00:00 GMT
End Date:	Fri, 03 Apr 2026 19:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775242799 (2026-04-03T18:59:59.000Z)


Slice 7:
Start Date:	Fri, 03 Apr 2026 19:00:00 GMT
End Date:	Fri, 03 Apr 2026 20:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775246399 (2026-04-03T19:59:59.000Z)


Slice 8:
Start Date:	Fri, 03 Apr 2026 20:00:00 GMT
End Date:	Fri, 03 Apr 2026 21:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775249999 (2026-04-03T20:59:59.000Z)


Slice 9:
Start Date:	Fri, 03 Apr 2026 21:00:00 GMT
End Date:	Fri, 03 Apr 2026 22:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775253599 (2026-04-03T21:59:59.000Z)


Slice 10:
Start Date:	Fri, 03 Apr 2026 22:00:00 GMT
End Date:	Fri, 03 Apr 2026 23:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775257199 (2026-04-03T22:59:59.000Z)


Slice 11:
Start Date:	Fri, 03 Apr 2026 23:00:00 GMT
End Date:	Sat, 04 Apr 2026 00:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775260799 (2026-04-03T23:59:59.000Z)


Slice 12:
Start Date:	Sat, 04 Apr 2026 00:00:00 GMT
End Date:	Sat, 04 Apr 2026 01:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775264399 (2026-04-04T00:59:59.000Z)


Slice 13:
Start Date:	Sat, 04 Apr 2026 01:00:00 GMT
End Date:	Sat, 04 Apr 2026 02:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775267999 (2026-04-04T01:59:59.000Z)


Slice 14:
Start Date:	Sat, 04 Apr 2026 02:00:00 GMT
End Date:	Sat, 04 Apr 2026 03:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775271599 (2026-04-04T02:59:59.000Z)


Slice 15:
Start Date:	Sat, 04 Apr 2026 03:00:00 GMT
End Date:	Sat, 04 Apr 2026 04:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775275199 (2026-04-04T03:59:59.000Z)


Slice 16:
Start Date:	Sat, 04 Apr 2026 04:00:00 GMT
End Date:	Sat, 04 Apr 2026 05:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775278799 (2026-04-04T04:59:59.000Z)


Slice 17:
Start Date:	Sat, 04 Apr 2026 05:00:00 GMT
End Date:	Sat, 04 Apr 2026 06:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775282399 (2026-04-04T05:59:59.000Z)


Slice 18:
Start Date:	Sat, 04 Apr 2026 06:00:00 GMT
End Date:	Sat, 04 Apr 2026 07:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775285999 (2026-04-04T06:59:59.000Z)


Slice 19:
Start Date:	Sat, 04 Apr 2026 07:00:00 GMT
End Date:	Sat, 04 Apr 2026 08:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775289599 (2026-04-04T07:59:59.000Z)


Slice 20:
Start Date:	Sat, 04 Apr 2026 08:00:00 GMT
End Date:	Sat, 04 Apr 2026 09:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775293199 (2026-04-04T08:59:59.000Z)


Slice 21:
Start Date:	Sat, 04 Apr 2026 09:00:00 GMT
End Date:	Sat, 04 Apr 2026 10:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775296799 (2026-04-04T09:59:59.000Z)


Slice 22:
Start Date:	Sat, 04 Apr 2026 10:00:00 GMT
End Date:	Sat, 04 Apr 2026 11:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775300399 (2026-04-04T10:59:59.000Z)


Slice 23:
Start Date:	Sat, 04 Apr 2026 11:00:00 GMT
End Date:	Sat, 04 Apr 2026 12:00:00 GMT
---------------------------------------------------

MEGAETH 👇
Backfill start time: 1/3/2025
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00
End timestamp: 1775303999 (2026-04-04T11:59:59.000Z)



====== TOTAL DAILY AGGREGATED (sum of slots per chain) ======

MEGAETH 👇
End timestamp: 1775303999 (2026-04-04T11:59:59.000Z)
Daily fees: 0.00
Daily user fees: 0.00
Daily supply side revenue: 0.00
Daily revenue: 0.00
Daily volume: 0.00

@FelixBruguera FelixBruguera merged commit 49cf77d into DefiLlama:master Apr 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants