Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Some token revert on large approval

Vulnerability Details

In SablierV2MerkleLL, constructor approve token with (uint256).max value:

constructor(
    MerkleLockup.ConstructorParams memory baseParams,
    ISablierV2LockupLinear lockupLinear,
    LockupLinear.Durations memory streamDurations_
)
    SablierV2MerkleLockup(baseParams)
{
    LOCKUP_LINEAR = lockupLinear;
    streamDurations = streamDurations_;

    // Max approve the Sablier contract to spend funds from the MerkleLockup contract.
    ASSET.forceApprove(address(LOCKUP_LINEAR), type(uint256).max);   //  <---
}

Some tokens like UNI or COMP revert when approve with big number link, which will lead to constructor revert

Impact

Some token are not able to be used in the protocol due to revert on large approve

Tools Used

Manual review

Recommendations

Only approve with necessary number when transfer token.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

ERC20 UNI and COMP Revert on Large Approvals

Support

FAQs

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