Skip to content

Hydration: Add revenue streams + fix fee calculation#6388

Merged
bheluga merged 3 commits intoDefiLlama:masterfrom
green-jay:hydration-fees-fix
Apr 16, 2026
Merged

Hydration: Add revenue streams + fix fee calculation#6388
bheluga merged 3 commits intoDefiLlama:masterfrom
green-jay:hydration-fees-fix

Conversation

@green-jay
Copy link
Copy Markdown
Contributor

No description provided.

@green-jay green-jay changed the title Add revenue streams + fix fee calculation Hydration: Add revenue streams + fix fee calculation Apr 14, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51235d3e-9afe-48cd-9ee4-0adbf70f266f

📥 Commits

Reviewing files that changed from the base of the PR and between 784fb38 and 3ac78f6.

📒 Files selected for processing (2)
  • dexs/hydradx/index.ts
  • fees/hydradx.ts

Summary by CodeRabbit

  • New Features

    • Added daily holders revenue tracking for HydraX protocol
    • Introduced detailed fee breakdown documentation with allocation methodology
  • Updates

    • Updated Omnipool fee distribution (50/50 split between liquidity providers and token holders)
    • Enhanced protocol revenue computation with improved accuracy

Walkthrough

Refactors Omnipool fee allocation to split asset vs protocol fees and allocate holders/LPs, and adds external protocol-fee streams plus HOLLAR borrow-interest capture to the HydraDX fee adapter. Methodology strings and breakdown mappings were updated accordingly.

Changes

Cohort / File(s) Summary
Omnipool fee rework
dexs/hydradx/index.ts
Replaced prior Omnipool fee routing with decomposition into assetFee (80%) and protocolFee (20%). assetFee is split 50/50 to LPs (dailySupplySideRevenue) and holders (dailyHoldersRevenue / dailyRevenue). protocolFee goes to dailyProtocolRevenue. Updated methodology/breakdown text and keys; removed H2O-burn/Hydration DEX routing.
External fee streams & HOLLAR handling
fees/hydradx.ts
Added FEES_API + fetchProtocolStream(...) to pull 24h period aggregates for extra protocol streams; aggregated results into dailyFees and protocol revenue labels. Special-case logic for HOLLAR reserve: compute daily borrow-interest from totalDebt and borrowRate, convert to USD, add to dailyFees (BORROW_INTEREST) and dailyProtocolRevenue. Updated loops to continue for HOLLAR to avoid double-counting. Added breakdownMethodology to adapter export.

Sequence Diagram(s)

sequenceDiagram
    participant Adapter
    participant FEES_API
    participant ChainData
    participant PricingService
    Adapter->>FEES_API: fetchProtocolStream(productType, streamType, 24h)
    FEES_API-->>Adapter: periodAggregate (>=0)
    Adapter->>ChainData: read reserves, totalDebt, borrowRate
    ChainData-->>Adapter: reserve data (including HOLLAR)
    Adapter->>PricingService: convert amounts to USD
    PricingService-->>Adapter: USD values
    Adapter->>Adapter: compute assetFee/protocolFee, split to LPs/holders, add protocol streams, add HOLLAR borrow-interest
    Adapter-->>Adapter: populate dailyFees, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

fees

🚥 Pre-merge checks | ✅ 1 | ❌ 5

