You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lack of a limit on the number of wallets and token amounts processed in a single transaction can cause excessive gas consumption, making the claim() unusable for other users as the transaction exceeds the block gas limit.
Root Cause
In the claim() , the loop processing projectTokenProxyWallets and tokenAmountsToClaim arrays does not enforce a maximum length. This allows attackers to craft transactions with excessively long arrays that consume too much gas.
for (uint256 i =0; i < _params.projectTokenProxyWallets.length; i++) {
projectToken.safeTransferFrom(
_params.projectTokenProxyWallets[i],
msg.sender,
_params.tokenAmountsToClaim[i]
);
}
Internal pre-conditions
No response
External pre-conditions
The Ethereum network has a block gas limit that restricts the amount of computation or storage a block can handle.
Attack Path
Bob (the attacker) constructs _params with an excessively large number of projectTokenProxyWallets and tokenAmountsToClaim.
Bob Calls claim() submits the malicious transaction.
The loop in the claim() function consumes so much gas that the transaction cannot be processed within the block gas limit.
Bob's transaction fails but blocks other valid transactions in the same block.
Repeated attacks can prevent legitimate users from using the claim() function.
Impact
This can disrupt the protocol by making the claim() function unusable for all users. Repeated attacks can block legitimate transactions, causing frustration and delays.
PoC
No response
Mitigation
Enforce a maximum size for projectTokenProxyWallets and tokenAmountsToClaim in the claim() function.
The text was updated successfully, but these errors were encountered:
sherlock-admin3
changed the title
Rare Taffy Bear - Excessive Gas Consumption (Block Gas Limit DoS)
imkapadia - Excessive Gas Consumption (Block Gas Limit DoS)
Nov 23, 2024
imkapadia
Medium
Excessive Gas Consumption (Block Gas Limit DoS)
Summary
The lack of a limit on the number of wallets and token amounts processed in a single transaction can cause excessive gas consumption, making the
claim()
unusable for other users as the transaction exceeds the block gas limit.Root Cause
In the
claim()
, the loop processingprojectTokenProxyWallets
andtokenAmountsToClaim
arrays does not enforce a maximum length. This allows attackers to craft transactions with excessively long arrays that consume too much gas.https://github.com/sherlock-audit/2024-11-vvv-exchange-update/blob/main/vvv-platform-smart-contracts/contracts/vc/VVVVCTokenDistributor.sol#L130-L136
Internal pre-conditions
No response
External pre-conditions
The Ethereum network has a block gas limit that restricts the amount of computation or storage a block can handle.
Attack Path
_params
with an excessively large number ofprojectTokenProxyWallets
andtokenAmountsToClaim
.claim()
submits the malicious transaction.claim()
function consumes so much gas that the transaction cannot be processed within the block gas limit.claim()
function.Impact
This can disrupt the protocol by making the
claim()
function unusable for all users. Repeated attacks can block legitimate transactions, causing frustration and delays.PoC
No response
Mitigation
Enforce a maximum size for
projectTokenProxyWallets
andtokenAmountsToClaim
in theclaim()
function.The text was updated successfully, but these errors were encountered: