SablierV2MerkleLL
and SablierV2MerkleLT
ContractDescription:
The SablierV2MerkleLockupFactory::createMerkleLL
functions does not transmit the aggregateAmount
to the newly instantiated MerkleLockup
. Consequently, the MerkleLockup
contract lacks a mechanism to validate whether the deposited amount aligns with the required aggregateAmount
. This oversight, due to manual handling the deposit process, may lead to discrepancies where the airdrop admin deposits an amount either higher or lower than the aggregateAmount
.
Impact:
Without this verification, the contract still operates, but several issues may arise:
If the deposited amount exceeds the aggregateAmount
and the grace period has elapsed, the surplus amount will be irretrievable.
If the deposited amount falls short of the aggregateAmount
, some users may be unable to claim. However, this scenario can be rectified by supplementing the deposit with additional tokens.
Proof of Concept:
Given the second scenario's lesser severity and its ease of correction, only the first scenario is illustrated here:
Adjust the funding to ensure the deposited amount surpasses the AGGREGATE_AMOUNT
= numberOfRecipients
* CLAIM_AMOUNT
:
Incorporate the following test into the v2-periphery/test/integration/merkle-lockup/ll/claim/claim.t.sol
test suite:
Recommended Mitigation:
To address this issue, assets should be transferred in the constructor or an initialization function. Additionally, ensure the correct amount is deposited by transmitting the aggregated amount from the factory contract when creating the MerkleLock contracts.
https://www.codehawks.com/contests/clvb9njmy00012dqjyaavpl44
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.