Repository navigation
Conversation
Algebra Integral pools discovered from factory Pool events; TVL from pool balances priced via coins.llama.fi; apyBase from 24h Swap/SwapFee logs net of the 90% community fee; Merkl rewards via addMerklRewardApy (adds Hemi 43111 to merkl networks). Pools with Merkl incentives link to their Merkl opportunity page; brownfi is added to the Merkl adapter blacklist so those campaigns are not listed twice.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Read Hemi pool and swap data src/adaptors/brownfi-clamm/index.js |
The adaptor reads factory-created pools, pool state, token metadata, balances, and swap logs from the Hemi RPC. |
Calculate token prices and swap metrics src/adaptors/brownfi-clamm/index.js |
The adaptor fetches token prices and derives prices for unpriced tokens from qualifying pool anchors. It calculates 24-hour volume and LP fees using the observed block interval. |
Build adaptor output with Merkl rewards src/adaptors/brownfi-clamm/index.js, src/adaptors/merkl/config.js, src/adaptors/merkl/index.js |
The adaptor calculates TVL and APY, filters pools, and adds Merkl reward data and matching opportunity URLs. Merkl maps chain 43111 to Hemi and adds brownfi to its protocol blacklist. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant BrownFi as BrownFi CLAMM adaptor
participant RPC as Hemi public RPC
participant Prices as coins.llama.fi
participant Merkl as Merkl opportunities
BrownFi->>RPC: Read pool state and swap logs
BrownFi->>Prices: Fetch token prices
BrownFi->>Merkl: Fetch live matching opportunities
BrownFi->>BrownFi: Emit filtered pools with TVL and APY data
Suggested reviewers: 0xkr3p
Merge Risk: 
Minimal · up to a87e7
-
No confirmed issue remains that should prevent merging after normal checks.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Adds a yield adapter for BrownFi CLAMM on Hemi (chain id 43111), project slug
brownfi-clamm(protocolId 8430).How it works (no API keys)
communityFee = 900/1000), so only the 10% LP share is counted, which is why base APY is small.urlto their Merkl opportunity page; others link to the BrownFi pool page.Shared Merkl changes
src/adaptors/merkl/config.js: adds43111: 'hemi'so Merkl rewards on Hemi are recognized.src/adaptors/merkl/index.js: addsbrownfito the exclusion list (same as Satsuma/Sushi) so BrownFi campaigns aren't listed twice. The only other live Merkl campaigns on Hemi are Sushi's, which are already excluded.Checks
npm run test --adapter=brownfi-clamm: 54/54 passing, 7 pools.Summary by CodeRabbit