Skip to content

Add 0xEquity rental income (fees/revenue, Base)#8039

Open
asimashfaq wants to merge 2 commits into
DefiLlama:masterfrom
asimashfaq:add-0xequity-fees
Open

Add 0xEquity rental income (fees/revenue, Base)#8039
asimashfaq wants to merge 2 commits into
DefiLlama:masterfrom
asimashfaq:add-0xequity-fees

Conversation

@asimashfaq

Copy link
Copy Markdown

0xEquity tokenizes real estate on Base. Each property's off-chain rental income is proven on-chain, trust-minimized, in an IncomeAttestationRegistry (0xa67edcec210147b85b589313b05e04c680fdef02, source-verified). A calendar month (periodId = YYYYMM) is fully proven only when two independent paths agree on the amount: a threshold-signed attestation (Path A) and a Reclaim zkTLS proof of the same bank statement (Path B). On finalize the registry emits FullyProven(token, periodId, totalMinor)totalMinor = gross rental income in USD cents.

Methodology

  • Fees = gross proven rental income (sum of FullyProven.totalMinor, cents → USD), attributed to the block the month was finalized on-chain (event-based via getLogs, so it backfills correctly).
  • SupplySideRevenue = the same amount — all rental income accrues to property-token holders (the suppliers of capital) as yield.
  • Revenue = protocol-retained management fee — not yet quantified on-chain; reported as 0.

Notes

  • The on-chain attestations were backfilled, so several historical FullyProven events landed close together — those months render near their finalize date rather than smoothly across 2024–2026. Going forward each month is attested ~monthly, so ongoing fees render correctly.
  • To date: 24 fully-proven months, $28,374.63 total proven rental income (one property live, 158 Nelson St / WXRWA1 0xce827d203dC317CB8823098DCbE88fD3aE447482). The registry is already multi-property, so new properties surface with no adapter change.

Validated locally with npm test fees 0xequity → daily fees pick up the finalized month in-window.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Added support for the 0xequity rental-income protocol on Base.
    • Fees and revenue are now pulled from on-chain “fully proven” income attestations.
    • Daily “Rental Yield” and “Rental Yield to Property Holders” are included in reporting.
    • Added methodology notes explaining how reported figures are calculated.
    • Reporting backfill starts from 2026-06-18 and continues with hourly updates.

Walkthrough

Adds a new fees adapter for the 0xequity rental-income protocol on Base. It reads FullyProven events from the IncomeAttestationRegistry, converts the reported cents amount to USD, and exports fees, supply-side revenue, and methodology metadata.

Changes

0xequity Fees Adapter

Layer / File(s) Summary
Registry event ABI
fees/0xequity/index.ts
Defines the IncomeAttestationRegistry address and the FullyProven event ABI used for log parsing.
Fee aggregation fetch
fees/0xequity/index.ts
Implements fetch(options) to read FullyProven logs, convert totalMinor from cents to USD, and populate dailyFees and dailySupplySideRevenue while leaving dailyRevenue unpopulated.
Adapter metadata and export
fees/0xequity/index.ts
Defines methodology and breakdownMethodology, then exports the adapter configuration with version, chain, start date, and fetch wiring.

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

Suggested labels: fees, new-adapter, methodology

Suggested reviewers: bheluga

🚥 Pre-merge checks | ✅ 12 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is related to the change, but it does not follow the required '[type] protocol-name - description' format. Rewrite it as '[type] 0xEquity - ...' and keep the protocol name plus a clear summary in the required format.
Description check ⚠️ Warning The description covers chain, category, website, methodology, and notes, but it omits most required template fields for a new protocol listing. Fill the missing template fields for a new listing, especially Name, Twitter, audits, logo, TVL, treasury, token, docs, forkedFrom, Github, and referral details.
Efficiency And Error Handling ⚠️ Warning Hardcoded start: "2026-06-18" lacks a source comment; the other flagged efficiency/error-handling patterns aren’t present. Add an inline note citing why 2026-06-18 is the correct backfill start (e.g. first finalized event date/source).
✅ Passed checks (12 passed)
Check name Status Explanation
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.
Breakdown Methodology Check ✅ Passed The only labeled balance adds are 'Rental Yield' and 'Rental Yield to Property Holders', and both exist in breakdownMethodology; the adapter also exports breakdownMethodology.
Income Statement Compliance ✅ Passed dailyFees and dailySupplySideRevenue both capture gross rental income, while dailyRevenue is zero, so the identity dailyFees = dailyRevenue + dailySupplySideRevenue holds.
Version 2 Required ✅ Passed fees/0xequity/index.ts exports a new adapter with version: 2, and it uses on-chain getLogs rather than a daily-aggregate API.
Pullhourly Required For Version 2 ✅ Passed The new v2 adapter explicitly sets pullHourly: true in its exported config, satisfying the requirement.
Dune Adapters Are Version 1 ✅ Passed fees/0xequity/index.ts uses getLogs only; no Dune helpers or TIME_RANGE/date filters, so the version-1 rule doesn't apply.
Income Statement Balance ✅ Passed dailyFees and dailySupplySideRevenue are both incremented by each FullyProven log, while dailyRevenue stays zero.
Fetchoptions Usage ✅ Passed 0xEquity uses the v2-style single FetchOptions arg, with no timestamp/startOfDay/block recomputation or timestamp field in the result.
Adapter Shape ✅ Passed Single-chain adapter uses chains: [CHAIN.BASE] with one start date and no per-chain config split.
Methodology Keys ✅ Passed The adapter’s methodology uses display-name keys: Fees, SupplySideRevenue, and Revenue—not code field names like dailyFees.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

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.

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

