Closed code423n4 closed 2 years ago
WatchPug
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManager.sol#L29-L29
uint constant public SECONDS_IN_ONE_MINUTE = 60;
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/YETI/CommunityIssuance.sol#L21-L21
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/YETI/LockupContract.sol#L25-L25
uint constant public SECONDS_IN_ONE_YEAR = 31536000;
For the constants that should not be public, changing them to private / internal can save some gas.
public
private
internal
Duplicate #95
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManager.sol#L29-L29
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/YETI/CommunityIssuance.sol#L21-L21
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/YETI/LockupContract.sol#L25-L25
For the constants that should not be
public
, changing them toprivate
/internal
can save some gas.