Skip to content

Add Eden chain and bot.fun adapter#19981

Open
jcstein wants to merge 4 commits into
DefiLlama:mainfrom
jcstein:add-eden-chain
Open

Add Eden chain and bot.fun adapter#19981
jcstein wants to merge 4 commits into
DefiLlama:mainfrom
jcstein:add-eden-chain

Conversation

@jcstein

@jcstein jcstein commented Jul 10, 2026

Copy link
Copy Markdown

New chain: Eden

Eden is Celestia's native EVM chain (Evolve stack, Celestia DA), with TIA bridged from Celestia as the native gas token.

  • Chain ID: 714 — shortName eden on chainlist.org
  • RPC: https://rpc.eden.gateway.fm
  • Explorer: https://eden.blockscout.com
  • Docs: https://eden-docs.pages.dev
  • Bridge: https://eden.zone
  • Native token: TIA (18 decimals), plus canonical WETH9-style wrapper WTIA 0x00000000000000000000000000000000Ce1e571A. Per review, no client-side token mapping — prices to be added server-side once the collateral is verified. Collateral details: TIA is bridged via the canonical Hyperlane warp route from Celestia; the escrow is Celestia's Hyperlane warp module account celestia1m20fddqpmfuwcz2r9ckj6wd70p5e75t8y22wqj (Eden route token ID 0x726f757465725f61707000000000000000000000000000010000000000000009, ~122.9k TIA net escrowed).

Chain metadata request: please tie Eden to Celestia in the chains list (parent chain: Celestia, gas token TIA / geckoId celestia), since Eden is Celestia's EVM chain and uses bridged TIA for gas. Happy to open the companion PR to defillama-server if that's preferred.

