Add Tristero AUSD yield adapter#2818
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an Ethereum DeFiLlama adapter for Tristero’s AUSD margin-lending vault, reading vault and token data to calculate TVL, APY, and price per share, then exporting the configured pool handler and metadata. ChangesTristero AUSD margin adapter
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant poolsFunction
participant TristeroVault
participant AUSD
participant MarketPrice
poolsFunction->>TristeroVault: Read TVOL, asset rate, and share value
poolsFunction->>AUSD: Read decimals
poolsFunction->>MarketPrice: Fetch AUSD price
poolsFunction->>poolsFunction: Calculate TVL and APY
poolsFunction-->>poolsFunction: Return pool record
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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
ESLint install timed out. The project may have too many dependencies for the sandbox. 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. Comment |
|
The tristero-margin adapter exports pools: Test Suites: 1 passed, 1 total |
| underlyingTokens: [AUSD], | ||
| poolMeta: 'AUSD margin lending vault', | ||
| url: 'https://app.tristero.com', | ||
| token: null, |
There was a problem hiding this comment.
does the user receive a receipt token for depositing? if so this should be added here rather than null
There was a problem hiding this comment.
Thanks — I checked the dapp implementation and the verified MarginVault source. Deposits mint ERC6909 shares on the MarginVault using the asset ID uint256(uint160(AUSD)); there is no standalone ERC20 receipt-token address. I therefore kept token: null to avoid misrepresenting holder analytics. I added pricePerShare using readValue(AUSD, 1e18), which returns the current time/rate-accrued index, and removed poolMeta. Commit: f3bf91f.
| apyBase, | ||
| underlyingTokens: [AUSD], | ||
| poolMeta: 'AUSD margin lending vault', | ||
| url: 'https://app.tristero.com', |
| tvlUsd, | ||
| apyBase, | ||
| underlyingTokens: [AUSD], | ||
| poolMeta: 'AUSD margin lending vault', |
There was a problem hiding this comment.
I don't think this pool meta adds anything valuable, can remove
|
The tristero-margin adapter exports pools: Test Suites: 1 passed, 1 total |
Summary
ratePerSecondasset parameter using standard daily compounding.getTVOL(AUSD)balance and AUSD price.Validation
git diff --checkpasses.Arbitrum and Base deployments are intentionally excluded because they use USDC and need separate confirmation of their lender-yield treatment.
Summary by CodeRabbit