Skip to content

feat(t3tris-finance): surface entry & exit fees in poolMeta#2806

Open
t3trominos wants to merge 2 commits into
DefiLlama:masterfrom
t3tris-finance:feat/t3tris-finance-all-fees
Open

feat(t3tris-finance): surface entry & exit fees in poolMeta#2806
t3trominos wants to merge 2 commits into
DefiLlama:masterfrom
t3tris-finance:feat/t3tris-finance-all-fees

Conversation

@t3trominos

@t3trominos t3trominos commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

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

  • No new on-chain callsgetEntryFee/getExitFee were already fetched and stored per vault; only the display string changed.
  • poolMeta is 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).
  • Example output: perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5%

Follow-up to #2735.

Summary by CodeRabbit

  • Bug Fixes
    • Updated displayed pool fee information to consistently include vault performance fees.
    • Improved the fee summary formatting to show management, entry, and exit fee components only when their rates are non-zero.
    • Refined percentage display to use rounded values without trailing zeros.

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

coderabbitai Bot commented Jul 11, 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: 61d64a39-2cf1-4317-94dc-670f424a2bbc

📥 Commits

Reviewing files that changed from the base of the PR and between cc94cf2 and 37e4f72.

📒 Files selected for processing (1)
  • src/adaptors/t3tris-finance/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/adaptors/t3tris-finance/index.js

📝 Walkthrough

Walkthrough

The T3tris Finance adapter now builds poolMeta fee strings from performance, management, entry, and exit fee percentages, omitting optional fees when their values are zero.

Changes

Vault fee metadata

Layer / File(s) Summary
Fee string composition
src/adaptors/t3tris-finance/index.js
poolMeta always includes the performance fee and conditionally appends non-zero management, entry, and exit fees.

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

Possibly related PRs

Suggested reviewers: 0xkr3p

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change by surfacing entry and exit fees in poolMeta, though it omits the related fee-formatting cleanup.
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

Copy link
Copy Markdown

The t3tris-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 29 passed, 29 total
Snapshots: 0 total
Time: 0.291 s
Ran all test suites.

Nb of pools: 3
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬──────────────────┬────────────┬───────────────────┬───────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────────┬───────────────────┬──────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project          │ symbol     │ tvlUsd            │ apyBase           │ apyBase7d         │ underlyingTokens                                 │ poolMeta                           │ pricePerShare     │ url                                                                                  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼──────────────────┼────────────┼───────────────────┼───────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────────┼───────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ '0x9984ad74c5fb6bec3888e14b4e453707d3be7f8f-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ 'gamiUSDC' │ 5995080.119964552 │ 0                 │ 0                 │ [ '0xaf88d065e77c8cc2239327c5edb3a432268e5831' ] │ 'perf 20.0%'                       │ 1.068022e-12      │ 'https://app.t3tris.finance/vaults/42161/0x9984ad74c5fb6bec3888e14b4e453707d3be7f8f' │
│ 1       │ '0xc84cc66300e70acd19500f639bcad7d7a8d34ba9-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ 'ellenBTC' │ 4897999.075235061 │ 0                 │ 0                 │ [ '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f' ] │ 'perf 0.0%'                        │ 1.010321823843089 │ 'https://app.t3tris.finance/vaults/42161/0xc84cc66300e70acd19500f639bcad7d7a8d34ba9' │
│ 2       │ '0x98e43a491a464f0886bc5e57207c340bbed0d01f-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ '1ST-USDC' │ 74952.12988214452 │ 15.44762343678765 │ 15.44762343678765 │ [ '0xaf88d065e77c8cc2239327c5edb3a432268e5831' ] │ 'perf 20.0%, mgmt 1.0%, exit 0.4%' │ 1.012455006937485 │ 'https://app.t3tris.finance/vaults/42161/0x98e43a491a464f0886bc5e57207c340bbed0d01f' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴──────────────────┴────────────┴───────────────────┴───────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────────┴───────────────────┴──────────────────────────────────────────────────────────────────────────────────────┘

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

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

t3trominos added a commit to t3tris-finance/yield-server that referenced this pull request Jul 12, 2026
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.
@t3trominos

t3trominos commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

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

You're right the four-fee string was too long. Rather than drop the fees, I reworked the format:

  • compact labels + / separator
  • rates with trailing zeros stripped (2-decimal precision kept, so fine rates like 0.05% aren't rounded).
  • Real vaults now render like perf 20% and perf 20%/mgmt 1%/out 0.4% (~25 chars).
  • The perf 10.0%, mgmt 2.0%, entry 0.5%, exit 0.5% case you flagged becomes perf 10%/mgmt 2%/in 0.5%/out 0.5%.

Let me know if this works for you, happy to adjust.

@github-actions

Copy link
Copy Markdown

The t3tris-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 29 passed, 29 total
Snapshots: 0 total
Time: 0.297 s
Ran all test suites.

Nb of pools: 3
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬──────────────────┬────────────┬────────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬─────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project          │ symbol     │ tvlUsd             │ apyBase            │ apyBase7d          │ underlyingTokens                                 │ poolMeta                    │ pricePerShare      │ url                                                                                  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼──────────────────┼────────────┼────────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼─────────────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ '0x9984ad74c5fb6bec3888e14b4e453707d3be7f8f-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ 'gamiUSDC' │ 5995124.962583604  │ 0                  │ 0                  │ [ '0xaf88d065e77c8cc2239327c5edb3a432268e5831' ] │ 'perf 20%'                  │ 1.068022e-12       │ 'https://app.t3tris.finance/vaults/42161/0x9984ad74c5fb6bec3888e14b4e453707d3be7f8f' │
│ 1       │ '0xc84cc66300e70acd19500f639bcad7d7a8d34ba9-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ 'ellenBTC' │ 4857994.7714372855 │ 0                  │ 0                  │ [ '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f' ] │ 'perf 0%'                   │ 1.010321823843089  │ 'https://app.t3tris.finance/vaults/42161/0xc84cc66300e70acd19500f639bcad7d7a8d34ba9' │
│ 2       │ '0x98e43a491a464f0886bc5e57207c340bbed0d01f-arbitrum' │ 'Arbitrum' │ 't3tris-finance' │ '1ST-USDC' │ 74960.78011378477  │ 15.304263854214502 │ 15.304263854214502 │ [ '0xaf88d065e77c8cc2239327c5edb3a432268e5831' ] │ 'perf 20%/mgmt 1%/out 0.4%' │ 1.0125642805725332 │ 'https://app.t3tris.finance/vaults/42161/0x98e43a491a464f0886bc5e57207c340bbed0d01f' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴──────────────────┴────────────┴────────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴─────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────────────────────┘

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