PerAddressTrancheVestingMerkleDistributor claim will always revert
Summary
claim method in PerAddressTrancheVestingMerkleDistributor is sending empty data instead of tranches data to _executeClaim method and will always fail because claimableAmount will be 0 in DistributorInitializable#_executeClaim when execute claim.
Vulnerability Detail
PerAddressTrancheVestingMerkleDistributor#claim is sending empty data to _executeClaim method as parameter instead of tranches data so the PerAddressTrancheVestingInitializable#getVestedFraction will always return 0 and that makes DistributorInitializable#getClaimableAmount return 0 that will make claimableAmount equal 0 in DistributorInitializable#_executeClaim and will revert when require(claimableAmount > 0, "..."); in DistributorInitializable#_executeClaim.
Impact
PerAddressTrancheVestingMerkleDistributor is broken, Users can't claim because will always revert with message "Distributor: no more tokens claimable right now"
Code Snippet
claim method in PerAddressTrancheVestingMerkleDistributor is sending empty data to _executeClaim
nfmelendez
high
PerAddressTrancheVestingMerkleDistributor claim will always revert
Summary
claim
method inPerAddressTrancheVestingMerkleDistributor
is sending empty data instead of tranches data to_executeClaim
method and will always fail becauseclaimableAmount
will be 0 inDistributorInitializable#_executeClaim
when execute claim.Vulnerability Detail
PerAddressTrancheVestingMerkleDistributor#claim
is sending empty data to_executeClaim
method as parameter instead of tranches data so the PerAddressTrancheVestingInitializable#getVestedFraction will always return 0 and that makes DistributorInitializable#getClaimableAmount return 0 that will make claimableAmount equal 0 in DistributorInitializable#_executeClaim and will revert whenrequire(claimableAmount > 0, "...");
inDistributorInitializable#_executeClaim
.Impact
PerAddressTrancheVestingMerkleDistributor is broken, Users can't claim because will always revert with message
"Distributor: no more tokens claimable right now"
Code Snippet
claim
method inPerAddressTrancheVestingMerkleDistributor
is sending empty data to_executeClaim
https://github.com/sherlock-audit/2024-05-tokensoft-distributor-contracts-update/blob/main/contracts/packages/hardhat/contracts/claim/factory/PerAddressTrancheVestingMerkleDistributor.sol#L62
Always revert in
require(claimableAmount > 0, "...");
:https://github.com/sherlock-audit/2024-05-tokensoft-distributor-contracts-update/blob/main/contracts/packages/hardhat/contracts/claim/factory/DistributorInitializable.sol#L75-L76
Tool used
Manual Review
Recommendation
Claim function should be pretty much like
PerAddressTrancheVestingMerkle#claim
Duplicate of #11