New protocol: bot.fun

  • Website: https://bot.fun
  • Category: Launchpad
  • Chain: Eden
  • What it is: EVM-native launchpad on Eden where autonomous AI agents launch coins and trade them against bonding curves priced in native TIA. Humans spectate; trading is bot-only via API/onchain txs.
  • Methodology: TVL is the native TIA held by the bot.fun factory contract (0x279dc5E05d43644C6cd2F2813F306a320e785cdD), which holds the bonding curve reserves of every coin launched on the platform, excluding accrued creator/referral rewards. Contract addresses are published at https://bot.fun/api/v1/chain
  • Test output (node test.js projects/bot-fun/index.js): the adapter currently reports ~9.65k TIA under eden:0x0000…0000 (matches bot.fun's /api/v1/stats/overview tvlTia), displayed as $0 until eden token prices are added on the DefiLlama server (see review thread).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added TVL tracking for the bot.fun factory on the Eden network.
    • TVL calculation now includes the factory’s native-token balance while excluding accrued but unclaimed creator/referral rewards.
    • Enabled Eden network support by adding eden to the supported chain list and configuring the Eden core asset (WTIA).

Registers Eden (chain 714, Celestia's EVM chain, chainlist shortName
"eden") and adds a TVL adapter for bot.fun, the launchpad on Eden
whose bonding curve reserves are held in native TIA by the factory
contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Registers Eden and WTIA metadata, then adds a bot.fun adapter that calculates factory-held native TIA TVL after subtracting accrued unclaimed rewards.

Changes

Eden TVL integration

Layer / File(s) Summary
Eden chain and token registration
projects/helper/chains.json, projects/helper/coreAssets.json
Adds Eden to the supported chain list and defines its WTIA core asset address.
bot.fun TVL adapter
projects/bot-fun/index.js
Exports Eden TVL logic that sums the factory’s native token balance and subtracts totalAccruedUnclaimed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TVLAdapter
  participant sumTokensExport
  participant BotFunFactory
  TVLAdapter->>sumTokensExport: Aggregate native token balance
  TVLAdapter->>BotFunFactory: Query totalAccruedUnclaimed
  BotFunFactory-->>TVLAdapter: Return accrued amount
  TVLAdapter->>sumTokensExport: Subtract accrued amount from TVL
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has useful details but does not follow the required new-listing template and omits many requested fields like Name, Twitter, Logo, and audits. Fill out the template sections for Eden and bot.fun with the requested metadata, including the new-listing fields and any missing links.
✅ Passed checks (4 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.
Title check ✅ Passed The title is concise and accurately summarizes the main changes: adding Eden and the bot.fun adapter.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 adapter at projects/bot-fun exports TVL:

eden                      3.73 k

total                    3.73 k 

@github-actions

Copy link
Copy Markdown

The adapter at projects/bot-fun exports TVL:

eden                      3.69 k

total                    3.69 k 

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
projects/bot-fun/index.js (1)

10-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify decimal handling by subtracting in atomic units via ADDRESSES.null.

Since sumTokensExport already adds the native balance under ADDRESSES.null (in wei), subtracting the accrued rewards through the same token identifier lets the SDK handle the 18-decimal conversion and the eden→celestia CoinGecko mapping automatically. This removes the manual / 1e18 division, the Number() BigInt→float conversion (which can lose precision for large wei values), and the need for skipChain: true.

♻️ Proposed refactor
 async function tvl(api) {
   await sumTokensExport({ owner: FACTORY, tokens: [ADDRESSES.null] })(api)
   const accruedRewards = await api.call({
     target: FACTORY,
     abi: 'uint256:totalAccruedUnclaimed',
     permitFailure: true,
   })
-  api.add('celestia', -Number(accruedRewards ?? 0) / 1e18, { skipChain: true })
+  api.add(ADDRESSES.null, -(accruedRewards ?? 0n))
 }

This relies on the eden chain's native token being mapped to the celestia CoinGecko asset in the token mapping configuration from the chain registration cohort.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/bot-fun/index.js` around lines 10 - 16, Update the accrued rewards
subtraction in the token aggregation flow to use ADDRESSES.null directly: pass
the atomic-unit reward amount from totalAccruedUnclaimed to api.add with
ADDRESSES.null, removing Number(), manual 1e18 conversion, and skipChain.
Preserve the existing sumTokensExport behavior so SDK decimal conversion and the
eden-to-celestia mapping are applied automatically.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@projects/bot-fun/index.js`:
- Around line 10-16: Update the accrued rewards subtraction in the token
aggregation flow to use ADDRESSES.null directly: pass the atomic-unit reward
amount from totalAccruedUnclaimed to api.add with ADDRESSES.null, removing
Number(), manual 1e18 conversion, and skipChain. Preserve the existing
sumTokensExport behavior so SDK decimal conversion and the eden-to-celestia
mapping are applied automatically.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c90f6471-4d4b-4e8a-9b3b-a68dcc46f896

📥 Commits

Reviewing files that changed from the base of the PR and between 32e7276 and 5485717.

📒 Files selected for processing (1)
  • projects/bot-fun/index.js

@RohanNero RohanNero self-assigned this Jul 15, 2026
Comment thread projects/helper/tokenMapping.js Outdated
eden: {
[nullAddress]: { coingeckoId: 'celestia', decimals: 18 }, // native TIA
'0x00000000000000000000000000000000ce1e571a': { coingeckoId: 'celestia', decimals: 18 }, // WTIA
},

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.

Hello, thank you for the PR. Could you please remove this token mapping, and share the celestia addresses that hold tokens bridged to eden if possible? Once we verify the collateral backing them, we can add prices for eden tokens on the server

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the review! Removed the mapping in b3d2276 (also updated the bot.fun adapter so the rewards subtraction uses the raw native-token key instead of the coingecko id).

Here are the collateral details for TIA on Eden:

Native TIA on Eden is minted by the canonical Hyperlane warp route from Celestia (bridge: https://eden.zone, deployed by Abacus Works; Celestia runs Hyperlane natively in celestia-app).

  • Celestia (collateral side): warp token ID 0x726f757465725f61707000000000000000000000000000010000000000000009, collateral denom utia. The locked TIA is held by Celestia's Hyperlane warp module account: celestia1m20fddqpmfuwcz2r9ckj6wd70p5e75t8y22wqj. Note this module account is shared by all Celestia warp routes (it also backs TIA bridged to Ethereum, etc. — it currently holds ~825k TIA total). Per-route accounting is available via Celenium's Hyperlane API (https://api-mainnet.celenium.io/v1/hyperlane/token): the Eden route has sent 155,754.8 TIA and received back 32,814.5, so ~122,940 TIA is currently escrowed for Eden, matching Eden's native supply.
  • Eden side: the EvmNative warp router 0x4A60C46f671A3b86D78E9c0b793235C2D502d44E mints/releases native TIA (18 decimals).
  • WTIA 0x00000000000000000000000000000000Ce1e571A is a canonical WETH9-style wrapper, 1:1 backed by the native TIA it holds.

Example escrow-release tx on Celestia (Eden → Celestia withdrawal): be1027cc76bf7181b234072768d64547b79ed7040f780f498a7da2160e17aa94.

So for the price server: eden:0x0000000000000000000000000000000000000000 and eden:0x00000000000000000000000000000000Ce1e571A (both 18 decimals) → coingecko celestia. Happy to provide anything else you need!

jcstein and others added 2 commits July 16, 2026 20:49
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts:
#	projects/helper/coreAssets.json
@github-actions

Copy link
Copy Markdown

The adapter at projects/bot-fun exports TVL:

eden                      0.00

total                    0.00 

@jcstein
jcstein requested a review from RohanNero July 17, 2026 02:58
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