mento-protocol / mento-core

Core smart contracts of the Mento protocol.
https://mento.org
GNU General Public License v3.0
24 stars 11 forks source link

Fix/sherlock finding nr 4 #412

Closed baroooo closed 7 months ago

baroooo commented 7 months ago

Description

This PR uses history storage var instead of memory variable to fix Sherlock contest finding #4 It also introduces a lower limit of 1e18 for lock creation as extra protection against dust attacks

Other changes

Tested

Related issues

openzeppelin-code[bot] commented 7 months ago

Fix/sherlock finding nr 4

Generated at commit: c832b3ba43482a4aa351a28c1c8f665167b26553

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
13
38
57
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

baroooo commented 7 months ago

LGTM 💯 how did you come up with the gas base lines in GovernanceIntegration.gas.t.sol?

rounded up the gas cost of the same operations with single locks