code-423n4 / 2021-04-vader-findings

1 stars 0 forks source link

Function can be simplified #263

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

s1m0

Vulnerability details

Impact

The following function is unnecessarily complicated.

Proof of Concept

https://github.com/code-423n4/2021-04-vader/blob/main/vader-protocol/contracts/USDV.sol#L195

Tools Used

Manual analysis

Recommended Mitigation Steps

The token argument can be omitted due to the fact the function is internal and only called with VADER. The outer if can be omitted.