Skip to content

Add GGBR gold-backed RWA adapter#18153

Open
Sush78 wants to merge 1 commit intoDefiLlama:mainfrom
Sush78:add-ggbr
Open

Add GGBR gold-backed RWA adapter#18153
Sush78 wants to merge 1 commit intoDefiLlama:mainfrom
Sush78:add-ggbr

Conversation

@Sush78
Copy link

@Sush78 Sush78 commented Feb 25, 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): GGBR
Twitter Link: https://x.com/goldfishggbr
List of audit links if any:
Website Link: https://t.co/eVPZ8PoS0W
Logo (High resolution, will be shown with rounded borders):
Current TVL:
Treasury Addresses (if the protocol has treasury)
Chain: Ethereum
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): This is a Gold-Backed Digital Asset (tokenized gold) where each token's value is precisely pegged to one one-thousandth ($1/1,000) of the current market price of one ounce of physical gold.
Token address and ticker if any: 0x7e2ac793f3E692f388e66c7DC28F739d13B0B71A (GGBR/USDT)
Category (full list at https://defillama.com/categories) *Please choose only one: RWA (commodities)
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.): TWAP
Implementation Details: Briefly describe how the oracle is integrated into your project: GGBR uses an off-chain gold price feed sourced from a metals pricing API.

The gold spot price is used to peg GGBR markets at 1/1000th the value of
one ounce of gold. The price is applied to market pairs (e.g., GGBR/USDT)
to maintain the peg. Token supply is not adjusted — the peg is maintained
through market pricing rather than a rebase mechanism.

Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage: https://goldfishgold.com/whitepaper
forkedFrom (Does your project originate from another project): No
methodology (what is being counted as tvl, how is tvl being calculated): TVL is calculated as the total circulating supply of GGBR tokens. Each GGBR token is backed 1:1 by 1/1000th oz of physical gold. TVL represents the total value of gold-backed tokens issued on-chain.
Github org/user (Optional, if your code is open source, we can track activity):
Does this project have a referral program? No

Summary by CodeRabbit

  • New Features
    • Added TVL tracking support for GGBR token on Ethereum, enabling total supply monitoring for the gold-backed stablecoin.

@llamabutler
Copy link

The adapter at projects/ggbr exports TVL:

ethereum                  0.00

total                    0.00 

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

A new TVL adapter is added for the GGBR token (gold-backed RWA stablecoin at 0x7e2ac793f3E692f388e66c7DC28F739d13B0B71A). The adapter exports a methodology description and an Ethereum TVL function that queries the token's total supply and records the result via the API.

Changes

Cohort / File(s) Summary
GGBR TVL Adapter
projects/ggbr/index.js
New file adding TVL adapter with methodology and ethereum.tvl function that fetches GGBR ERC-20 totalSupply and calls api.add().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰✨ A gleaming token in the blockchain's ground,
Gold-backed GGBR has finally been found!
My burrow now tracks this treasure so bright,
Fifteen lines of code making everything right! 🏆

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a TVL adapter for GGBR, a gold-backed RWA token on Ethereum.
Description check ✅ Passed The description includes most required template sections with substantive information: project name, Twitter link, website, short description, token address/ticker, category, oracle provider, implementation details, documentation, methodology, and referral program status. Minor gaps exist (logo, audit links, current TVL, treasury addresses, Coingecko/CoinMarketCap IDs) but are explicitly noted as optional or not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

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

🧹 Nitpick comments (1)
projects/ggbr/index.js (1)

3-6: Consider adding misrepresentedTokens: true for supply-based token TVL.

This adapter reports issued token supply rather than on-chain collateral balances, so tagging it as misrepresented improves dashboard interpretation consistency.

Suggested change
 module.exports = {
+  misrepresentedTokens: true,
   methodology:

Based on learnings: adapters that add raw totalSupply for directly priced vault/synthetic-like tokens use misrepresentedTokens: true.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/ggbr/index.js` around lines 3 - 6, Add the misrepresentedTokens flag
to the exported adapter object to mark this TVL as supply-based (not on-chain
collateral); update the top-level module.exports (the object that currently
contains methodology and ethereum) to include misrepresentedTokens: true so
dashboards treat the reported totalSupply-based TVL appropriately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@projects/ggbr/index.js`:
- Around line 4-5: The methodology text currently says "in circulation" but the
implementation uses the ERC-20 totalSupply; either (A) update the methodology
string (the methodology key in projects/ggbr/index.js) to state that TVL is
based on the token's totalSupply (raw ERC-20 totalSupply) or (B) change the
implementation to compute circulating supply by subtracting known protocol-owned
addresses (treasury/locked/vesting) from the ERC-20 totalSupply (adjust the code
that calls totalSupply and add balanceOf calls for those protocol addresses),
and ensure you mirror this change in all related occurrences (lines around the
methodology and entries referenced 8-12).

---

Nitpick comments:
In `@projects/ggbr/index.js`:
- Around line 3-6: Add the misrepresentedTokens flag to the exported adapter
object to mark this TVL as supply-based (not on-chain collateral); update the
top-level module.exports (the object that currently contains methodology and
ethereum) to include misrepresentedTokens: true so dashboards treat the reported
totalSupply-based TVL appropriately.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ce6b1b and 74af128.

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

Comment on lines +4 to +5
methodology:
"TVL represents the total supply of GGBR tokens in circulation, a gold-backed RWA stablecoin pegged at 1/1000th the value of gold.",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Methodology and implementation are currently measuring different things.

The text says “in circulation,” but the code uses raw ERC-20 totalSupply. If non-circulating balances exist (treasury/locked/vesting), TVL will be overstated vs your stated methodology.

Suggested minimal fix (wording aligned to code)
   methodology:
-    "TVL represents the total supply of GGBR tokens in circulation, a gold-backed RWA stablecoin pegged at 1/1000th the value of gold.",
+    "TVL represents the ERC-20 totalSupply of GGBR tokens, a gold-backed RWA token pegged at 1/1000th the value of gold.",

Based on learnings: Protocol-owned liquidity should be excluded from TVL calculations and explained in the methodology field.

Also applies to: 8-12

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/ggbr/index.js` around lines 4 - 5, The methodology text currently
says "in circulation" but the implementation uses the ERC-20 totalSupply; either
(A) update the methodology string (the methodology key in
projects/ggbr/index.js) to state that TVL is based on the token's totalSupply
(raw ERC-20 totalSupply) or (B) change the implementation to compute circulating
supply by subtracting known protocol-owned addresses (treasury/locked/vesting)
from the ERC-20 totalSupply (adjust the code that calls totalSupply and add
balanceOf calls for those protocol addresses), and ensure you mirror this change
in all related occurrences (lines around the methodology and entries referenced
8-12).

@RohanNero RohanNero added the rwa label Feb 25, 2026
@RohanNero RohanNero self-assigned this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants