You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The permitAndSubmitTransfers function utilizes the lyra’s permit function so that approve and pull operations can happen in a single transaction instead of two consecutive transactions.
Attack:
_Permit () functionality uses the nonces mapping for replay protection. Once a signature is verified and approved, the nonce increases, invalidating the same signature being replayed.
permitAndSubmitTransfers expects the holder to sign their tokens and provide the signature to contract as part of permitData
When a permitAndSubmitTransfers transaction is in the mempool, an attacker can take this signature, call the external permit() function on the token themselves.
Since this is a valid signature, the token accepts it and increases the nonce.
This makes the spender's transaction fail whenever it gets mined.
Bug Description
Where
permitAndSubmitTransfer and permitAndSubmitTransfers
Expected behavior:
Attack:
When a permitAndSubmitTransfers transaction is in the mempool, an attacker can take this signature, call the external permit() function on the token themselves.
Impact
Risk Breakdown
Recommendation
Reference
https://github.com/1inch/solidity-utils/blob/master/contracts/libraries/SafeERC20.sol#L299
https://github.com/Gearbox-protocol/core-v3/blob/main/contracts/credit/CreditFacadeV3.sol#L775
The text was updated successfully, but these errors were encountered: