Skip to content

B11: APR vs APY clarity#181

Open
cyberdocs120 wants to merge 1 commit into
Dgetsylver:mainfrom
cyberdocs120:b11-apr-vs-apy-clarity
Open

B11: APR vs APY clarity#181
cyberdocs120 wants to merge 1 commit into
Dgetsylver:mainfrom
cyberdocs120:b11-apr-vs-apy-clarity

Conversation

@cyberdocs120
Copy link
Copy Markdown

Summary

Labels every user-facing rate with its compounding convention and locks in the chosen convention with unit tests.

Changes

frontend/index.html — Added rate-convention-badge spans to all previously unlabeled rate displays: hero Net APY, position Net APY, preview Est. net APY, vault Net APY, vault Supply APY, vault Borrow APY. The APR grid rows (Interest APY, BLND APR, Net APY*) already had badges; the footnote was already present.

frontend/src/style.css — Added .rate-convention-badge style (the class was referenced in HTML but had no CSS definition).

docs/apr-vs-apy.md — New glossary: APR/APY definitions, the aprToApy formula, a table of every rate display location with its convention, and an explanation of the APY* mixed convention.

frontend/test/apr-apy-convention.test.ts — 18 unit tests across 5 suites: aprToApy formula, projectRates returns APR (pre-conversion), display convention (interest→APY, BLND→APR), net APY* mixed convention, rate model sanity. All pass.

Convention

Rate Convention Reason
Interest (supply/borrow) APY Blend accrues continuously via b_rate/d_rate
BLND emissions APR Linear token distribution, no auto-compound
Net rows APY* Mixed: APY interest + APR BLND (slight overestimate, disclosed)

Acceptance criteria

  • ✅ Every user-facing rate is labeled APR or APY correctly
  • ✅ Glossary entry in docs/apr-vs-apy.md
  • ✅ Unit tests lock in the chosen convention

Closes #38

… tests

- Add .rate-convention-badge CSS (class was used but unstyled)
- Add APY*/APY badges to hero Net APY, position Net APY, preview Est. net
  APY, vault Net APY, vault Supply APY, vault Borrow APY
- APR grid rows (Interest APY, BLND APR, Net APY*) already had badges
- Add docs/apr-vs-apy.md glossary with convention table and math
- Add 18 unit tests in test/apr-apy-convention.test.ts covering:
  aprToApy formula, projectRates returns APR, display convention
  (interest→APY, BLND→APR), net APY* mixed convention, rate model sanity

Closes Dgetsylver#38
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@cyberdocs120 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

B11: APR vs APY clarity

1 participant