Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Conversation

@guille-block
Copy link

I just finished part 3 of the echidna streaming series and I noticed that coverage didnt marked * on liquidity mint after the intial scenario were totalSupply was cero. I modified our invariant test to extend this and have full coverage on UniswapPair mint() function.

image

I moved the initial preconditions and action to a public function: mintLiquidty() that can be called previous to our target test testProvideLiquidity(). Additionaly, I modified the amount bounding to only account for the initial liquidity minting which is the only moment where we need to provide at least 1000 tokens.

image

Looking forward to get some feedback and keep learning from the streaming series!

@CLAassistant
Copy link

CLAassistant commented Jan 27, 2023

CLA assistant check
All committers have signed the CLA.

@technovision99
Copy link
Contributor

Hmm, that's a bit odd. The fuzzer should be able to get that line just by calling testProvideLiquidity multiple times. In fact I tested this with testLimit: 20000 and it could hit that line.

@guille-block
Copy link
Author

I see, It makes sense if it calls testProvideLiquidity multiple times. I will try running the fuzzer with testLimit: 20000 looking for this then.
Just a thought, after the first call to testProvideLiquidity there is no need to bound the amount between 1000 and uint(-1), correct?
Thanks for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants