Skip to content

add asseto token ngi+#19940

Open
Silas-Zhu wants to merge 1 commit into
DefiLlama:mainfrom
Silas-Zhu:feat/asseto-ngiplus
Open

add asseto token ngi+#19940
Silas-Zhu wants to merge 1 commit into
DefiLlama:mainfrom
Silas-Zhu:feat/asseto-ngiplus

Conversation

@Silas-Zhu

@Silas-Zhu Silas-Zhu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  1. If you would like to add a volume/fees/revenue adapter please submit the PR here.

  2. 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.

  3. 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.

  4. For updating listing info Please send a mail to metadata@defillama.com

  5. Please do not add new npm dependencies, do not edit/push pnpm-lock.yaml file as part of your changes


(Needs to be filled only for new listings)

Name (to be shown on DefiLlama):

NGI+

Twitter Link:

https://x.com/AssetoFinance

List of audit links if any:

https://reale-assets.gitbook.io/reale/product/ngi+/appendix/ngi+-smart-contract-audit-report

Website Link:

https://asseto.finance/

Logo (High resolution, will be shown with rounded borders):

https://static.asseto.finance/asseto/2026-03-20/dh6vvhx1yf42cbi2s1.svg

Current TVL:

4.10M

Treasury Addresses (if the protocol has treasury)
Chain:

BSC,ETH,PHAROS

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):

NGI+ is a 1:1 asset-backed token collateralized by the Partners Group Next Generation Infrastructure - Class PC USD ACC, which invests in a broadly diversified portfolio of private infrastructure investments. It intends to focus on private infrastructure direct and secondary investments with a priority on operational assets that offer strong downside protection.

Token address and ticker if any:

NGIPlus_BSC: 0x50BF2924ceE59737EAD76e881643eD8569BAe6e8
NGIPlus_ETH: 0xF252C5BD43907a6CAb079E990845a37a7C5730d9
NGIPlus_PROS: 0x85f51213A6c3F2566aF519D296BB75AD4EC6d234

Currently, the products deployed on BSC and Pharos have not yet received any subscription transactions, so their TVL is temporarily zero.

Category (full list at https://defillama.com/categories) *Please choose only one:

RWA

Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):

Redstone

https://app.redstone.finance/push-feeds/NGI%252B_FUNDAMENTAL/ethereumMultiFeed

https://etherscan.io/address/0x7391452a90dda26892bc52fef3ef42f92f19fc61

Implementation Details: Briefly describe how the oracle is integrated into your project:

In our project, the oracle integration is achieved through a collaboration between our Fund Administrator (SyncNAV) and Chainlink. SyncNAV acts as the primary price provider, delivering compliant and accurate price data via an API endpoint to Redstone. Redstone then uses this verified data feed to construct the on-chain oracle.

Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):

TVL is calculated by multiplying the current total token supply by the latest token price. The latest price is obtained from the oracle, ensuring that the TVL accurately reflects the real-time value of assets within the protocol.

Github org/user (Optional, if your code is open source, we can track activity):
Does this project have a referral program?

Summary by CodeRabbit

  • New Features
    • Added TVL tracking support for a new DeFi protocol across multiple chains.
    • Enabled USD-denominated TVL reporting using live token pricing and supply data.
    • Included a methodology description for the new adapter.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new DeFiLlama adapter for the Asseto NGI+ token, defining chain-specific token configurations for ethereum, bsc, and pharos. It fetches the token price from an on-chain oracle, computes TVL using total supply, and exports a tvl function per chain plus a methodology string.

Changes

Asseto NGI+ Adapter

Layer / File(s) Summary
Configuration and price oracle
projects/asseto-ngiplus/index.js
Defines oracle address, ABI for latestRoundData, per-chain token config, and getPrice(api) which fetches oracle round data and decimals to compute and validate a positive price.
TVL calculation and exports
projects/asseto-ngiplus/index.js
Implements tvl(api) to read token totalSupply and decimals, apply the oracle price, report USD value via api.addUSDValue, and exports tvl per chain along with a methodology string.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Adapter as tvl(api)
    participant Token as NGI+ Token Contract
    participant Oracle as Price Feed Oracle

    Adapter->>Token: totalSupply()
    Adapter->>Token: decimals()
    Adapter->>Oracle: latestRoundData()
    Adapter->>Oracle: decimals()
    Oracle-->>Adapter: normalized price
    Adapter->>Adapter: compute normalized supply × price
    Adapter->>Adapter: api.addUSDValue(tvl)
Loading

Related Issues: None specified.

Related PRs: None specified.

Suggested labels: new-adapter

Suggested reviewers: None specified.

🐰 A new token hops into view,
Oracle whispers a price so true,
Supply times worth, USD in sight,
Three chains now shine with TVL light.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR’s main change: adding the NGI+ asseto token listing.
Description check ✅ Passed The description fills most required new-listing fields and explains the oracle and TVL methodology.
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.
✨ 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

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The adapter at projects/asseto-ngiplus exports TVL:

ethereum                  4.10 M
bsc                       0.00
pharos                    0.00

total                    4.10 M 

@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 (2)
projects/asseto-ngiplus/index.js (2)

24-33: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Avoid precision loss when converting large totalSupply to Number.

Number(supply) converts a BigInt to a JS Number before dividing. For an 18-decimal token, any supply above ~9e15 atomic units exceeds Number.MAX_SAFE_INTEGER, causing silent precision loss in the TVL figure. Divide with BigInt first, then convert.

♻️ Proposed fix using BigInt division
 async function tvl(api) {
   const token = config[api.chain]
   const [supply, tokenDecimals, price] = await Promise.all([
     api.call({ target: token, abi: 'erc20:totalSupply' }),
     api.call({ target: token, abi: 'erc20:decimals' }),
     getPrice(api),
   ])
 
-  api.addUSDValue((Number(supply) / 10 ** Number(tokenDecimals)) * price)
+  const supplyBigInt = BigInt(supply)
+  const divisor = 10n ** BigInt(tokenDecimals)
+  const tokenSupply = Number(supplyBigInt / divisor) + Number(supplyBigInt % divisor) / Number(divisor)
+  api.addUSDValue(tokenSupply * price)
 }
🤖 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/asseto-ngiplus/index.js` around lines 24 - 33, The tvl function is
converting the ERC20 total supply to a Number too early, which can silently lose
precision for large balances. Update the logic in tvl to keep the api.call
result as BigInt/integer math while scaling by tokenDecimals first, then convert
to a JS Number only for the final USD calculation passed to api.addUSDValue. Use
the existing tvl, api.call, and api.addUSDValue flow as the place to make this
change.

12-22: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

No staleness check on oracle updatedAt.

latestRoundData returns updatedAt but it's ignored. If the oracle feed goes stale, the adapter will report an outdated price as current TVL. Consider checking that updatedAt is within an acceptable window.

🛡️ Suggested staleness guard
 async function getPrice(api) {
   const ethApi = api.chain === 'ethereum' ? api : new sdk.ChainApi({ chain: 'ethereum', timestamp: api.timestamp })
-  const [{ answer }, decimals] = await Promise.all([
+  const [{ answer, updatedAt }, decimals] = await Promise.all([
     ethApi.call({ target: priceFeed, abi: latestRoundData }),
     ethApi.call({ target: priceFeed, abi: 'uint8:decimals' }),
   ])
 
+  const staleThreshold = 24 * 60 * 60 // 24 hours
+  if (api.timestamp && Number(updatedAt) < api.timestamp - staleThreshold) {
+    throw new Error('NGI+ oracle price is stale')
+  }
   const price = Number(answer) / 10 ** Number(decimals)
   if (price <= 0) throw new Error('Invalid NGI+ price')
   return price
 }
🤖 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/asseto-ngiplus/index.js` around lines 12 - 22, The price oracle
lookup in getPrice currently ignores latestRoundData.updatedAt, so add a
staleness guard before returning the NGI+ price. Update getPrice to read
updatedAt alongside answer, then validate it against an acceptable freshness
window and throw if the feed is stale; keep the existing price/decimals handling
and use the getPrice and latestRoundData symbols to locate the change.
🤖 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/asseto-ngiplus/index.js`:
- Around line 24-33: The tvl function is converting the ERC20 total supply to a
Number too early, which can silently lose precision for large balances. Update
the logic in tvl to keep the api.call result as BigInt/integer math while
scaling by tokenDecimals first, then convert to a JS Number only for the final
USD calculation passed to api.addUSDValue. Use the existing tvl, api.call, and
api.addUSDValue flow as the place to make this change.
- Around line 12-22: The price oracle lookup in getPrice currently ignores
latestRoundData.updatedAt, so add a staleness guard before returning the NGI+
price. Update getPrice to read updatedAt alongside answer, then validate it
against an acceptable freshness window and throw if the feed is stale; keep the
existing price/decimals handling and use the getPrice and latestRoundData
symbols to locate the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2ad04c33-d43e-4b61-9741-a0035f55cb41

📥 Commits

Reviewing files that changed from the base of the PR and between 628c2e0 and 1bb85c3.

📒 Files selected for processing (1)
  • projects/asseto-ngiplus/index.js

@RohanNero RohanNero 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.

Apologies for the inconvenience, but we are currently changing how we list RWA tokens. Could you please fill out one of our submission forms instead?:

@Silas-Zhu

Copy link
Copy Markdown
Contributor Author

submitted. Let us know what the next steps are

@RohanNero

Copy link
Copy Markdown
Contributor

@Silas-Zhu Once submitted, there are no additional steps. The tokens should be live on the RWA dashboard within a couple of days. If the tokens are not listed or any information is incorrect, please let us know.

@RohanNero RohanNero self-assigned this Jul 10, 2026
@kadmm004

Copy link
Copy Markdown

@RohanNero Hi team I noticed that the token NGI+ we previously submitted (https://defillama.com/rwa/asset/NGI%2B) is now listed. We have a few questions regarding the token information:

  1. Could the token name be changed to "Asseto NGI+"? This would group it together with our previously submitted Asseto CASH+ and Asseto AoABT, so all products are displayed under the Asseto brand (Asseto is the tokenization technology service provider).

  2. The token's TVL is currently not showing. We submitted an oracle provided by RedStone, and the actual TVL should be around $4.11M.

  3. The token icon is currently displaying as an emoji.

Could you please look into the above? Thanks a lot.

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