Anchor-Protocol / Anchor-Protocol/anchor-web-app
Expected interest earnings for Month/Week/Day calculated incorrectly.
- Dominant language
- TypeScript
- Stars
- 99
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
It looks like the Monthly/weekly/daily earnings are simply calculated by taking the expected interest in APY for the year and dividing by 12/52/365. This is incorrect as the interest rate displayed is APY, meaning it compounds/accelerates over time
meaning just dividing is going to make the interest appear linear, which is not how it works in reality.
For example, if my balance is $1000, and the APY is 19.49%, the APR is 17.78%, which means the daily earnings should be $0.487 ((1000*.1778)/365).
Instead, the earn page will show $0.534 ((1000*.1949)/365), making it off by a significant margin.
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is identified in the issue. Start by locating the earn-page calculation for monthly, weekly, and daily earnings, then verify it against the APY/APR example provided. Done means the displayed values use the intended rate conversion and tests cover the corrected calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- fintech-quant, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100