Skip to content

Add MineBean TVL adapter (BASE)#18186

Open
lemannyoss wants to merge 1 commit intoDefiLlama:mainfrom
lemannyoss:add-minebean
Open

Add MineBean TVL adapter (BASE)#18186
lemannyoss wants to merge 1 commit intoDefiLlama:mainfrom
lemannyoss:add-minebean

Conversation

@lemannyoss
Copy link

@lemannyoss lemannyoss commented Feb 28, 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): MineBean
Twitter Link: https://x.com/minebean_
List of audit links if any:
Website Link: https://minebean.com/
Logo (High resolution, will be shown with rounded borders): https://imagedelivery.net/GyRgSdgDhHz2WNR4fvaN-Q/0e548f28-3729-463a-6feb-9dbdbfbb8c00/public
Current TVL: $51,542.48
Treasury Addresses (if the protocol has treasury): 0x38F6E74148D6904286131e190d879A699fE3Aeb3
Chain: BASE (8453)
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): BEAN is a gamified mining protocol on Base. Players compete in continuous 60-second rounds to earn ETH and BEAN tokens, Competitive gaming mechanics layered with DeFi infrastructure.
Token address and ticker if any: 0x5c72992b83E74c4D5200A8E8920fB946214a5A5D (BEAN)
Category (full list at https://defillama.com/categories) *Please choose only one: Gamified Mining
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.): Chainlink VRF, TWAP
Implementation Details: Briefly describe how the oracle is integrated into your project: Chainlink VRF v2.5 is used to generate verifiable random winning blocks each round. Built-in BEAN token TWAP oracle provides slippage protection for Treasury buybacks via Uniswap V4.
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage: https://www.minebean.com/about.

Contract where TWAP is used: https://basescan.org/address/0x5c72992b83E74c4D5200A8E8920fB946214a5A5D#code
Contract where chainlink VRF is used: https://basescan.org/address/0x9632495bDb93FD6B0740Ab69cc6c71C9c01da4f0#code

forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated): TVL is BEAN tokens held in GridMining contract (mined rewards unclaimed by users who are rewarded for not claiming with the fee paid by users who do claim) and Staking contracts (user-staked BEAN, rewarded by the yield generated from buybacks).
Github org/user (Optional, if your code is open source, we can track activity): https://github.com/nu11dotfun
Does this project have a referral program? No

Summary by CodeRabbit

  • New Features
    • Added BEAN token total value locked (TVL) calculation that reports BEAN holdings across GridMining mined rewards and user staking positions.
    • Exposes a public TVL metric for BEAN so dashboards and reports can include combined mining and staking balances.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d70672d and 8291007.

📒 Files selected for processing (1)
  • projects/minebean/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • projects/minebean/index.js

📝 Walkthrough

Walkthrough

Adds a new JavaScript module projects/minebean/index.js that computes BEAN TVL by summing BEAN token balances from two addresses (GridMining rewards and Staking) using the sumTokens2 utility.

Changes

Cohort / File(s) Summary
New TVL Module
projects/minebean/index.js
Adds a TVL computation for BEAN: defines BEAN and two owner addresses (GRID_MINING, STAKING), implements tvl via sumTokens2, exports methodology, base.tvl, and ownTokens: true.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hop through code with a twitch of my nose,
Counting BEANs where the green garden grows,
GridMining and Staking in neat little rows,
sumTokens2 whispers, the TVL shows,
A rabbit's small cheer for neat, tiny flows. 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a TVL adapter for MineBean on the BASE chain.
Description check ✅ Passed The description contains comprehensive project information including name, website, Twitter, chain, token address, methodology, and oracle details as required by the template.

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

✨ Finishing Touches
🧪 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/minebean exports TVL:

base                      0.00

total                    0.00 

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.

🧹 Nitpick comments (2)
projects/minebean/index.js (2)

8-11: Consider extracting owner addresses into named constants.

This would make future contract migrations safer and reduce inline literal duplication.

♻️ Suggested small refactor
 const BEAN = '0x5c72992b83E74c4D5200A8E8920fB946214a5A5D'
+const GRID_MINING = '0x9632495bDb93FD6B0740Ab69cc6c71C9c01da4f0'
+const STAKING = '0xfe177128Df8d336cAf99F787b72183D1E68Ff9c2'

 async function tvl(api) {
   return sumTokens2({
     api,
     tokensAndOwners: [
-      [BEAN, '0x9632495bDb93FD6B0740Ab69cc6c71C9c01da4f0'], // GridMining - mined BEAN rewards
-      [BEAN, '0xfe177128Df8d336cAf99F787b72183D1E68Ff9c2'], // Staking - staked BEAN
+      [BEAN, GRID_MINING], // GridMining - mined BEAN rewards
+      [BEAN, STAKING], // Staking - staked BEAN
     ],
   })
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/minebean/index.js` around lines 8 - 11, Extract the hard-coded owner
addresses into named constants and replace the inline literals in the
tokensAndOwners array; e.g., create descriptively named constants (like
GRID_MINING_OWNER and STAKING_OWNER) near where BEAN is defined and use those
identifiers inside tokensAndOwners instead of the raw addresses to avoid
duplication and make future migrations safer.

15-18: Add ownTokens: true for clearer TVL classification.

Since this TVL is BEAN-only (protocol token), adding ownTokens: true improves downstream interpretation.

🧩 Suggested export update
 module.exports = {
   methodology: 'TVL is BEAN tokens held in GridMining (mined rewards) and Staking (user-staked BEAN).',
+  ownTokens: true,
   base: { tvl },
 }
Based on learnings: In DefiLlama adapters, `ownTokens` is a valid export key, and protocol-owned liquidity handling should be explicit in adapter metadata/methodology.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/minebean/index.js` around lines 15 - 18, Update the exported adapter
object (the module.exports literal that currently contains methodology and base:
{ tvl }) to include the ownTokens: true flag so downstream consumers know this
TVL is protocol-owned BEAN tokens; i.e., add ownTokens: true alongside
methodology and base in the exported object (refer to the module.exports / base
/ tvl identifiers to locate the spot).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@projects/minebean/index.js`:
- Around line 8-11: Extract the hard-coded owner addresses into named constants
and replace the inline literals in the tokensAndOwners array; e.g., create
descriptively named constants (like GRID_MINING_OWNER and STAKING_OWNER) near
where BEAN is defined and use those identifiers inside tokensAndOwners instead
of the raw addresses to avoid duplication and make future migrations safer.
- Around line 15-18: Update the exported adapter object (the module.exports
literal that currently contains methodology and base: { tvl }) to include the
ownTokens: true flag so downstream consumers know this TVL is protocol-owned
BEAN tokens; i.e., add ownTokens: true alongside methodology and base in the
exported object (refer to the module.exports / base / tvl identifiers to locate
the spot).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7935b and d70672d.

📒 Files selected for processing (1)
  • projects/minebean/index.js

@llamabutler
Copy link

The adapter at projects/minebean exports TVL:

base                      0.00

total                    0.00 

@RohanNero RohanNero self-assigned this Mar 2, 2026
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.

3 participants