The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

`SmartVaultV3:: swap` will fail for `PAXG` due to `Uniswap Router` incompatibility with Fee-on-transfer tokens

Summary

PAXG token has fees on every transfers. swap on SmartVaultV3 will fail due to incompatibility with Uniswap router.

Vulnerability Details

PAXG token has fees on every transfer, which goes to treasury. SmartVaultV3 has swap function which can be called by the vault owner to swap his collateral to other whitelisted tokens. This function will work perfectly with all other tokens mentioned, but will fail for PAXG, as it has fees on every transfers.

Here is quote from Uniswap.
Fee-on-transfer tokens will not function with our router contracts. As a workaround, the token creators may create a token wrapper or a customized router. We will not be making a router that supports fee-on-transfer tokens in the future. Source

Impact

User won't be able to swap PAXG to Other available tokens, similarly other tokens can't be swapped to PAXG.

Tools Used

Manual Review

Recommendations

Here are some of the recommendations.

  1. Don't allow swap from and to PAXG on contract level and in Front end.

  2. Create a token wrapper or use uniswap V2 Router for swapping fees on transfers.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

fee-on-transfer

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope
Assigned finding tags:

fee-on-transfer

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.