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

Create TestCalcJoinSingleAssetTokensIn test case to fall outside of the error tolerance #1773

Open
p0mvn opened this issue Jun 11, 2022 · 3 comments

Comments

@p0mvn
Copy link
Member

p0mvn commented Jun 11, 2022

I'm confused as to why expectShares is double what is in the previous test when the total liquidity isn't being doubled

The logic was the following - here we are adding 2 tokens in that have equal weights and amounts in, so the liquidity would double. In the previous case, there was only one token in.

However, it seems that these should still not be equal because after the first join we would have more shares created for one of the tokens, right? As a result, the second join would have fewer shares returned than the first one. Seems that this test is passing because of the error tolerance

This is interesting – I wonder if we can set up a case where this falls outside of error tolerance just for proper coverage? Or would it always pass due to error tolerance?

Originally posted by @AlpinYukseloglu in #1721 (comment)

@p0mvn p0mvn changed the title Create TestCalcJoinPoolShares test case to fall outside of the error tolerance Create TestCalcJoinSingleAssetTokensIn test case to fall outside of the error tolerance Jun 11, 2022
@p0mvn
Copy link
Member Author

p0mvn commented Jun 11, 2022

We need a test case to fall outside of the error tolerance for when we are testing multi token calcs by joining one after another in calcJoinSingleAssetTokensIn.

We should be able to achieve that by having large token in values relative to the pool liquidity

@stackman27
Copy link
Contributor

Hi @p0mvn can i give this a shot?

@p0mvn
Copy link
Member Author

p0mvn commented Jun 17, 2022

Hey @stackman27 . Yes, please, that would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage 🔍
2 participants