Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 712 Bytes

011.md

File metadata and controls

28 lines (18 loc) · 712 Bytes

Fanz

medium

function approveToRouter add more risk for protocols

Summary

function approveToRouter add more risk for protocols

Vulnerability Detail

it is not likely happen but in case:

  • control account using as onlyControl modifier got hacked then set uniRouter to another address then call to approveToRouter then stolen all the funds
  • suddenly uniswap pool exploited with approve max the funds could be stolen

Anyway approve max value is bad practices

Impact

Protocols could be losing funds

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L242-L247

Tool used

Manual Review

Recommendation

Remove approve all funds for router