code-423n4 / 2022-01-timeswap-findings

2 stars 0 forks source link

Immutable variable `TimeswapConvenience:weth` should be 0 address checked #180

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Dravee

Vulnerability details

Impact

As mistakes happen, address(0) checks should be made to avoid having to redeploy contracts

Proof of Concept

Here, the variable weth can't be updated after deployment: https://github.com/code-423n4/2022-01-timeswap/blob/5960e07d39f2b4a60cfabde1bd51f4b1e62e7e85/Timeswap/Timeswap-V1-Convenience/contracts/TimeswapConvenience.sol#L64

Tools Used

VS Code

Recommended Mitigation Steps

Add the address(0) check

Mathepreneur commented 2 years ago

Duplicate of #104