Add PumpClaw adapter (Base token launcher with Uniswap V4)#17989
Add PumpClaw adapter (Base token launcher with Uniswap V4)#17989treeoflife2 merged 5 commits intoDefiLlama:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds a new PumpClaw TVL adapter that uses a Uniswap V4 hook export (uniV4HookExport) pointed at a hook address to provide base.tvl, and exports metadata including methodology, start block, doublecounted, and timetravel flags. Changes
Sequence DiagramsequenceDiagram
participant Adapter as PumpClaw Adapter
participant HookLib as uniV4HookExport
participant HookContract as UniswapV4 Hook (on-chain)
participant DefiLlama as DefiLlama runtime
DefiLlama->>Adapter: require/import adapter
Adapter->>HookLib: initialize with { hook: PUMPCLAW_HOOK_V4_ADDRESS }
HookLib->>HookContract: subscribe / call hook endpoints
DefiLlama->>HookLib: invoke tvl() via adapter.base.tvl
HookLib->>HookContract: query pool/token state
HookContract-->>HookLib: return pool/token data
HookLib-->>DefiLlama: aggregated TVL result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@projects/pumpclaw/index.js`:
- Around line 17-22: The adapter currently builds tokens = logs.map(log =>
log.token) and calls api.sumTokens({ owner: POOL_MANAGER, tokens }), which only
counts the PumpClaw side; update it to also count the paired ETH side for each
Uniswap V4 pool: either (A) for each TokenCreated/log use the positionId to
query the pool state (via the V4 pool contract) to obtain the paired token
address (token0/token1) and include that address alongside log.token in the
tokens array before calling api.sumTokens, or (B) if you prefer a simpler
change, assume the pair is WETH (0x4200000000000000000000000000000000000006 on
Base) and extend tokens to include WETH for every entry so api.sumTokens({
owner: POOL_MANAGER, tokens }) counts both sides; reference tokens, logs,
POOL_MANAGER, TokenCreated and positionId when implementing.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@projects/pumpclaw/index.js`:
- Around line 6-7: Remove the unused constants WETH and LP_LOCKER from the
module (they're declared but never referenced) or, if you want to keep them for
documentation, convert them into a clearly marked comment explaining their
purpose; if keeping LP_LOCKER, confirm and update its value to the correct
address referenced in the PR description (replace
'0x9047c0944c843d91951a6C91dc9f3944D826ACA8' with
'0x6e4D241957074475741Ff42ec358b8b00217Bf5d' if that is the canonical one) and
ensure only the chosen form (constant removed or commented/updated) remains so
no unused identifiers (WETH, LP_LOCKER) exist in the codebase.
- Remove unused WETH and LP_LOCKER constants (flagged by CodeRabbit) - Reference correct LPLocker address (0x6e4D...Bf5d) in code comment - No functional change — ETH-side counting is correctly excluded per methodology
|
Friendly ping — all CodeRabbit comments have been addressed and checks are passing. Would love a human review when someone has a moment. Happy to make any changes needed. Thanks! |
|
Hey @g1nt0ki @Define101 — this adapter has been ready for 12 days now with all checks passing. It's a simple Uniswap V4 factory adapter on Base (PumpClaw). Would really appreciate a quick review when you get a chance. Thanks! |
|
The adapter at projects/pumpclaw exports TVL: |
|
Hey @treeoflife2 — the refactor in d1b5a2a to The original adapter used Fix PR: #18074 |
The uniV4HookExport refactor (d1b5a2a) broke TVL tracking because PumpClaw pools use hooks: address(0), not the factory as a V4 hook. The subgraph query for pools where hooks == factoryAddress returns zero pools, resulting in $0 TVL. This reverts to the original event-based approach: 1. Fetch TokenCreated events from the PumpClaw factory 2. Sum token balances held in the Uniswap V4 PoolManager Ref: DefiLlama#17989 (comment)
that was still giving 0 tvl |
|
You're right — the original event-based approach also returned $0 because these are brand new tokens with no CoinGecko listing, so The hook mismatch is still a real issue (PumpClaw pools use Question: What's the recommended pattern for launchpad protocols where paired tokens are new/unpriced? Some options I see:
All 141 PumpClaw pools are ETH-paired with permanently locked LP on Uniswap V4. The ETH in those pools is the real TVL. Happy to implement whatever approach works with your infrastructure. |
|
@clawd800 i think for bonding curve type protocols, we only accept ETH in tvl, as other meme coins don't have any value so not a good indicator for the TVL |
Name (to be shown on DefiLlama):
PumpClaw
Twitter Link:
https://x.com/clawd800
List of audit links if any:
N/A (open source, all contracts verified on Basescan)
Website Link:
https://pumpclaw.com
Logo (High resolution, will be shown with rounded borders):
https://pumpclaw.com/logo-256.png
Current TVL:
~$89K (2 active trading pools on Uniswap V4, 37 tokens total)
Treasury Addresses (if the protocol has treasury)
N/A
Chain:
Base
Coingecko ID:
Coinmarketcap ID:
Short Description (to be shown on DefiLlama):
Free token launcher for AI agents on Base with Uniswap V4 liquidity. 80% of trading fees go to creators, LP locked forever.
Token address and ticker if any:
N/A (protocol has no governance token)
Category:
Launchpad
Oracle Provider(s):
N/A (uses Uniswap V4 AMM pricing)
Implementation Details:
Tokens are created via the PumpClawFactory contract which deploys ERC20 tokens and adds single-sided liquidity to Uniswap V4 pools. LP positions are permanently locked in the LPLocker contract.
Documentation/Proof:
forkedFrom:
N/A (original implementation)
methodology:
Counts the value of tokens held in the Uniswap V4 PoolManager (0x498581fF718922c3f8e6A244956aF099B2652b2b) that were created by the PumpClaw factory. Each token is exclusively paired with native ETH in a V4 pool, and all LP positions are permanently locked. The adapter fetches TokenCreated events from the factory to identify all PumpClaw tokens, then sums their balances in the PoolManager.
Note: Token pricing may need assistance since these are new tokens not yet on CoinGecko. The tokens are tradeable via Uniswap V4 pools on Base.
Github org/user:
clawd800
Does this project have a referral program?
No
Summary by CodeRabbit