Storage usage is reduced to 2 slots.
That means 25000 3 gas is saved on each storage update.
Plus 1000 3 gas per each storage read is saved.
Recommended code:
struct Receipt {
uint32 id; // up-to 4B receipts possible to store
uint32 timeDeposited; // the time the deposit was made
uint32 timeWithdrawn; // the time the deposit was withdrawn, or 0 if not withdrawn yet
address owner; // the owner of the deposit
uint256 amountDepositedWei; // amount of tokens originally deposited
}
Impact
Pool struct can be tightly packed into smaller size.
~25k gas is saved per each slot write to storage.
~1k gas is saved per each slot read from storage.
Current code uses:
Storage usage is reduced to min. 11 slots.
That means 25000 5 gas is saved on each storage update.
Plus 1000 5 gas per each storage read is saved.
Recommended code:
struct Pool {
uint128 taxPerCapita; // portion of rewards that go to the contract creator
uint32[] rewardsWeiPerSecondPerToken; // array of reward rates, this number gets multiplied by time and tokens (not wei) to determine rewards
uint32 id; // primary key
uint32 numReceipts; // number of receipts issued
uint32 startTime; // the time that the pool begins
uint32 endTime; // time that the pool ends
address depositToken; // token that user deposits (stakes)
address excessBeneficiary; // address that is able to reclaim unused rewards
address[] rewardTokens; // array of token contract addresses that stakers will receive as rewards
mapping (uint32 => Receipt) receipts; // mapping of receipt ids to receipt structs
uint256[] rewardsWeiClaimed; // bookkeeping of how many rewards have been paid out for each token
uint256[] rewardFunding; // bookkeeping of how many rewards have been supplied for each token
uint256 maximumDepositWei; // the size of the pool, maximum sum of all deposits
uint256 totalDepositsWei; // current sum of all deposits
}
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
As per 0.8.4 solidity version it supports new custom errors.
Custom errors are reducing 38 gas if condition is met and 22 gas otherwise.
Also reduces contract size and deployment costs.
Impact
Receipt struct can be tightly packed into smaller size. ~25k gas is saved per each slot write to storage. ~1k gas is saved per each slot read from storage. Current code uses 5 slots 32 bytes each. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/PermissionlessBasicPoolFactory.sol#L15-L21
Proof of Concept
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Tools Used
Recommended Mitigation Steps
Storage usage is reduced to 2 slots. That means 25000 3 gas is saved on each storage update. Plus 1000 3 gas per each storage read is saved.
Recommended code:
Impact
Pool struct can be tightly packed into smaller size. ~25k gas is saved per each slot write to storage. ~1k gas is saved per each slot read from storage. Current code uses:
Proof of Concept
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Tools Used
Recommended Mitigation Steps
Storage usage is reduced to min. 11 slots. That means 25000 5 gas is saved on each storage update. Plus 1000 5 gas per each storage read is saved.
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/PermissionlessBasicPoolFactory.sol#L158
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleVesting.sol#L111
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleResistor.sol#L225
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleResistor.sol#L142
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleIdentity.sol#L141
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleIdentity.sol#L153
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleEligibility.sol#L60
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/MerkleEligibility.sol#L71
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/FixedPricePassThruGate.sol#L39
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/FixedPricePassThruGate.sol#L47
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Storage keyword is recommended to be used whenever possible. It can save up-to 2k gas per each variable with memory keyword (if updating storage up-to 5-10k). Memory keyword is supposed to be used when temporary data is being updated and calculated regularly. Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/e22a562c01c533b8765229387894cc0cb9bed116/contracts/SpeedBumpPriceGate.sol#L51
Proof of Concept
https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/FixedPricePassThruGate.sol#L48
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/FixedPricePassThruGate.sol#L54
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleDropFactory.sol#L77
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleDropFactory.sol#L90
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleDropFactory.sol#L92
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleDropFactory.sol#L98
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleDropFactory.sol#L107
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleEligibility.sol#L86
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleEligibility.sol#L89
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleIdentity.sol#L97
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleIdentity.sol#L124
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleIdentity.sol#L127
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L82
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L83
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L121
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L136
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L138
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L144
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L149
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L171
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L175
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleResistor.sol#L204
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L89
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L106
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L113
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L141
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L145
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/MerkleVesting.sol#L147
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L112
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L148
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L159
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L160
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L182
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L183
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L184
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L185
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L199
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L211
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L213
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L214
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L215
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L234
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L244
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L245
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L246
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L254
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L263
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L271
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L315
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/PermissionlessBasicPoolFactory.sol#L316
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/SpeedBumpPriceGate.sol#L67
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/SpeedBumpPriceGate.sol#L80
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L123
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L124
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L184
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L199
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L217
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L239
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L240
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L262
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L305
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L306
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L437
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L449
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code: https://github.com/code-423n4/2022-05-factorydao/tree/main/contracts/VoterID.sol#L450
Proof of Concept
https://blog.soliditylang.org/2021/04/21/custom-errors/
Tools Used
Recommended Mitigation Steps
Recommended code:
Impact
Solidity 0.8.0 introduced SafeMath enabled by default for any math operation. To improve gas usage unchecked keyword is recommended in for cycle. It reduces 49 gas per each iteration in cycle.
Affected code: https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/MerkleLib.sol#L22-L24
Proof of Concept
https://docs.soliditylang.org/en/v0.8.13/080-breaking-changes.html#:~:text=Arithmetic%20operations
Tools Used
Recommended Mitigation Steps
Saves 49 * numberOfIterationsInTheLoop gas.
Recommended code: