Skip to content

Add efixDI adapter (Base + Polygon) with lock-and-mint bridge de-dup#20036

Open
Ernesto711 wants to merge 1 commit into
DefiLlama:mainfrom
Develop-ltda:fix/efixdi-lock-and-mint-dedup
Open

Add efixDI adapter (Base + Polygon) with lock-and-mint bridge de-dup#20036
Ernesto711 wants to merge 1 commit into
DefiLlama:mainfrom
Develop-ltda:fix/efixdi-lock-and-mint-dedup

Conversation

@Ernesto711

@Ernesto711 Ernesto711 commented Jul 14, 2026

Copy link
Copy Markdown

efixDI+ — tokenized Brazilian DI money-market fund

Adds a TVL adapter for efixDI+, a permissionless ERC-20 backed 1:1 by cotas of a BTG Pactual DI money-market fund (Brazilian fixed income tracking the CDI rate, ~15% p.a.), issued under a CVM-registered securitizer (Act 23.635/2025). Website: https://efix.finance

Methodology

  • Circulating supply counted across Base (8453) and Polygon (137).
  • Bridge de-duplication: the LayerZero V2 OFT bridge is lock-and-mint (Polygon→Base locks efixDI in the OFTAdapter on Polygon and mints the same units on Base). Naively summing both chains would double-count the locked balance, so we subtract the OFTAdapter balance:
    circulating = baseSupply + polygonSupply − OFTAdapterLocked
    (Verified on-chain 2026-07-14: adapter locks 235 efixDI; Base supply is otherwise native treasury issuance.)
  • Pricing: efixDI has no public price feed, so circulating supply is valued with the market's own on-chain oracle — NAV(BRL) × Chainlink BRL/USD (the same oracle used by the efixDI/USDC Euler v2 market) — reported via addUSDValue.
  • The efixDI Euler market's own vault balances are intentionally not summed — that collateral is already part of circulating supply (avoids double-counting).

Notes

  • Tokens are identified by contract address throughout (never by symbol).
  • node test.js projects/efixdi/index.js passes cleanly (~$3.05k current TVL).
  • Supersedes the approach in Add efixDI+ protocol adapter (Polygon + Base) #18113 by de-duplicating the lock-and-mint bridge instead of summing both chains raw.

Summary by CodeRabbit

  • New Features
    • Added DeFiLlama TVL tracking for efixDI+.
    • Reports circulating supply across Base and Polygon with bridge-lock deduplication.
    • Calculates USD value using on-chain NAV and BRL/USD oracle pricing.
    • Includes methodology details explaining supply reconciliation and valuation.

@github-actions

Copy link
Copy Markdown

Error while running adapter at :

Use the getLogs2 helper (require('./helper/cache/getLogs').getLogs2) instead of api.getLogs(...). Found new usage in this PR:
86562:+ const v3Logs = await api.getLogs({

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 348f2d39-a07c-486b-96af-8c7d21629fdf

📥 Commits

Reviewing files that changed from the base of the PR and between 62a5c26 and 92bcdb4.

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

📝 Walkthrough

Walkthrough

Adds a DeFiLlama TVL adaptor for efixDI+ that aggregates Base and Polygon supply, subtracts Polygon bridge-locked tokens, prices the circulating supply through an on-chain oracle, and exports the standard Base adaptor configuration.

Changes

efixDI+ TVL calculation

Layer / File(s) Summary
Token and oracle contracts
projects/efixdi/index.js
Defines token, bridge adapter, and oracle addresses plus the quote ABI used for NAV-derived USDC pricing.
Supply aggregation and TVL export
projects/efixdi/index.js
Fetches Base and Polygon supply, subtracts the Polygon locked balance, converts the oracle quote to USD, records TVL, and exports methodology and the base.tvl entry point.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant tvl as tvl(api)
  participant base as Base token contract
  participant polygon as Polygon token contract
  participant adapter as Polygon OFT adapter
  participant oracle as NAV/BRL oracle
  participant api as api.addUSDValue
  tvl->>base: totalSupply()
  tvl->>polygon: totalSupply()
  tvl->>adapter: locked balance
  tvl->>oracle: getQuote(1 token, token, USDC)
  base-->>tvl: Base supply
  polygon-->>tvl: Polygon supply
  adapter-->>tvl: Locked balance
  oracle-->>tvl: USDC quote
  tvl->>api: addUSDValue(circulating supply, USD value)
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers methodology well, but it misses most required new-listing fields from the template such as name, links, audit, chain, and token details. Add the missing new-listing sections from the template: name, Twitter, website, audits, current TVL, treasury, chain, token details, category, oracle provider, documentation, forkedFrom, methodology, GitHub org, and referral program.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the new efixDI adapter and its Base/Polygon bridge de-duplication.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@Ernesto711

Copy link
Copy Markdown
Author

Rebased onto current main so the diff is a single file (projects/efixdi/index.js). The earlier CI flag about api.getLogs came from stale-base drift in the previous branch state, not from this adapter, which makes no log queries. Local test run: total ~3.06k USD (base 2.60k / polygon 462), with the Polygon side already net of the 235 efixDI locked in the OFTAdapter. Supersedes #18113.

@github-actions

Copy link
Copy Markdown

The adapter at projects/efixdi exports TVL:

base                      2.63 k
polygon                   462.00

total                    3.09 k 

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.

2 participants