Skip to content

Atomiq exchange#17924

Open
RohanNero wants to merge 5 commits intoDefiLlama:mainfrom
RohanNero:atomiq-exchange
Open

Atomiq exchange#17924
RohanNero wants to merge 5 commits intoDefiLlama:mainfrom
RohanNero:atomiq-exchange

Conversation

@RohanNero
Copy link
Contributor

@RohanNero RohanNero commented Feb 4, 2026

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume/fees/revenue adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama):

atomiq exchange

Twitter Link:

https://x.com/atomiqlabs

List of audit links if any:
Website Link:

https://app.atomiq.exchange/

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

~$250k

Treasury Addresses (if the protocol has treasury)
Chain:

solana, botanix, citrea, starknet

Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):

"Fully trustless, zero slippage swaps between native Bitcoin (on-chain & lightning) & Solana + Starknet + Citrea + Botanix secured by Bitcoin's proof of work"

Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:

dex

Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:

https://docs.atomiq.exchange/bitcoin-backed-lending#dlcs

forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):

funds locked in spvVaults, escrow managers, and the solana program's 'authority' pda

Github org/user (Optional, if your code is open source, we can track activity):

https://github.com/atomiqlabs

Does this project have a referral program?

Summary by CodeRabbit

  • New Features
    • Adds Atomiq Exchange TVL aggregation across Btnx, Citrea, Starknet, and Solana for unified cross-chain liquidity tracking.
    • Per-chain TVL calculations so each network’s vaults are individually computed and reported.
    • Solana-specific aggregation included to capture Solana vault balances.
    • Default token fallbacks applied when chain-specific token lists are not provided.
    • Published methodology describing TVL counting for Atomiq SPV vaults.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Adds a new Atomiq Exchange TVL adapter that aggregates TVL for btnx, citrea, starknet, and solana using chain-specific vault/token config, helper sumTokens/sumTokens2, and Solana PDA derivation for the Atomiq program authority.

Changes

Cohort / File(s) Summary
Atomiq Exchange TVL Module
projects/atomiq-exchange/index.js
New adapter implementing TVL aggregation across btnx, citrea, starknet, and solana. Adds a config mapping vaults/tokens, imports helper/coreAssets.json, sumTokens, sumTokens2, and @solana/web3.js. Implements tvl(api) and tvlSolana() and exports per-chain entries plus methodology.

Sequence Diagram(s)

sequenceDiagram
  participant Adapter as Atomiq Adapter
  participant Core as coreAssets (ADDRESSES)
  participant Helpers as sumTokens / sumTokens2
  participant Chains as btnx / citrea / starknet
  participant Solana as Solana Program (ATOMIQ_PROGRAM_ID)

  Adapter->>Core: load token defaults and chain tokens
  Adapter->>Chains: call sumTokens(vaults, tokens)
  Chains-->>Helpers: return per-chain balances
  Adapter->>Solana: derive authority PDA via PublicKey.findProgramAddressSync("authority")
  Adapter->>Helpers: call sumTokens2(authorityPDA, tokens) for Solana
  Helpers-->>Adapter: return Solana balances
  Adapter-->>Adapter: aggregate and return TVL
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • g1nt0ki

Poem

🐇 I hop through vaults with nimble feet,

I find the keys and count each sheet,
From btnx hills to Starknet shore,
I sum the tokens, then hop for more—🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Atomiq exchange' is vague and generic, lacking specificity about the adapter's purpose or nature of change. Enhance the title to be more descriptive, e.g., 'Add Atomiq Exchange TVL adapter' or 'Add Atomiq Exchange adapter for multi-chain TVL tracking'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description comprehensively fills the required template with key project details including name, website, Twitter, chains, category, description, methodology, and GitHub org.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

The adapter at projects/atomiq-exchange exports TVL:

starknet                  148.22 k
solana                    77.13 k
citrea                    14.64 k
btnx                      13.62 k

total                    253.62 k 

@llamabutler
Copy link

The adapter at projects/atomiq-exchange exports TVL:

starknet                  148.22 k
solana                    77.24 k
citrea                    14.64 k
btnx                      13.62 k

total                    253.73 k 

Copy link
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

🤖 Fix all issues with AI agents
In `@projects/atomiq-exchange/index.js`:
- Around line 25-32: tvlSolana currently ignores the framework-provided api
param; update the tvlSolana function signature to accept an api parameter and
pass it into sumTokens2 so chain/context info is propagated. Specifically,
modify the async function tvlSolana(...) to include api and call return
sumTokens2({ owners: [authorityPda.toString()] }, api) (or the equivalent
positional/optional argument pattern required by sumTokens2) while keeping the
authorityPda computation unchanged.

@llamabutler
Copy link

The adapter at projects/atomiq-exchange exports TVL:

starknet                  146.98 k
solana                    77.09 k
citrea                    14.72 k
btnx                      13.41 k

total                    252.21 k 

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants