Skip to content

Update Strike Finance fees adapter to v2#6402

Merged
noateden merged 3 commits intoDefiLlama:masterfrom
convergent-labs:update-strike-finance-v2
Apr 16, 2026
Merged

Update Strike Finance fees adapter to v2#6402
noateden merged 3 commits intoDefiLlama:masterfrom
convergent-labs:update-strike-finance-v2

Conversation

@convergent-labs
Copy link
Copy Markdown
Contributor

Summary

  • Switch API endpoint from beta to app.strikefinance.org
  • Return fees in USD instead of per-asset native token balances (ADA/SNEK)
  • Simplify fetch to single totalFees field (v1 + v2 combined)
  • Update methodology descriptions

Test

npx ts-node cli/testAdapter.ts fees strike-finance

  - Switch API endpoint from beta to app.strikefinance.org
  - Return fees in USD instead of per-asset ADA/SNEK balances
  - Simplify to single totalFees field covering v1 + v2 fees
  - Update methodology descriptions
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 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: f0619fe4-07b0-4292-88a7-9d8787711588

📥 Commits

Reviewing files that changed from the base of the PR and between d6cf118 and 279c3c8.

📒 Files selected for processing (1)
  • fees/strike-finance/index.ts

Summary by CodeRabbit

  • Updates
    • Updated Strike Finance analytics data source endpoint.
    • Simplified fee calculation and reporting logic.
    • Refined metrics to focus on trading fee distribution to STRIKE token holders.
    • Removed certain supply-side and protocol revenue metrics from reporting.

Walkthrough

The Strike Finance fees adapter's fetch was rewritten to call the Strike analytics endpoint (https://app.strikefinance.org/...), populate dailyFees directly from data.totalFees, remove per-asset balance aggregation and SNEK handling, drop FetchResult typing, and simplify methodology/breakdown text.

Changes

Cohort / File(s) Summary
Strike Finance Fees Adapter
fees/strike-finance/index.ts
Replaced local per-asset balance-building and metric-based breakdown with a direct call to Strike analytics (app.strikefinance.org) and mapping of data.totalFees into dailyFees (returned as dailyRevenue and dailyHoldersRevenue). Removed dailySupplySideRevenue/dailyProtocolRevenue, METRIC import/usage, breakdownMethodology structure, and explicit FetchResult return type. Updated methodology text to platform-wide "trading fees" distribution to $STRIKE holders.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

fees

🚥 Pre-merge checks | ✅ 3 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Breakdown Methodology Check ⚠️ Warning The Strike Finance fees adapter does not export a breakdownMethodology object, only a methodology object. Add a breakdownMethodology object to the adapter defining fee sources and include it in the default export.
Income Statement Compliance ⚠️ Warning Strike Finance adapter missing required dailySupplySideRevenue field for Income Statement Compliance per fees/GUIDELINES.md. Add dailySupplySideRevenue field set to 0 and include breakdownMethodology object to satisfy income statement equation.
Title check ❓ Inconclusive The title is partially related to the changeset but lacks the required format. It should follow '[type] protocol-name - description' format. Reformat title to follow the required pattern, e.g., '[update] strike-finance - switch to app endpoint and return USD fees' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description provides a clear summary of changes and test instructions but does not follow the template provided in the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Version 2 Required ✅ Passed The adapter correctly exports version: 2 in the adapter configuration, satisfying the requirement for adapters updated to v2 format.

✏️ 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 strike-finance adapter exports:

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

🦙 Running STRIKE-FINANCE adapter 🦙
---------------------------------------------------
Start Date:	Tue, 14 Apr 2026 03:39:15 GMT
End Date:	Wed, 15 Apr 2026 03:39:15 GMT
---------------------------------------------------

CARDANO 👇
Backfill start time: 16/5/2025
Daily fees: 1.90 k
Daily revenue: 1.90 k
Daily holders revenue: 1.90 k
End timestamp: 1776224354 (2026-04-15T03:39:14.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: 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/strike-finance/index.ts`:
- Around line 26-30: Add a breakdownMethodology object alongside the existing
methodology in the fees adapter that documents each fee source label used (e.g.,
"Fees", "Revenue", "HoldersRevenue") with short descriptions; update the file's
methodology block (the existing methodology object in this diff) to include
breakdownMethodology: { Fees: "Description of trading fee source", Revenue:
"Description of revenue metric", HoldersRevenue: "Description of how fees are
allocated to $STRIKE holders" } and ensure any .add() calls in this module use
those explicit labels to match the breakdown.
🪄 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: dfdb523c-4a69-4756-9e88-8b1afe0d57f6

📥 Commits

Reviewing files that changed from the base of the PR and between ddf3c22 and d6cf118.

📒 Files selected for processing (1)
  • fees/strike-finance/index.ts

Comment thread fees/strike-finance/index.ts
@github-actions
Copy link
Copy Markdown

The strike-finance adapter exports:

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

🦙 Running STRIKE-FINANCE adapter 🦙
---------------------------------------------------
Start Date:	Tue, 14 Apr 2026 04:00:58 GMT
End Date:	Wed, 15 Apr 2026 04:00:58 GMT
---------------------------------------------------

CARDANO 👇
Backfill start time: 16/5/2025
Daily fees: 1.90 k
Daily revenue: 1.90 k
Daily holders revenue: 1.90 k
End timestamp: 1776225657 (2026-04-15T04:00:57.000Z)

@noateden noateden self-assigned this Apr 15, 2026
@noateden noateden merged commit 029fcbe into DefiLlama:master Apr 16, 2026
2 of 3 checks passed
@github-actions
Copy link
Copy Markdown

The strike-finance adapter exports:

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

🦙 Running STRIKE-FINANCE adapter 🦙
---------------------------------------------------
Start Date:	Wed, 15 Apr 2026 08:05:40 GMT
End Date:	Thu, 16 Apr 2026 08:05:40 GMT
---------------------------------------------------

CARDANO 👇
Backfill start time: 16/5/2025
Daily fees: 1.45 k
Daily revenue: 1.45 k
Daily holders revenue: 1.45 k
End timestamp: 1776326739 (2026-04-16T08:05:39.000Z)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants