diff --git a/solidity/contracts/modules/dispute/BondedDisputeModule.sol b/solidity/contracts/modules/dispute/BondedDisputeModule.sol index 9c43ea64..bc4482de 100644 --- a/solidity/contracts/modules/dispute/BondedDisputeModule.sol +++ b/solidity/contracts/modules/dispute/BondedDisputeModule.sol @@ -48,7 +48,7 @@ contract BondedDisputeModule is Module, IBondedDisputeModule { function onDisputeStatusChange( bytes32 _disputeId, IOracle.Request calldata _request, - IOracle.Response calldata, /* _response */ + IOracle.Response calldata _response, /* _response */ IOracle.Dispute calldata _dispute ) external onlyOracle { RequestParameters memory _params = decodeRequestData(_request.disputeModuleData); @@ -70,6 +70,7 @@ contract BondedDisputeModule is Module, IBondedDisputeModule { _amount: _params.bondSize }); } else if (_status == IOracle.DisputeStatus.Won) { + if (_dispute.proposer != _response.proposer) revert BondedDisputeModule_OnlyResponseProposer(); // Disputer won, we pay the disputer and release their bond _params.accountingExtension.pay({ _requestId: _dispute.requestId, diff --git a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol b/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol index cfe2ff61..455c8c3a 100644 --- a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol +++ b/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol @@ -15,6 +15,14 @@ import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; * the tokens are either returned to the disputer or to the proposer. */ interface IBondedDisputeModule is IDisputeModule { + /*/////////////////////////////////////////////////////////////// + ERRORS + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Thrown when the response proposer tries to dispute the response + */ + error BondedDisputeModule_OnlyResponseProposer(); /*/////////////////////////////////////////////////////////////// STRUCTS //////////////////////////////////////////////////////////////*/