Protocol fee amount is not enforced by staking contract
This commit is contained in:
parent
22e39f782f
commit
9ac715f99d
@ -161,15 +161,8 @@ contract MixinExchangeFees is
|
|||||||
private
|
private
|
||||||
view
|
view
|
||||||
{
|
{
|
||||||
if (protocolFeePaid == 0) {
|
// The protocol fee must equal the value passed to the contract; unless
|
||||||
LibRichErrors.rrevert(
|
// the value is zero, in which case the fee is taken in WETH.
|
||||||
LibStakingRichErrors.InvalidProtocolFeePaymentError(
|
|
||||||
LibStakingRichErrors.ProtocolFeePaymentErrorCodes.ZeroProtocolFeePaid,
|
|
||||||
protocolFeePaid,
|
|
||||||
msg.value
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (msg.value != protocolFeePaid && msg.value != 0) {
|
if (msg.value != protocolFeePaid && msg.value != 0) {
|
||||||
LibRichErrors.rrevert(
|
LibRichErrors.rrevert(
|
||||||
LibStakingRichErrors.InvalidProtocolFeePaymentError(
|
LibStakingRichErrors.InvalidProtocolFeePaymentError(
|
||||||
|
@ -30,7 +30,6 @@ library LibStakingRichErrors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum ProtocolFeePaymentErrorCodes {
|
enum ProtocolFeePaymentErrorCodes {
|
||||||
ZeroProtocolFeePaid,
|
|
||||||
MismatchedFeeAndPayment
|
MismatchedFeeAndPayment
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user