diff --git a/contracts/staking/contracts/src/fees/MixinExchangeFees.sol b/contracts/staking/contracts/src/fees/MixinExchangeFees.sol index 576fbe22db..a5af8526c5 100644 --- a/contracts/staking/contracts/src/fees/MixinExchangeFees.sol +++ b/contracts/staking/contracts/src/fees/MixinExchangeFees.sol @@ -161,15 +161,8 @@ contract MixinExchangeFees is private view { - if (protocolFeePaid == 0) { - LibRichErrors.rrevert( - LibStakingRichErrors.InvalidProtocolFeePaymentError( - LibStakingRichErrors.ProtocolFeePaymentErrorCodes.ZeroProtocolFeePaid, - protocolFeePaid, - msg.value - ) - ); - } + // The protocol fee must equal the value passed to the contract; unless + // the value is zero, in which case the fee is taken in WETH. if (msg.value != protocolFeePaid && msg.value != 0) { LibRichErrors.rrevert( LibStakingRichErrors.InvalidProtocolFeePaymentError( diff --git a/contracts/staking/contracts/src/libs/LibStakingRichErrors.sol b/contracts/staking/contracts/src/libs/LibStakingRichErrors.sol index 30117d9ce8..83ab9c52b2 100644 --- a/contracts/staking/contracts/src/libs/LibStakingRichErrors.sol +++ b/contracts/staking/contracts/src/libs/LibStakingRichErrors.sol @@ -30,7 +30,6 @@ library LibStakingRichErrors { } enum ProtocolFeePaymentErrorCodes { - ZeroProtocolFeePaid, MismatchedFeeAndPayment }