Some tokens (e.g. UNI, COMP) revert if the value passed to approve or transfer is larger than uint96.
In the function _approve(address sablierContract, IERC20 asset, uint256 amount), if the contract's allowance is insufficient, the contract forcefully approves Sablier to spend the exact amount
set to the maximum value of uint256 using the forceApprove() function to ensure the stream operation can proceed.
`/// @dev Helper function to approve a Sablier contract to spend funds from the batchLockup. If the current allowance
/// is insufficient, this function approves Sablier to spend the exact `amount`.
/// The {SafeERC20.forceApprove} function is used to handle special ERC-20 assets (e.g. USDT) that require the
/// current allowance to be zero before setting it to a non-zero value.
function _approve(address sablierContract, IERC20 asset, uint256 amount) internal {
uint256 allowance = asset.allowance({ owner: address(this), spender: sablierContract });
if (allowance < amount) {
asset.forceApprove({ spender: sablierContract, value: amount });
}
}`
However, Some tokens (e.g., UNI, COMP) revert if the value passed to approve or transfer is larger than uint96.
Revert on large approvals
Manual Review
Recommend handling tokens of this type.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.