❌ Failed checks (4 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided; the PR is missing all required sections and context about the changes. Add a comprehensive description explaining the changes: Omnipool fee split methodology, HOLLAR borrow interest calculation, new protocol fee streams integration, and any breaking changes or test coverage updates.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 50.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Breakdown Methodology Check ⚠️ Warning The pull request fails the Breakdown Methodology Check on both modified files: fees/hydradx.ts exports no breakdownMethodology object despite introducing three labeled streams, and dexs/hydradx/index.ts lacks a HoldersRevenue section for 'Omnipool Asset Fees To Stakers & Referrals'. Add breakdownMethodology object to fees/hydradx.ts documenting all three labeled streams; add HoldersRevenue section to dexs/hydradx/index.ts for missing label; include breakdownMethodology in default exports.
Version 2 Required ⚠️ Warning New adapter dexs/hydradx/index.ts exports version 1 instead of required version 2 format. Update dexs/hydradx/index.ts to export version 2 to comply with new adapter versioning requirements.
Title check ❓ Inconclusive The title is vague and generic; it doesn't follow the required format and lacks specificity about what fee calculation was fixed or which revenue streams were added. Update title to follow format '[type] hydration - description' with specific details, such as '[feat] hydration - add revenue streams and fix Omnipool/HOLLAR fee calculations'.
✅ Passed checks (1 passed)
Check name Status Explanation
Income Statement Compliance ✅ Passed Both adapters correctly implement Income Statement Compliance with the fundamental equation dailyRevenue = dailyFees - dailySupplySideRevenue satisfied across all fee streams.

✏️ 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.

@github-actions
Copy link
Copy Markdown

The hydradx adapter exports:

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

🦙 Running HYDRADX adapter 🦙
---------------------------------------------------
Start Date:	Mon, 13 Apr 2026 00:00:00 GMT
End Date:	Tue, 14 Apr 2026 00:00:00 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 28/4/2024
Daily volume: 5.17 M
Daily fees: 2.54 k
Daily revenue: 1.22 k
Daily supply side revenue: 1.32 k
Daily holders revenue: 813.00
Daily protocol revenue: 406.00

@github-actions
Copy link
Copy Markdown

The hydradx.ts adapter exports:

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

🦙 Running HYDRADX.TS adapter 🦙
---------------------------------------------------
Start Date:	Mon, 13 Apr 2026 04:41:16 GMT
End Date:	Tue, 14 Apr 2026 04:41:16 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 26/11/2024
Daily fees: 2.42 k
Daily revenue: 947.00
Daily protocol revenue: 947.00
Daily supply side revenue: 1.47 k
End timestamp: 1776141675 (2026-04-14T04:41:15.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: 4

🤖 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/hydradx/index.ts`:
- Line 55: The fee label "Omnipool Asset Fees To Stakers & Referrals" used in
dailyHoldersRevenue.addUSDValue (and similar labels used in the other add()
calls around lines 93-110) is missing from the breakdownMethodology object; add
a HoldersRevenue section to breakdownMethodology that includes entries for each
new labeled series (e.g., "Omnipool Asset Fees To Stakers & Referrals") and map
them to the appropriate implementation/description per the adapter guideline so
every label used by dailyHoldersRevenue.addUSDValue and other .add() calls is
present in breakdownMethodology; update the breakdownMethodology constant in
this file to include these HoldersRevenue mappings.
- Around line 46-62: The current code hardcodes an 80/20 asset/protocol split
and routes all protocol fees to Treasury and the entire non‑LP asset half to
holders; instead, read the actual runtime/config values exposed by the node
(e.g., fields on node such as omnipoolFeeVolNorm, BurnProtocolFee, and any
referral/trader/staker split or referral tier config) and compute splits
dynamically: compute omnipoolFee from node.omnipoolFeeVolNorm, derive
protocolFee proportion using the runtime BurnProtocolFee (split protocolFee into
burned vs treasury per BurnProtocolFee) and derive assetFee = omnipoolFee -
protocolFee, then record revenues by calling
dailySupplySideRevenue.addUSDValue(assetFee * 0.5, ...) for LPs and allocate the
remaining assetFee * 0.5 across
dailyHoldersRevenue/dailyReferralRevenue/dailyTraderRevenue according to the
runtime referral/tier split (or a configurable fallback if the runtime split is
not present); update dailyProtocolRevenue.addUSDValue to only include the
treasury portion (not the burned portion) and log or expose when you must use a
documented default fallback so the split isn’t silently hardcoded.

In `@fees/hydradx.ts`:
- Around line 154-166: The new protocol streams added via EXTRA_PROTOCOL_STREAMS
(labels: "Liquidation Penalty", "PEPL Liquidation Profit", "HSM Revenue") are
recorded with dailyFees.addUSDValue and dailyProtocolRevenue.addUSDValue but are
not documented in the adapter's breakdownMethodology, violating the
label→methodology contract; add entries for each of these labels to the fees
adapter's breakdownMethodology object with concise descriptions and link them to
the corresponding implementation (e.g., mention EXTRA_PROTOCOL_STREAMS usage),
ensuring every label used in .add()/.addUSDValue calls appears in
breakdownMethodology.
- Around line 81-95: The HOLLAR borrow-interest block (use HOLLAR, hollarIndex,
totalDebt, borrowRate) currently adds amounts to dailyFees and
dailyProtocolRevenue without explicit labels; update the calls so
dailyFees.addUSDValue uses a clear source label like "Borrow Interest" and
dailyProtocolRevenue.addUSDValue uses a source→destination label like "Borrow
Interest → Treasury" (or "Borrow Interest To Treasury") and apply the same
labeling convention to the analogous block around lines 154–166 (where
liquidation/other revenue is recorded) so every .add/.addUSDValue call includes
explicit source for fees and source→destination for protocol revenue.
🪄 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: 56167f78-b2f5-49a7-8923-e037a059effd

📥 Commits

Reviewing files that changed from the base of the PR and between 3f72dfb and 784fb38.

📒 Files selected for processing (2)
  • dexs/hydradx/index.ts
  • fees/hydradx.ts

Comment thread dexs/hydradx/index.ts
Comment on lines +46 to +62
// Omnipool has two independent fee types combined in omnipoolFeeVolNorm:
// Asset fee (≈80% of total): 50% stays in pool → LPs, 50% → Referral pallet (stakers/referrers/traders)
// Protocol fee (≈20% of total): 100% → Treasury (BurnProtocolFee = 0% in runtime)
// Ratio approximated from fee ranges: asset 0.15-5%, protocol 0.05-0.25%
const omnipoolFee = Number(node.omnipoolFeeVolNorm);
const assetFee = omnipoolFee * 0.8;
const protocolFee = omnipoolFee * 0.2;

dailySupplySideRevenue.addUSDValue(assetFee * 0.5, 'Omnipool Asset Fees To LPs');
dailyHoldersRevenue.addUSDValue(assetFee * 0.5, 'Omnipool Asset Fees To Stakers & Referrals');

// BurnProtocolFee = 0% in runtime (hydration-node/runtime/hydradx/src/assets.rs)
// 100% of protocol fee goes to Treasury; nothing is burned currently
dailyProtocolRevenue.addUSDValue(protocolFee, 'Omnipool Protocol Fees To Treasury');

dailyProtocolRevenue.addUSDValue(revenueProtocol, 'Omni Pool Fees To Hydration DEX');
dailyRevenue.addUSDValue(assetFee * 0.5, 'Omnipool Asset Fees To Stakers & Referrals');
dailyRevenue.addUSDValue(protocolFee, 'Omnipool Protocol Fees To Treasury');
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Apr 14, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

The Omnipool split is hardcoded against a fee model that is not fixed.

Hydration’s public docs describe Omnipool asset fees as 50% to LPs and 50% split across stakers/referrers/traders depending on referral state/tier, while protocol fees are described as half burned and half sent to Treasury. The runtime also exposes a non-zero BurnProtocolFee. Hardcoding omnipoolFeeVolNorm into a fixed 80/20 asset/protocol split and then routing all protocol fees to Treasury will overstate dailyRevenue/dailyProtocolRevenue, and booking the whole non-LP asset-fee half into dailyHoldersRevenue also misclassifies referral/trader payouts. (docs.hydration.net)

As per coding guidelines, "Use web search to verify protocol's fee structure if unclear."

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

In `@dexs/hydradx/index.ts` around lines 46 - 62, The current code hardcodes an
80/20 asset/protocol split and routes all protocol fees to Treasury and the
entire non‑LP asset half to holders; instead, read the actual runtime/config
values exposed by the node (e.g., fields on node such as omnipoolFeeVolNorm,
BurnProtocolFee, and any referral/trader/staker split or referral tier config)
and compute splits dynamically: compute omnipoolFee from
node.omnipoolFeeVolNorm, derive protocolFee proportion using the runtime
BurnProtocolFee (split protocolFee into burned vs treasury per BurnProtocolFee)
and derive assetFee = omnipoolFee - protocolFee, then record revenues by calling
dailySupplySideRevenue.addUSDValue(assetFee * 0.5, ...) for LPs and allocate the
remaining assetFee * 0.5 across
dailyHoldersRevenue/dailyReferralRevenue/dailyTraderRevenue according to the
runtime referral/tier split (or a configurable fallback if the runtime split is
not present); update dailyProtocolRevenue.addUSDValue to only include the
treasury portion (not the burned portion) and log or expose when you must use a
documented default fallback so the split isn’t silently hardcoded.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changes are done according to the actual code. Docs are not up to date with latest changes.

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.

@green-jay, thanks for the clarification! That makes sense — if the runtime currently has BurnProtocolFee = 0% (as referenced in hydration-node/runtime/hydradx/src/assets.rs) and the docs haven't caught up, then the implementation accurately reflects on-chain behavior. The 80/20 asset/protocol approximation derived from the documented fee ranges (asset: 0.15–5%, protocol: 0.05–0.25%) is a reasonable pragmatic approach given the indexer doesn't expose the split directly.

I'll note this for future reviews.


✏️ Learnings added
Learnt from: green-jay
Repo: DefiLlama/dimension-adapters PR: 6388
File: dexs/hydradx/index.ts:46-62
Timestamp: 2026-04-14T07:51:22.331Z
Learning: In DefiLlama/dimension-adapters, the Hydration DEX (`dexs/hydradx/index.ts`) Omnipool fee split uses a hardcoded 80/20 approximation (assetFee = 80%, protocolFee = 20%) derived from the runtime fee ranges (asset fee: 0.15–5%, protocol fee: 0.05–0.25%). `BurnProtocolFee` is currently set to 0% in the runtime (`hydration-node/runtime/hydradx/src/assets.rs`), so 100% of protocol fees go to Treasury with nothing burned. The official docs may describe an older model (half burned / half treasury) and should not be used as reference. The assetFee is split 50/50 between LPs (`dailySupplySideRevenue`) and stakers/referrals (`dailyHoldersRevenue`).

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include `dailyHoldersRevenue` dimension when applicable - represents all value to token holders including buybacks, burns, distributions, external airdrops, and bribes

Learnt from: CopsLikeDonuts
Repo: DefiLlama/dimension-adapters PR: 6353
File: fees/thorwallet/index.ts:18-23
Timestamp: 2026-04-08T11:58:26.321Z
Learning: In DefiLlama/dimension-adapters, THORWallet (`fees/thorwallet/index.ts`) collects only affiliate fees from swaps and perpetual close fees. There are no supply-side parties (no LPs, lenders, stakers, or external integrators), so 100% of collected fees are protocol revenue. `dailyRevenue = dailyFees` is correct and intentional. The `dailyProtocolRevenue` (~45%) and `dailyHoldersRevenue` (~50%) entries represent internal allocations, not cost-of-funds, so `dailySupplySideRevenue` should not be added to this adapter.

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: GUIDELINES.md:0-0
Timestamp: 2026-04-03T10:25:08.836Z
Learning: For Fees adapters: must provide `dailyFees` (all fees from all sources - Gross Protocol Revenue), `dailyRevenue` (portion kept by protocol), and when applicable `dailySupplySideRevenue` (portion to LPs, lenders, stakers, integrators, referrers, creators). Optionally provide `dailyUserFees`, `dailyProtocolRevenue`, and `dailyHoldersRevenue`

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include `dailySupplySideRevenue` dimension when applicable - maps to Cost of Funds and represents portion to LPs, lenders, stakers, integrators, referrers, creators

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include `dailyProtocolRevenue` dimension when applicable - represents portion allocated to treasury

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include external tokenholder income in `dailyHoldersRevenue` such as airdrops and bribes from other protocols

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: aggregator-derivatives/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:05:47.814Z
Learning: Applies to aggregator-derivatives/**/*.{js,ts,tsx} : If the derivatives aggregator charges fees, track `dailyFees` (all fees collected), `dailyRevenue` (aggregator's portion), and `dailySupplySideRevenue` (partner/integration fees) following the guidelines in `fees/GUIDELINES.md`

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-03-30T12:07:15.631Z
Learning: Applies to **/*adapter*.{ts,js} : For fees adapters: verify dailyFees represents Gross Protocol Revenue (all potential fees), dailyRevenue represents Gross Profit (protocol's portion), and dailySupplySideRevenue represents Cost of Funds (supplier payments). Ensure dailyRevenue = dailyFees - dailySupplySideRevenue conceptually.

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: dexs/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:25.918Z
Learning: Applies to dexs/**/*.ts : Track dailyFees, dailyRevenue, and dailySupplySideRevenue dimensions with appropriate breakdown labels and breakdownMethodology when tracking fees/revenue in DEX adapters

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Use source and destination labels for `dailySupplySideRevenue` dimension in fees adapters (e.g., 'Borrow Interest To Lenders', 'Swap Fees To LPs')

Learnt from: 0xCatalyst
Repo: DefiLlama/dimension-adapters PR: 6355
File: fees/neverland.ts:541-541
Timestamp: 2026-04-14T07:31:51.018Z
Learning: In DefiLlama/dimension-adapters, the shared Aave V3 helper (`helpers/aave.ts` `getPoolFees`) records only `flashloanPremiumForProtocol` (derived from `FLASHLOAN_PREMIUM_TO_PROTOCOL`) under the `FLASHLOAN_FEES` breakdown label. The LP/lender share of flashloan premiums is NOT captured under this label — it accrues through the Aave liquidity index and is already reflected in `BORROW_INTEREST`. Consequently, in adapters using this helper (e.g., `fees/neverland.ts`), the `FLASHLOAN_FEES` breakdown description should accurately describe the protocol/treasury portion only, not gross flashloan fees.

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Ensure `dailyFees` (Gross Protocol Revenue) includes everything the protocol COULD charge, including fees that go to other parties - represents what protocol could theoretically take if they became greedy

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include `dailyFees` dimension in fees adapters - maps to Gross Protocol Revenue and should include all fees from all sources (total value flow into protocol ecosystem)

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Use distribution type labels for `dailyHoldersRevenue` dimension in fees adapters (e.g., 'Token Buy Back', 'Staking Distributions')

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: GUIDELINES.md:0-0
Timestamp: 2026-04-03T10:25:08.836Z
Learning: Applies to adapters/**/*.ts : Do not use deprecated fields `dailyBribesRevenue` and `dailyTokenTaxes`; put these as sub-sections within `dailyHoldersRevenue` instead

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Include `dailyRevenue` dimension in fees adapters - maps to Gross Profit and should equal `dailyFees - dailySupplySideRevenue` (what protocol keeps)

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: fees/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:06:41.566Z
Learning: Applies to fees/**/*.ts : Use source and destination labels for `dailyRevenue` dimension in fees adapters (e.g., 'Borrow Interest To Treasury', 'Swap Fees To Protocol')

Learnt from: CR
Repo: DefiLlama/dimension-adapters PR: 0
File: options/GUIDELINES.md:0-0
Timestamp: 2026-03-30T12:07:11.033Z
Learning: If adapter returns fee/revenue dimensions, follow the guidelines in `fees/GUIDELINES.md` - options protocols typically track trading fees (on premium), settlement fees (on exercise/settlement), and vault management fees

Comment thread dexs/hydradx/index.ts
Comment thread fees/hydradx.ts
Comment thread fees/hydradx.ts
@bheluga bheluga self-assigned this Apr 14, 2026
@github-actions
Copy link
Copy Markdown

The hydradx adapter exports:

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

🦙 Running HYDRADX adapter 🦙
---------------------------------------------------
Start Date:	Mon, 13 Apr 2026 00:00:00 GMT
End Date:	Tue, 14 Apr 2026 00:00:00 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 28/4/2024
Daily volume: 5.17 M
Daily fees: 2.54 k
Daily revenue: 1.22 k
Daily supply side revenue: 1.32 k
Daily holders revenue: 813.00
Daily protocol revenue: 406.00

@github-actions
Copy link
Copy Markdown

The hydradx.ts adapter exports:

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

🦙 Running HYDRADX.TS adapter 🦙
---------------------------------------------------
Start Date:	Mon, 13 Apr 2026 05:12:14 GMT
End Date:	Tue, 14 Apr 2026 05:12:14 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 26/11/2024
Daily fees: 2.41 k
Daily revenue: 946.00
Daily protocol revenue: 946.00
Daily supply side revenue: 1.47 k
End timestamp: 1776143533 (2026-04-14T05:12:13.000Z)

Comment thread dexs/hydradx/index.ts
const protocolFee = omnipoolFee * 0.2;

dailySupplySideRevenue.addUSDValue(assetFee * 0.5, 'Omnipool Asset Fees To LPs');
dailyHoldersRevenue.addUSDValue(assetFee * 0.5, 'Omnipool Asset Fees To Stakers & Referrals');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

referrals should be supply side revenue, is there any fixed percentage to them/any way to track them? if yes you can add or else leave as it is

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

referrals should be supply side revenue, is there any fixed percentage to them/any way to track them? if yes you can add or else leave as it is

There is no way to track it. Our indexer doesn't track referrals. My recommendation: leave as-is. holdersRevenue is the correct bucket for this - the majority recipient is HDX stakers, which is exactly what holdersRevenue represents. Reclassifying to supplySideRevenue would be semantically wrong

@bheluga bheluga merged commit fffd27b into DefiLlama:master Apr 16, 2026
2 of 3 checks passed
@github-actions
Copy link
Copy Markdown

The hydradx adapter exports:

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

🦙 Running HYDRADX adapter 🦙
---------------------------------------------------
Start Date:	Wed, 15 Apr 2026 00:00:00 GMT
End Date:	Thu, 16 Apr 2026 00:00:00 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 28/4/2024
Daily volume: 2.29 M
Daily fees: 1.22 k
Daily revenue: 577.00
Daily supply side revenue: 643.00
Daily holders revenue: 385.00
Daily protocol revenue: 192.00

@github-actions
Copy link
Copy Markdown

The hydradx.ts adapter exports:

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

🦙 Running HYDRADX.TS adapter 🦙
---------------------------------------------------
Start Date:	Wed, 15 Apr 2026 12:42:29 GMT
End Date:	Thu, 16 Apr 2026 12:42:29 GMT
---------------------------------------------------

HYDRADX 👇
Backfill start time: 26/11/2024
Daily fees: 3.24 k
Daily revenue: 1.73 k
Daily protocol revenue: 1.73 k
Daily supply side revenue: 1.51 k
End timestamp: 1776343348 (2026-04-16T12:42:28.000Z)

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