Skip to content

Add Anoncoin fees adapter#6411

Closed
akhil-onjuno wants to merge 1 commit intoDefiLlama:masterfrom
akhil-onjuno:add-anoncoin-fees
Closed

Add Anoncoin fees adapter#6411
akhil-onjuno wants to merge 1 commit intoDefiLlama:masterfrom
akhil-onjuno:add-anoncoin-fees

Conversation

@akhil-onjuno
Copy link
Copy Markdown

@akhil-onjuno akhil-onjuno commented Apr 16, 2026

https://anoncoin.it/

Adds a fees/revenue adapter for Anoncoin (anoncoin.fun).

What it tracks: Partner trading fees (SOL) claimed by Anoncoin from Meteora DBC and DAMM V2 pools.

Approach: Uses getSolanaReceived to sum SOL transfers to the Anoncoin partner fee claimer wallet.

  • dailyFees = dailyRevenue = dailyProtocolRevenue (all claimed partner fees)
  • Target wallet: BKPxAdgwPHXE3ZPZt5XsAovDgUaUufHgZnSAZ3eRWQNW
  • Dependencies: Allium

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

Walkthrough

A new Solana-based fee adapter for Anoncoin is introduced that fetches protocol revenue from Meteora bonding curve and DAMM V2 pools using the getSolanaReceived utility function.

Changes

Cohort / File(s) Summary
Anoncoin Solana Fee Adapter
fees/anoncoin/index.ts
Implements a new SimpleAdapter v2 for Solana that retrieves trading fee revenue claimed by Anoncoin. Defines partner fee claimer address, fetches daily fees via getSolanaReceived, and reports protocol revenue.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

fees, new-adapter

🚥 Pre-merge checks | ✅ 3 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is descriptive and clearly relates to the main change (adding a fees adapter), but does not follow the required format of [type] protocol-name - description. Revise title to follow format: [feat] anoncoin - add fees adapter or similar format matching [type] protocol-name - description.
Breakdown Methodology Check ⚠️ Warning The adapter lacks the required breakdownMethodology object that should document all revenue sources used in .add() calls. Add a breakdownMethodology object documenting fee sources and modify getSolanaReceived calls to include explicit labels matching the methodology entries.
Description check ❓ Inconclusive The PR description clearly explains what the adapter does, the approach used, and key implementation details, but does not follow the required template structure for new protocol listings. Clarify whether this is a new protocol listing or a fees adapter addition. If it's a new protocol, use the template provided in the repository to include name, Twitter, website, logo, chain, description, and other required fields for DefiLlama display.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Income Statement Compliance ✅ Passed Anoncoin adapter correctly implements income statement formula with dailyRevenue = dailyFees - 0 (dailySupplySideRevenue), semantically appropriate for partner trading fees representing direct protocol revenue.
Version 2 Required ✅ Passed The new Anoncoin fees adapter in fees/anoncoin/index.ts correctly declares version: 2 on line 16 and exports the SimpleAdapter object with the required version 2 format via the default export on line 27.

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

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

🦙 Running ANONCOIN adapter 🦙
---------------------------------------------------
Start Date:	Wed, 15 Apr 2026 15:06:18 GMT
End Date:	Thu, 16 Apr 2026 15:06:18 GMT
---------------------------------------------------

------ ERROR ------
Error: Allium API Key is required[Ignore this error for github bot]
    at _queryAllium (/home/runner/work/dimension-adapters/dimension-adapters/helpers/allium.ts:78:11)
    at /home/runner/work/dimension-adapters/dimension-adapters/helpers/allium.ts:10:71
