Open code423n4 opened 2 years ago
rfa
more expensive gas
https://github.com/code-423n4/2022-01-timeswap/blob/main/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L58
instead of caching state on memory. just read it directly from the storage. State memory state = pools[maturity].state;
self research on: https://remix.ethereum.org/
State storage state = pools[maturity].state;
https://github.com/Timeswap-Labs/Timeswap-V1-Core/pull/110
Handle
rfa
Vulnerability details
Impact
more expensive gas
Proof of Concept
https://github.com/code-423n4/2022-01-timeswap/blob/main/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L58
instead of caching state on memory. just read it directly from the storage. State memory state = pools[maturity].state;
Tools Used
self research on: https://remix.ethereum.org/
Recommended Mitigation Steps
State storage state = pools[maturity].state;