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

Can remove as this causes a double count #20

Open
0xVonBismarck opened this issue Sep 15, 2022 · 1 comment
Open

Can remove as this causes a double count #20

0xVonBismarck opened this issue Sep 15, 2022 · 1 comment

Comments

@0xVonBismarck
Copy link
Collaborator

https://github.com/CanzaApps/Baki-contracts/blob/a30a237c6468ffd4b45eca6f125c6f487b305cce/contracts/Vault.sol#L607-L627

Since we are already applying all the changes in the depositMint and RepayWithdraw functions before we trigger the test impact, we do not need to calculate the adjusted netMint since the netMint is already updated for the movements. Therefore if we do it again here we are double counting the movements.

i.e. if the NetMint is increased by 10 the Mint function will increase it by ten and then when we do the test we will be increasing that netMint once again by 10, causing the test to use 20 rather than 10.

@David405
Copy link
Collaborator

David405 commented Sep 15, 2022

Not sure I understand this, the testImpact does NOT make any changes to state variables.

I think I see what you mean now.

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

No branches or pull requests

2 participants