Allium API Key is required[Ignore this error for github bot]

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 `@fees/anoncoin/index.ts`:
- Around line 12-24: The adapter currently returns aggregated
dailyFees/dailyRevenue/dailyProtocolRevenue without labeled breakdowns and lacks
a breakdownMethodology; update the fetch flow (the return object constructed in
the fetch function and the adapter export named adapter) to use explicit labeled
breakdown entries (e.g., labels such as "partner_trading_fees" or a
source-specific name) when calling .add() / building the output so each
revenue/fee dimension includes a label, and add a matching breakdownMethodology
object inside the adapter (next to methodology) that documents each exact label
string you used; ensure the labels in breakdownMethodology exactly match the
label keys emitted by fetch and that you update ProtocolRevenue/Revenue fields
to reference the labeled breakdown structure.
- Around line 8-11: Change the Solana fee query to only include native SOL by
passing mints: ['So11111111111111111111111111111111111111112'] into the
getSolanaReceived call (the call that currently passes options and target:
PARTNER_FEE_CLAIMER). Update the .add() calls that record the metric to include
explicit labels (e.g., label: "partner_trading_fees" and currency or token
label) and add a breakdownMethodology object for this file documenting all
revenue sources (e.g., partner trading fees: SOL transfers to
PARTNER_FEE_CLAIMER, any other sources if present) so the metric follows the
fees/**/*.ts guidelines.
🪄 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: f71f7c58-8694-4034-8de4-cdea1c601b64

📥 Commits

Reviewing files that changed from the base of the PR and between 89dc653 and 8865f14.

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

Comment thread fees/anoncoin/index.ts
Comment on lines +8 to +11
const dailyFees = await getSolanaReceived({
options,
target: PARTNER_FEE_CLAIMER,
});
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

🧩 Analysis chain

🌐 Web query:

For Allium's solana.assets.transfersdataset, how is native SOL represented in themint column, and what is the recommended way to filter only Meteora partner-fee transfer senders for a recipient wallet?

💡 Result:

Native SOL is represented in the mint column of Allium's solana.assets.transfers dataset as the Wrapped SOL mint address 'So11111111111111111111111111111111111111112'. No specific information was found on filtering for "Meteora partner-fee transfer senders" in the Allium documentation. The table includes columns like program_name, transfer_type, from_address, and in the _w_tx_cols variant, tx_account_keys which may allow filtering by Meteora program accounts (e.g., DLMM: LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo, DAMM v2: cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG, Dynamic Fee Sharing: dfsdo2UqvwfN8DuUVrMRNfQe11VaiNoKcMqLHVvDPzh). Partner-fee transfers likely originate from Meteora fee vaults or pools, so recommended filter could be to_address = '<recipient_wallet>' AND program_name LIKE '%meteora%' or parsing tx_account_keys for Meteora PDAs, but exact method not documented.

Citations:


🏁 Script executed:

# First, locate and examine the anoncoin adapter file
find . -path "*/fees/anoncoin/index.ts" -type f

Repository: DefiLlama/dimension-adapters

Length of output: 96


🏁 Script executed:

# Check the complete fees/anoncoin/index.ts file
cat -n fees/anoncoin/index.ts

Repository: DefiLlama/dimension-adapters

Length of output: 1091


🏁 Script executed:

# Locate the getSolanaReceived helper function
find . -path "*/helpers/token.ts" -type f | head -1 | xargs cat -n | head -100

Repository: DefiLlama/dimension-adapters

Length of output: 4165


🏁 Script executed:

# Search for getSolanaReceived function definition in helpers/token.ts
grep -n "getSolanaReceived" helpers/token.ts | head -5

Repository: DefiLlama/dimension-adapters

Length of output: 350


🏁 Script executed:

# Get the getSolanaReceived function implementation
sed -n '200,400p' helpers/token.ts

Repository: DefiLlama/dimension-adapters

Length of output: 6714


🏁 Script executed:

# Get the full getSolanaReceived function implementation
sed -n '428,527p' helpers/token.ts

Repository: DefiLlama/dimension-adapters

Length of output: 3879


Filter to SOL mint and add explicit labels with breakdownMethodology

getSolanaReceived accepts optional mints parameter to filter token types. The current code collects ALL tokens transferred to PARTNER_FEE_CLAIMER, but the methodology specifies "Partner trading fees (SOL)". Add mints: ['So11111111111111111111111111111111111111112'] to filter only native SOL. Additionally, per fees/**/*.ts guidelines, add explicit labels in .add() calls and a breakdownMethodology object documenting all revenue sources.

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

In `@fees/anoncoin/index.ts` around lines 8 - 11, Change the Solana fee query to
only include native SOL by passing mints:
['So11111111111111111111111111111111111111112'] into the getSolanaReceived call
(the call that currently passes options and target: PARTNER_FEE_CLAIMER). Update
the .add() calls that record the metric to include explicit labels (e.g., label:
"partner_trading_fees" and currency or token label) and add a
breakdownMethodology object for this file documenting all revenue sources (e.g.,
partner trading fees: SOL transfers to PARTNER_FEE_CLAIMER, any other sources if
present) so the metric follows the fees/**/*.ts guidelines.

Comment thread fees/anoncoin/index.ts
Comment on lines +12 to +24
return { dailyFees, dailyRevenue: dailyFees, dailyProtocolRevenue: dailyFees };
};

const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.SOLANA]: { fetch },
},
dependencies: [Dependencies.ALLIUM],
isExpensiveAdapter: true,
methodology: {
ProtocolRevenue: "Partner trading fees (SOL) claimed by Anoncoin from Meteora bonding curve and DAMM V2 pools.",
},
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

Add required labeled breakdowns and breakdownMethodology for this fees adapter

This adapter emits fee/revenue dimensions but does not provide explicit labeled breakdown entries plus matching breakdownMethodology. Please add source-specific labels and document them under breakdownMethodology with exact label matches.

Suggested structure
 const adapter: SimpleAdapter = {
   version: 2,
   adapter: {
     [CHAIN.SOLANA]: { fetch },
   },
   dependencies: [Dependencies.ALLIUM],
   isExpensiveAdapter: true,
+  breakdownMethodology: {
+    Fees: {
+      "Meteora Partner Trading Fees": "SOL partner fees claimed by Anoncoin partner fee claimer wallet."
+    },
+    Revenue: {
+      "Meteora Partner Trading Fees To Protocol": "Partner fees retained by Anoncoin protocol."
+    },
+    ProtocolRevenue: {
+      "Meteora Partner Trading Fees To Treasury": "Protocol revenue from claimed Meteora partner fees."
+    }
+  },
   methodology: {
     ProtocolRevenue: "Partner trading fees (SOL) claimed by Anoncoin from Meteora bonding curve and DAMM V2 pools.",
   },
 };

As per coding guidelines: “Include a required breakdownMethodology object in TypeScript adapter files documenting all labels used in .add() calls” and “Always provide labels in .add() calls even when there is only one source of fees.”

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

In `@fees/anoncoin/index.ts` around lines 12 - 24, The adapter currently returns
aggregated dailyFees/dailyRevenue/dailyProtocolRevenue without labeled
breakdowns and lacks a breakdownMethodology; update the fetch flow (the return
object constructed in the fetch function and the adapter export named adapter)
to use explicit labeled breakdown entries (e.g., labels such as
"partner_trading_fees" or a source-specific name) when calling .add() / building
the output so each revenue/fee dimension includes a label, and add a matching
breakdownMethodology object inside the adapter (next to methodology) that
documents each exact label string you used; ensure the labels in
breakdownMethodology exactly match the label keys emitted by fetch and that you
update ProtocolRevenue/Revenue fields to reference the labeled breakdown
structure.

@bheluga bheluga self-assigned this Apr 16, 2026
@bheluga bheluga mentioned this pull request Apr 16, 2026
@bheluga
Copy link
Copy Markdown
Member

bheluga commented Apr 16, 2026

@akhil-onjuno thanks for the PR
added here #6412

@bheluga bheluga closed this Apr 16, 2026
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