Support self-appreciating vote-lock vaults (vlRSR) - #1072
Conversation
vlRSR converts DTF fee rewards to RSR via its tokenJar and streams them back into the vault, so the share/asset exchange rate grows over time. Register assumed 1:1 shares/assets and manual reward claims everywhere. - Vote-lock drawer: unlock is now share-denominated via redeem(shares) for all vaults; lock/unlock tabs show live previewDeposit/previewRedeem quotes (debounced, auto-refreshing, animated) plus an exchange-rate line - Governance card: catalog-driven Automatic claiming (decoupled from governed-DTF count), exchange rate + redeemable display, compounded APY - Portfolio: live redeemable (maxWithdraw) + rate for flagged vaults with API fallback; APY compounded for self-appreciating vaults - Earn: TVL/Your lock corrected to underlying terms (index + yield stRSR tables), APY label + daily-compounded rate for vlRSR - Overview: lock CTA shows compounded APY for self-appreciating vaults - vlRSR token logo; SELF_APPRECIATING_VOTE_LOCK_VAULTS catalog in constants - SDK bumped to 0.5.1 (prepareVoteLockRedeem, VoteLockState.shareBalance/ exchangeRate, vote-lock preview hooks) - e2e: vote-lock drawer flow spec (redeem calldata), central vault mocks
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (36)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Deploying register-app with
|
| Latest commit: |
845ba48
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a1a0be88.register-app.pages.dev |
| Branch Preview URL: | https://feature-vlrsr-self-appreciat.register-app.pages.dev |
Summary
vlRSR on BSC is the first self-appreciating vote-lock vault: DTF fee rewards are converted to RSR by the vault's tokenJar and stream back in, so the share/asset exchange rate grows over time (~1.019 today) instead of rewards being claimed manually. Register assumed 1:1 shares/assets and claimable rewards on every vote-lock surface.
Changes
Vote-lock drawer
previewRedeem, tx =redeem(shares, account, account)(previews are exact for legacy 1:1 vaults too, so one code path). Fixes the pre-existing mislabel where the unlock input was asset-denominated but labeled with the share symbol.previewDepositshares-out quote.Governance page
SELF_APPRECIATING_VOTE_LOCK_VAULTScatalog in constants replaces the hardcoded in-component set; "Automatic" claiming no longer requires other governed DTFs.Portfolio
maxWithdraw) + rate via RPC with API fallback on error; a successful zero read is trusted (no phantom positions after full redeem).Earn
rsrEquivalentmath).Misc
prepareVoteLockRedeem,VoteLockState.shareBalance/exchangeRate, vote-lock preview hooks).Testing
vote-lock-drawer.spec.ts: decodes the submittedredeemcalldata against the bsc/photon fixture at a real 1.0188 rate; lock-quote display assertion.totalAssets.Notes