Skip to content

[CRASH REPORT] Approval issue for tokens similar to USDT #737

@MerlinEgalite

Description

@MerlinEgalite

Crash Report

Description

safeApprove from solmate is used here:

ERC20(address(_baseToken)).safeApprove(address(_vault), _amount);

There might be an issue if the approval is not reset to 0 at some point for tokens that behave like USDT ie tokens preventing the allowance frontrunning attack.

Expected Behavior

I don't have complete knowledge of the codebase but it's worth double checking especially if USDT or similar tokens are supposed to be handled.

Actual Behavior

On the second deposit the call will revert.

Possible Solution

Use forceApprove from OZ.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions