Submitted by 0xlemon, also found by MrPotatoMagic
https://github.com/code-423n4/2024-12-bakerfi/blob/main/contracts/core/VaultRouter.sol#L114
VaultRouter allows users to use permit transactions for convenience. This router is supposed to work with any ERC20 tokens. We can see in pullTokensWithPermit how the permit is utilized:
However this .permit doesnt work with DAI tokens because DAI tokens permit signature is different. From the contract at address 0x6B175474E89094C44Da98b954EedeAC495271d0F, we see the permit function:
The nonce and allowed arguments are added to DAIs permit that means calling pullTokensWithPermit where DAI is the token will revert.
Permit cannot be used with DAI tokens
For the special case of DAI token, allow a different implementation of the permit function which allows nonce and allowed variables.
chefkenji (BakerFi) acknowledged
