sherlock-audit / 2024-02-tapioca-judging

2 stars 2 forks source link

AuditorPraise - WETH was never set in baseLeverageExecutor.sol #12

Open sherlock-admin3 opened 6 months ago

sherlock-admin3 commented 6 months ago

AuditorPraise

medium

WETH was never set in baseLeverageExecutor.sol

Summary

WETH State Var was never set in baseLeverageExecutor.sol

Vulnerability Details

see summary

Impact

WETH will be address zero, it won't be possible to wrap and unwrap ETH

Code Snippet

https://github.com/sherlock-audit/2024-02-tapioca/blob/main/Tapioca-bar/contracts/markets/leverage/BaseLeverageExecutor.sol#L47

Tool used

Manual Review

Recommendation

initialize the WETH state Var via the constructor.

sherlock-admin2 commented 5 months ago

1 comment(s) were left on this issue during the judging contest.

WangAudit commented:

looks like it's intended

nevillehuang commented 5 months ago

@0xRektora @maarcweiss

Just to double confirm, afaik weth seems to be never be set anywhere in the contracts so this issue is true correct?

cryptotechmaker commented 5 months ago

Fixed here https://github.com/Tapioca-DAO/Tapioca-bar/pull/346

sherlock-admin4 commented 5 months ago

The protocol team fixed this issue in PR/commit https://github.com/Tapioca-DAO/Tapioca-bar/pull/346.