feat(t3tris-finance): surface entry & exit fees in poolMeta#2806
feat(t3tris-finance): surface entry & exit fees in poolMeta#2806t3trominos wants to merge 2 commits into
Conversation
Entry and exit fees are already read on-chain (getEntryFee/getExitFee) and stored per vault, but poolMeta only exposed the performance and management fees. Build poolMeta from a parts list that always shows perf and appends mgmt, entry, and exit whenever each is non-zero, so the full fee schedule is visible without cluttering vaults that don't charge a given fee.
|
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)
📝 WalkthroughWalkthroughThe T3tris Finance adapter now builds ChangesVault fee metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 t3tris-finance adapter exports pools: Test Suites: 1 passed, 1 total |
0xkr3p
left a comment
There was a problem hiding this comment.
hi @t3trominos, this pool meta is too long to be output properly... perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5%. We discussed this on the previous PR
Review on DefiLlama#2806 flagged the four-fee poolMeta as too long to output properly. Instead of dropping entry/exit, shorten it: labels entry->in and exit->out, '/' separator instead of ', ', and fees via Math.round(x*100)/100 (up to 2 decimals, trailing zeros stripped) so fine rates like 0.05% aren't rounded while whole numbers stay as e.g. 20%. Real vaults now render as 'perf 20%' and 'perf 20%/mgmt 1%/out 0.4%' (~25 chars); the flagged 'perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5%' (44) becomes 'perf 10%/mgmt 2%/in 0.5%/out 0.5%' (33). Worst case bounded at 44 (four fees at 99.99%). 29/29 adapter tests pass.
Review on DefiLlama#2806 flagged the four-fee poolMeta as too long to output properly. Instead of dropping entry/exit, shorten it: labels entry->in and exit->out, '/' separator instead of ', ', and fees via Math.round(x*100)/100 (up to 2 decimals, trailing zeros stripped) so fine rates like 0.05% aren't rounded while whole numbers stay as e.g. 20%. Real vaults now render as 'perf 20%' and 'perf 20%/mgmt 1%/out 0.4%' (~25 chars); the flagged 'perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5%' (44) becomes 'perf 10%/mgmt 2%/in 0.5%/out 0.5%' (33). Worst case bounded at 44 (four fees at 99.99%). 29/29 adapter tests pass.
You're right the four-fee string was too long. Rather than drop the fees, I reworked the format:
Let me know if this works for you, happy to adjust. |
|
The t3tris-finance adapter exports pools: Test Suites: 1 passed, 1 total |
What
The T3tris Finance adaptor already reads all four vault fees on-chain (performance, management, entry, exit) but only surfaced perf & mgmt in
poolMeta. This PR adds the entry and exit fees so the full fee schedule is visible in the pool metadata.Details
getEntryFee/getExitFeewere already fetched and stored per vault; only the display string changed.poolMetais now assembled from a parts list: the performance fee is always shown, and management, entry, and exit are appended only when non-zero (so vaults that don't charge a given fee stay uncluttered).perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5%Follow-up to #2735.
Summary by CodeRabbit