Actionable comments posted: 3

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

Inline comments:
In `@fees/0xequity/index.ts`:
- Around line 56-62: The SimpleAdapter definition for the v2 adapter is missing
the required pullHourly setting. Update the adapter object in the 0xequity index
so that the version: 2 adapter explicitly includes pullHourly: true alongside
fetch, chains, start, and methodology, since this EVM log-based adapter should
preserve hourly granularity.
- Around line 44-47: Remove the incorrect dailyHoldersRevenue field from the
return in the 0xequity fee calculation, since property-token holders are already
represented by dailySupplySideRevenue and should not be counted as holders
revenue. Update the return object in the relevant fee-calculation function to
only expose the supply-side revenue for these holders, and avoid reusing
dailyRevenue as a shared reference so downstream mutations cannot alias
unrelated balances.
- Around line 36-42: The fee aggregation in `dailyFees.addUSDValue` is missing a
required label, and the adapter config does not export `breakdownMethodology`.
Update the `0xequity` adapter so the revenue source is added with an explicit
breakdown label, then add a matching `breakdownMethodology` entry that includes
every label used. Also review `dailySupplySideRevenue` in the same flow: since
it currently clones `dailyFees`, it inherits the same label, so if the
supply-side label should be different, build it with its own labeled
`addUSDValue` call instead of cloning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 957db60b-c81a-4ff6-b693-e8478b8065f0

📥 Commits

Reviewing files that changed from the base of the PR and between d35aaaf and 527e019.

📒 Files selected for processing (1)
  • fees/0xequity/index.ts

Comment thread fees/0xequity/index.ts Outdated
Comment thread fees/0xequity/index.ts Outdated
Comment thread fees/0xequity/index.ts

@bheluga bheluga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@asimashfaq thanks for the PR
I can just see logs emitted, I don't see transfers of rental yield in USDC on any other tokens.
How can I verify

@bheluga bheluga self-assigned this Jul 9, 2026
@coderabbitai coderabbitai Bot added the Fees label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

The 0xequity adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts fees 0xequity

🦙 Running 0XEQUITY adapter 🦙
---------------------------------------------------
Start Date:	Wed, 08 Jul 2026 11:00:00 GMT
End Date:	Thu, 09 Jul 2026 11:00:00 GMT
---------------------------------------------------

 (1/24) start: 11 AM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (2/24) start: 12 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (3/24) start: 1 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (4/24) start: 2 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (5/24) start: 3 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (6/24) start: 4 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (7/24) start: 5 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (8/24) start: 6 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
 (9/24) start: 7 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(10/24) start: 8 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(11/24) start: 9 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(12/24) start: 10 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(13/24) start: 11 PM - 08/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(14/24) start: 12 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(15/24) start: 1 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(16/24) start: 2 AM - 09/07    |  fees - 626.00 | revenue - 0.00 | supply side revenue - 626.00
(17/24) start: 3 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(18/24) start: 4 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(19/24) start: 5 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(20/24) start: 6 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(21/24) start: 7 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(22/24) start: 8 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(23/24) start: 9 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00
(24/24) start: 10 AM - 09/07    |  fees - 0.00 | revenue - 0.00 | supply side revenue - 0.00

====== TOTAL DAILY AGGREGATED (sum of slots per chain) ======

BASE 👇
End timestamp: 1783594799 (2026-07-09T10:59:59.000Z)
Daily fees: 626.00
Daily revenue: 0.00
Daily supply side revenue: 626.00




FEES BREAKDOWN 👇

label                            | Daily fees | Daily supply side revenue
---                              | ---        | ---                      
Rental Yield                     | 626        |                          
Rental Yield to Property Holders |            | 626                      

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

Actionable comments posted: 1

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

Inline comments:
In `@fees/0xequity/index.ts`:
- Around line 54-61: Add an explicit empty Revenue section to
breakdownMethodology in the 0xEquity fee module for completeness. Update the
breakdownMethodology object alongside Fees and SupplySideRevenue so it includes
Revenue: {} even though dailyRevenue has no labels, making the intent explicit
and easier to maintain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f84d2432-48e7-45ce-8d3f-6817045af0c8

📥 Commits

Reviewing files that changed from the base of the PR and between 527e019 and 848ad37.

📒 Files selected for processing (1)
  • fees/0xequity/index.ts

Comment thread fees/0xequity/index.ts
Comment on lines +54 to +61
const breakdownMethodology = {
Fees: {
"Rental Yield": "Gross rental income earned by 0xEquity's tokenized real-estate properties, as proven on-chain in the IncomeAttestationRegistry. A month is counted only when it is fully proven by two independent paths (a threshold-signed attestation and a Reclaim zkTLS proof of the same bank statement) that agree on the amount.",
},
SupplySideRevenue: {
"Rental Yield to Property Holders": "All proven rental income, which is distributed to the property-token holders (the suppliers of capital) as yield.",
},
}

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.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider adding Revenue: {} to breakdownMethodology for completeness.

No labels are added to dailyRevenue so it's not strictly required, but including an empty Revenue entry makes it explicit that revenue is intentionally zero and prevents confusion for future maintainers adding revenue labels.

♻️ Suggested addition
 const breakdownMethodology = {
   Fees: {
     "Rental Yield": "Gross rental income earned by 0xEquity's tokenized real-estate properties, as proven on-chain in the IncomeAttestationRegistry. A month is counted only when it is fully proven by two independent paths (a threshold-signed attestation and a Reclaim zkTLS proof of the same bank statement) that agree on the amount.",
   },
   SupplySideRevenue: {
     "Rental Yield to Property Holders": "All proven rental income, which is distributed to the property-token holders (the suppliers of capital) as yield.",
   },
+  Revenue: {},
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const breakdownMethodology = {
Fees: {
"Rental Yield": "Gross rental income earned by 0xEquity's tokenized real-estate properties, as proven on-chain in the IncomeAttestationRegistry. A month is counted only when it is fully proven by two independent paths (a threshold-signed attestation and a Reclaim zkTLS proof of the same bank statement) that agree on the amount.",
},
SupplySideRevenue: {
"Rental Yield to Property Holders": "All proven rental income, which is distributed to the property-token holders (the suppliers of capital) as yield.",
},
}
const breakdownMethodology = {
Fees: {
"Rental Yield": "Gross rental income earned by 0xEquity's tokenized real-estate properties, as proven on-chain in the IncomeAttestationRegistry. A month is counted only when it is fully proven by two independent paths (a threshold-signed attestation and a Reclaim zkTLS proof of the same bank statement) that agree on the amount.",
},
SupplySideRevenue: {
"Rental Yield to Property Holders": "All proven rental income, which is distributed to the property-token holders (the suppliers of capital) as yield.",
},
Revenue: {},
}
🤖 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 `@fees/0xequity/index.ts` around lines 54 - 61, Add an explicit empty Revenue
section to breakdownMethodology in the 0xEquity fee module for completeness.
Update the breakdownMethodology object alongside Fees and SupplySideRevenue so
it includes Revenue: {} even though dailyRevenue has no labels, making the
intent explicit and easier to maintain.

@asimashfaq

Copy link
Copy Markdown
Author

This is not the USDC transfer .. as this more like money we receive in USD from the company WISE account. https://app.0xequity.com/listings/158-nelson-st#how-its-proven

You can see this page to get more details

@asimashfaq
asimashfaq requested a review from bheluga July 9, 2026 14:11
@bheluga

bheluga commented Jul 12, 2026

Copy link
Copy Markdown
Member

@asimashfaq looks like the contract is very new, so it won't help in tracking since 2024.
also, can you try to track platform fees charged while buying and selling RWAa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants