-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
IRS Query for frontend #724
Comments
Swap UT to YTinternally
UT required (x) = YT desired - PT swapped to UT let YT desired = y
The same method uses on |
Swap YT to UT (not matured)chain/x/irs/keeper/swap_advanced.go
Because redeem has a time lag, this is too difficult to achieve. For now, it should be limited to maturities. |
Redeem PT & YT to UTPT Required = UT desired * PT Supply / moduleBonded So, UT desired (output) = PT Required (input) * moduleBonded / PT Supply The same method can be for the reverse. |
Add Liquidity (UT & PT) to LP tokenUT required = UT Pool Liquidity * LP desired / Pool Total Share (Ceil) So, LP desired (output) = UT required (input) * Pool Total Share / UT Pool Liquidity The same method can be for the reverse. |
There are several Msg that require specifying the amount requested in the IRS, which hinders UX.
The following query is needed to resolve this. (not sure if this can be achieved)
Need queries that return a right estimate for the left input.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: