In FactoryDisputeGame.sol, resolveClaim allows user to redeem bonds.
Vulnerability Detail
It's redundant to have the function that unlocks WETH for the user to redeem after the airgap to have a payable function. Since the function only allows users to redeem and any ether sent is not utilized, the user will lose ether too.
function resolveClaim(uint256 _claimIndex) external payable { // remove payable
Impact
Ether isn't used and if resolveClaim called with ETH sent will be lost.
resolveClaim
accepts ether without any purposeLow/Info issue submitted by eeshenggoh
Summary
In
FactoryDisputeGame.sol
,resolveClaim
allows user to redeem bonds.Vulnerability Detail
It's redundant to have the function that unlocks WETH for the user to redeem after the airgap to have a payable function. Since the function only allows users to redeem and any ether sent is not utilized, the user will lose ether too.
Impact
Ether isn't used and if
resolveClaim
called with ETH sent will be lost.Code Snippet
https://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L405
Tool used
Manual Review
Recommendation
Convert function to non-payable.