Skip to content

nabla: add supply-side revenue - #8866

Merged
bheluga merged 1 commit into
DefiLlama:masterfrom
DaniiRix:fix/nabla
Aug 19, 2026
Merged

nabla: add supply-side revenue#8866
bheluga merged 1 commit into
DefiLlama:masterfrom
DaniiRix:fix/nabla

Conversation

@DaniiRix

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 838807a8-a316-4e12-b0b8-f25801457217

📥 Commits

Reviewing files that changed from the base of the PR and between fc1f41c and 8a0fb96.

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

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Summary by CodeRabbit

  • New Features
    • Added detailed breakdowns for swap fees, protocol revenue, and liquidity provider/backstop allocations.
    • Added daily supply-side revenue results.
    • Exposed breakdown methodology details in the adapter configuration.
  • Documentation
    • Expanded methodology descriptions for fee and revenue metrics.

Walkthrough

The Nabla adapter now classifies swap fees, protocol fees, LP fees, and backstop depositor fees. It returns daily supply-side revenue and exposes methodology descriptions for the new metric breakdowns.

Changes

Nabla revenue breakdown

Layer / File(s) Summary
Fee accounting and results
dexs/nabla/index.ts
The adapter assigns fee metrics, records protocol fees separately, tracks LP and backstop allocations as supply-side revenue, and returns dailySupplySideRevenue.
Breakdown methodology
dexs/nabla/index.ts
The adapter documents protocol and supply-side revenue allocations and exposes breakdownMethodology in its configuration.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 8a0fb

No actionable merge-blocking risk remains; the change is merge-ready after normal checks and review.

Possibly related PRs

Suggested labels: dexs, methodology

🚥 Pre-merge checks | ✅ 12 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes the supply-side revenue change but does not follow the required format: [type] protocol-name - description. Rename the title to include a type prefix, protocol name, and hyphen-separated description, such as "[fix] nabla - add supply-side revenue".
Description check ⚠️ Warning No pull request description was provided, so the change lacks a summary or reason for this non-listing update. Add a brief description of the supply-side revenue changes, including the affected metrics and methodology updates.
Methodology Keys ❓ Inconclusive The changed methodology includes UserFees, which is not in the custom check's explicit allowed-name list; repository conventions also use UserFees, so the rule's treatment is unclear. Clarify whether UserFees is an allowed dimension display name, then reassess the changed methodology object.
✅ Passed checks (12 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Breakdown Methodology Check ✅ Passed All five labeled .add() calls match entries under Fees, UserFees, Revenue, ProtocolRevenue, or SupplySideRevenue; breakdownMethodology is included in the exported adapter.
Income Statement Compliance ✅ Passed The diff sums LP, backstop, and protocol fees into dailyFees, assigns protocolFees to dailyRevenue, and assigns LP plus backstop fees to dailySupplySideRevenue; the required identity holds.
Version 2 Required ✅ Passed The diff updates existing dexs/nabla/index.ts, and both base and PR versions export version: 2; the Version 2 requirement is satisfied.
Pullhourly Required For Version 2 ✅ Passed Nabla is version 2 and explicitly sets pullHourly: true; the PR diff leaves this declaration unchanged.
Dune Adapters Are Version 1 ✅ Passed The changed Nabla adapter uses options.getLogs and has no Dune helper, queryDune, or TIME_RANGE references; its existing version: 2 is therefore outside this check.
Income Statement Balance ✅ Passed The patch sets dailyFees to protocolFees plus LP and backstop fees, and records the latter two as dailySupplySideRevenue; dailyRevenue aliases dailyProtocolRevenue.
Fetchoptions Usage ✅ Passed Nabla uses const fetch = async (options: FetchOptions), and changed code uses options.getLogs; no raw timestamp/block math, timestamp result field, or unused fetch argument is present.
Adapter Shape ✅ Passed The PR leaves the adapter and per-chain config unchanged from HEAD^; it only adds metric outputs and breakdownMethodology, so it introduces no adapter-shape failure.
Efficiency And Error Handling ✅ Passed The diff uses targeted getLogs calls with readable eventAbi, retains api.multiCall batching, adds no raw topics or allowNegativeValue, and leaves the existing fallback catch unchanged.
✨ 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.

@github-actions

Copy link
Copy Markdown

The nabla adapter exports:

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

chain       | Daily fees | Daily user fees | Daily revenue | Daily protocol revenue | Daily supply side revenue | Daily volume
---         | ---        | ---             | ---           | ---                    | ---                       | ---         
arbitrum    | 0.00       | 0.00            | 0.00          | 0.00                   | 0.00                      | 0.00        
base        | 0.00       | 0.00            | 0.00          | 0.00                   | 0.00                      | 0.00        
berachain   | 0.00       | 0.00            | 0.00          | 0.00                   | 0.00                      | 0.00        
hyperliquid | 185.35     | 185.35          | 0.00          | 0.00                   | 185.35                    | 184.06 k    
monad       | 0.00       | 0.00            | 0.00          | 0.00                   | 0.00                      | 0.00        
Aggregate   | 185.35     | 185.35          | 0.00          | 0.00                   | 185.35                    | 184.06 k    



FEES BREAKDOWN 👇

label                            | Daily fees | Daily supply side revenue
---                              | ---        | ---                      
Token Swap Fees                  | 185.351    |                          
Swap Fees To Backstop Depositors |            | 165.76610000000002       
Swap Fees To LPs                 |            | 18.433900000000005       

@bheluga
bheluga merged commit 74ddaa8 into DefiLlama:master Aug 19, 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.

2 participants