Use of SafeERC20 for known tokens used extra gas unnecessarily #7
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
USDV
Vader
Handle
TomFrench
Vulnerability details
Impact
Increased gas costs
Proof of Concept
In a number of places we use the
SafeERC20
library to transfer tokens which are fixed to a known implementation e.g Vader in the Converter.https://github.com/code-423n4/2021-11-vader/blob/3a43059e33d549f03b021d6b417b7eeba66cf62e/contracts/tokens/converter/Converter.sol#L124
If we know that these tokens are properly implemented then we can do away with the extra cost from
SafeERC20
and only use it when interacting with unknown tokens.Recommended Mitigation Steps
Remove use of
SafeERC20
for known good tokens.The text was updated successfully, but these errors were encountered: