-
Notifications
You must be signed in to change notification settings - Fork 5
Liquidity functions #47
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
Conversation
ultrasecreth
commented
Aug 13, 2022
- Small test improvements
- Implement maxFYTokenIn
- WIP maxFYTokenOut
- maxFYTokenOut working
- maxSharesIn working
- liquidity methods added to the Pool
- Add tests for liquidity methods at the pool level, fix bug on sellFYTokenPreview
| // I should have got the max (rounding error allowed) | ||
| assertEq(asset.balanceOf(bob), bobAssetBefore + maxBaseOut - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected?, I've been thinking about it and it may be a problem for someone wanting to buy an exact amount
devtooligan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i went through the logic pretty deeply, i think it loos good.
some nit stuff on comments and a few questions to think about.
marco is gonna review the math as well.
i want to spend some time w the tests which i will do tomorrow but wanted to post these comments now
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
|
Let's remember to lint this right before it gets merged. I don't wanna lint it now because i'm afraid changes will get lost in the diff |
devtooligan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but I'd still like to have a discussion around the methodology used with the "regular" pow function and explore whether:
a) It is appropriate to use that methodology in all edge cases
b) It can be used for the third max function
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
yeah, I think I mentioned this somewhere I think, the linter in VSCode was changing so many things I decided not to, so the PR was clean. |
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: devtooligan <71567643+devtooligan@users.noreply.github.com>
Co-authored-by: marcomariscal <42938673+marcomariscal@users.noreply.github.com>
Co-authored-by: marcomariscal <42938673+marcomariscal@users.noreply.github.com>
Co-authored-by: marcomariscal <42938673+marcomariscal@users.noreply.github.com>
Should we schedule a zoom call? |