Open code423n4 opened 2 years ago
csanuragjain
Gas wastage
Navigate to contract at https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/Dependencies/YetiCustomBase.sol
Observe that in _subColls function the last for loop is not required if n=0 since this means that all token amount is 0
Handle
csanuragjain
Vulnerability details
Impact
Gas wastage
Proof of Concept
Navigate to contract at https://github.com/code-423n4/2021-12-yetifinance/blob/main/packages/contracts/contracts/Dependencies/YetiCustomBase.sol
Observe that in _subColls function the last for loop is not required if n=0 since this means that all token amount is 0