Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pt mint & calc APY #732

Merged
merged 9 commits into from
Mar 5, 2024
Merged

fix: pt mint & calc APY #732

merged 9 commits into from
Mar 5, 2024

Conversation

Senna46
Copy link
Contributor

@Senna46 Senna46 commented Mar 1, 2024

There are two different formulas, the former probably incorrect.
I fixed it.

line 55

// PT mint amount = usedUnderlying * (1-(strategyAmount)/interestSupply)

line 114

PT mint amount = usedUnderlying * (1-(strategyAmount-ptAmount)/interestSupply)

@Senna46
Copy link
Contributor Author

Senna46 commented Mar 4, 2024

Improved missing rate reflections
Added option to APY query.

The base YT APY of 10 YT applies
YT's APY will be the contract's APY multiplied by YT's swap rate
YT APY = stATOM APY * SwapRate (stATOM => YT)

@Senna46 Senna46 changed the title fix: pt mint conflict fix: pt mint & calc APY Mar 5, 2024
@Senna46 Senna46 merged commit 85a5b8a into irs_module Mar 5, 2024
1 of 2 checks passed
@Senna46 Senna46 deleted the fix/pt-mint-conflict branch March 5, 2024 07:29
@Senna46 Senna46 mentioned this pull request Mar 12, 2024
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.

1 participant