diff --git a/proto/dymensionxyz/dymension/eibc/authz.proto b/proto/dymensionxyz/dymension/eibc/authz.proto index 554a48da7..a7995459d 100644 --- a/proto/dymensionxyz/dymension/eibc/authz.proto +++ b/proto/dymensionxyz/dymension/eibc/authz.proto @@ -29,8 +29,8 @@ message RollappCriteria { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - // min_lp_fee_percentage is the minimum fee earning percentage the LP is willing to get from a demand order - cosmos.base.v1beta1.DecProto min_lp_fee_percentage = 4 [ + // min_fee_percentage is the minimum gross fee earning percentage the LP is willing to get from a demand order + cosmos.base.v1beta1.DecProto min_fee_percentage = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecProto" ]; diff --git a/x/eibc/client/cli/authz.go b/x/eibc/client/cli/authz.go index e410f668b..de67e09a8 100644 --- a/x/eibc/client/cli/authz.go +++ b/x/eibc/client/cli/authz.go @@ -21,7 +21,7 @@ const ( FlagExpiration = "expiration" FlagRollapp = "rollapp" FlagDenoms = "denoms" - FlagMinLPFeePercentage = "min-lp-fee-percentage" + FlagMinFeePercentage = "min-fee-percentage" FlagMaxPrice = "max-price" FlagOperatorFeeShare = "operator-fee-share" FlagSettlementValidated = "settlement-validated" @@ -59,16 +59,16 @@ Examples: return fmt.Errorf("failed to get denoms: %w", err) } - minFeeStr, err := cmd.Flags().GetString(FlagMinLPFeePercentage) + minFeeStr, err := cmd.Flags().GetString(FlagMinFeePercentage) if err != nil { return fmt.Errorf("failed to get min fee: %w", err) } minFeePercDec, err := sdk.NewDecFromStr(minFeeStr) if err != nil { - return fmt.Errorf("invalid min lp fee percentage: %w", err) + return fmt.Errorf("invalid min fee percentage: %w", err) } - minLPFeePercent := sdk.DecProto{Dec: minFeePercDec} + minFeePercent := sdk.DecProto{Dec: minFeePercDec} maxPriceStr, err := cmd.Flags().GetString(FlagMaxPrice) if err != nil { @@ -120,7 +120,7 @@ Examples: rollappCriteria := types.NewRollappCriteria( rollappID, denoms, - minLPFeePercent, + minFeePercent, maxPrice, spendLimit, fulfillerFeePart, @@ -150,7 +150,7 @@ Examples: cmd.Flags().StringSlice(FlagDenoms, []string{}, "An array of denoms allowed to use") cmd.Flags().String(FlagSpendLimit, "", "An array of Coins allowed to spend") cmd.Flags().Bool(FlagSettlementValidated, false, "Settlement validated flag") - cmd.Flags().String(FlagMinLPFeePercentage, "", "Minimum fee") + cmd.Flags().String(FlagMinFeePercentage, "", "Minimum fee") cmd.Flags().String(FlagMaxPrice, "", "Maximum price") cmd.Flags().String(FlagOperatorFeeShare, "", "Fulfiller fee part") cmd.Flags().Int64(FlagExpiration, 0, "Expire time as Unix timestamp. Set zero (0) for no expiry. Default is 0.") diff --git a/x/eibc/types/authz.pb.go b/x/eibc/types/authz.pb.go index 844a4e885..ae47492e5 100644 --- a/x/eibc/types/authz.pb.go +++ b/x/eibc/types/authz.pb.go @@ -80,8 +80,8 @@ type RollappCriteria struct { Denoms []string `protobuf:"bytes,2,rep,name=denoms,proto3" json:"denoms,omitempty"` // max_price is the optional maximum order price acceptable to the granter MaxPrice github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=max_price,json=maxPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_price"` - // min_lp_fee_percentage is the minimum fee earning percentage the LP is willing to get from a demand order - MinLpFeePercentage types.DecProto `protobuf:"bytes,4,opt,name=min_lp_fee_percentage,json=minLpFeePercentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecProto" json:"min_lp_fee_percentage"` + // min_fee_percentage is the minimum gross fee earning percentage the LP is willing to get from a demand order + MinFeePercentage types.DecProto `protobuf:"bytes,4,opt,name=min_fee_percentage,json=minFeePercentage,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecProto" json:"min_fee_percentage"` // operator_fee_share is the share of the fee earnings willing to give to the operator OperatorFeeShare types.DecProto `protobuf:"bytes,5,opt,name=operator_fee_share,json=operatorFeeShare,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecProto" json:"operator_fee_share"` // settlement_validated is the flag to only fulfill demand orders that have been settlement validated @@ -144,9 +144,9 @@ func (m *RollappCriteria) GetMaxPrice() github_com_cosmos_cosmos_sdk_types.Coins return nil } -func (m *RollappCriteria) GetMinLpFeePercentage() types.DecProto { +func (m *RollappCriteria) GetMinFeePercentage() types.DecProto { if m != nil { - return m.MinLpFeePercentage + return m.MinFeePercentage } return types.DecProto{} } @@ -182,40 +182,39 @@ func init() { } var fileDescriptor_b67acbbd9757b985 = []byte{ - // 517 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xcf, 0xd1, 0x12, 0x92, 0xcb, 0x00, 0x3a, 0x0a, 0x38, 0x45, 0x75, 0xa3, 0x0c, 0x60, 0x09, - 0x6a, 0x93, 0x66, 0x63, 0x23, 0x45, 0x11, 0x88, 0x4a, 0x44, 0x46, 0x62, 0x60, 0xb1, 0x2e, 0xf6, - 0x6b, 0x72, 0xc2, 0x77, 0x67, 0xdd, 0x5d, 0xa2, 0x24, 0x13, 0x0b, 0x23, 0x12, 0x9f, 0x83, 0x99, - 0x0f, 0x51, 0x31, 0x75, 0x64, 0x2a, 0x28, 0xf9, 0x22, 0xc8, 0xf6, 0x25, 0x14, 0x04, 0x88, 0x01, - 0xa6, 0xf3, 0xf3, 0xef, 0xfd, 0xfe, 0xe8, 0x3d, 0x3d, 0x7c, 0x37, 0x99, 0x73, 0x10, 0x9a, 0x49, - 0x31, 0x9b, 0x2f, 0x82, 0x4d, 0x11, 0x00, 0x1b, 0xc6, 0x01, 0x9d, 0x98, 0xf1, 0xc2, 0xcf, 0x94, - 0x34, 0x92, 0xdc, 0xbe, 0xd8, 0xe8, 0x6f, 0x0a, 0x3f, 0x6f, 0xdc, 0xdd, 0x19, 0xc9, 0x91, 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1, 0xb4, 0x1b, 0xcc, 0xca, 0x53, - 0x2e, 0xe4, 0x87, 0xd5, 0xe2, 0x88, 0xba, 0xdf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x05, 0x81, 0xb7, - 0x5d, 0xf6, 0x03, 0x00, 0x00, + // 510 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x4f, 0x8b, 0xd3, 0x40, + 0x14, 0xef, 0xd8, 0xb5, 0xb6, 0xd3, 0x83, 0x12, 0x17, 0x4d, 0x57, 0x36, 0x5b, 0x7a, 0xd0, 0x80, + 0x6e, 0xc6, 0x6e, 0x6f, 0xde, 0xec, 0x4a, 0x51, 0x14, 0x2c, 0x11, 0x3c, 0x78, 0x09, 0xd3, 0xe4, + 0x6d, 0x3b, 0x98, 0x99, 0x09, 0x33, 0xd3, 0xd2, 0xf6, 0xe4, 0x17, 0x10, 0xfc, 0x1c, 0x9e, 0xfd, + 0x10, 0x8b, 0xa7, 0x3d, 0xea, 0x45, 0xa5, 0xfd, 0x22, 0x92, 0x64, 0x5a, 0x57, 0x51, 0xf1, 0xe0, + 0x9e, 0x26, 0x2f, 0xbf, 0xf7, 0xfb, 0xc3, 0x7b, 0x3c, 0x7c, 0x27, 0x59, 0x70, 0x10, 0x9a, 0x49, + 0x31, 0x5f, 0x2c, 0xc9, 0xb6, 0x20, 0xc0, 0x46, 0x31, 0xa1, 0x53, 0x33, 0x59, 0x06, 0x99, 0x92, + 0x46, 0x3a, 0xb7, 0xce, 0x37, 0x06, 0xdb, 0x22, 0xc8, 0x1b, 0xf7, 0x76, 0xc7, 0x72, 0x2c, 0x8b, + 0x3e, 0x92, 0x7f, 0x95, 0x94, 0xbd, 0x9b, 0xb1, 0xd4, 0x5c, 0x6a, 0xc2, 0xf5, 0x98, 0xcc, 0xba, + 0xf9, 0x63, 0x81, 0x56, 0x09, 0x44, 0x25, 0xa3, 0x2c, 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+ 0xe7, 0x0d, 0xc2, 0x0e, 0x67, 0x22, 0x3a, 0x01, 0x88, 0x32, 0x50, 0x31, 0x08, 0x43, 0xc7, 0xe0, + 0xee, 0xb4, 0x91, 0xdf, 0x3c, 0xda, 0xff, 0xad, 0xe7, 0x23, 0x88, 0x87, 0xf9, 0x02, 0xfa, 0x3d, + 0xeb, 0x7b, 0xf7, 0x1f, 0x7c, 0x37, 0xa4, 0xf0, 0x1a, 0x67, 0x62, 0x00, 0x30, 0xdc, 0x7a, 0x15, + 0x11, 0x64, 0x06, 0x8a, 0x1a, 0xa9, 0x8a, 0x1c, 0x7a, 0x42, 0x15, 0xb8, 0x97, 0x2f, 0x2e, 0xc2, + 0xc6, 0x6d, 0x00, 0xf0, 0x22, 0xf7, 0x72, 0xba, 0x78, 0x57, 0x83, 0x31, 0x29, 0x70, 0x10, 0x26, + 0x9a, 0xd1, 0x94, 0x25, 0xd4, 0x40, 0xe2, 0xd6, 0xda, 0xc8, 0xaf, 0x87, 0xd7, 0x7f, 0x60, 0x2f, + 0x37, 0x90, 0x93, 0xe2, 0xa6, 0xce, 0x40, 0x24, 0x51, 0xca, 0x38, 0x33, 0xee, 0x95, 0xff, 0xbf, + 0x24, 0x5c, 0xe8, 0x3f, 0xcb, 0xe5, 0xfb, 0x4f, 0x4f, 0x57, 0x1e, 0x3a, 0x5b, 0x79, 0xe8, 0xdb, + 0xca, 0x43, 0xef, 0xd6, 0x5e, 0xe5, 0x6c, 0xed, 0x55, 0x3e, 0xad, 0xbd, 0xca, 0xab, 0xee, 0x39, + 0xbd, 0x3f, 0x1c, 0xf0, 0xac, 0x47, 0xe6, 0xe5, 0x15, 0x17, 0xf2, 0xa3, 0x5a, 0x71, 0x3f, 0xbd, + 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x13, 0xf5, 0x4e, 0xf4, 0xf1, 0x03, 0x00, 0x00, } func (m *FulfillOrderAuthorization) Marshal() (dAtA []byte, err error) { @@ -310,7 +309,7 @@ func (m *RollappCriteria) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a { - size, err := m.MinLpFeePercentage.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.MinFeePercentage.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -400,7 +399,7 @@ func (m *RollappCriteria) Size() (n int) { n += 1 + l + sovAuthz(uint64(l)) } } - l = m.MinLpFeePercentage.Size() + l = m.MinFeePercentage.Size() n += 1 + l + sovAuthz(uint64(l)) l = m.OperatorFeeShare.Size() n += 1 + l + sovAuthz(uint64(l)) @@ -635,7 +634,7 @@ func (m *RollappCriteria) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinLpFeePercentage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MinFeePercentage", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -662,7 +661,7 @@ func (m *RollappCriteria) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.MinLpFeePercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.MinFeePercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/eibc/types/fulfill_order_authorization.go b/x/eibc/types/fulfill_order_authorization.go index 1c6bcb0f3..24a886e50 100644 --- a/x/eibc/types/fulfill_order_authorization.go +++ b/x/eibc/types/fulfill_order_authorization.go @@ -19,7 +19,7 @@ func NewFulfillOrderAuthorization(rollapps []*RollappCriteria) *FulfillOrderAuth func NewRollappCriteria( rollappID string, denoms []string, - minLPFeePercentage sdk.DecProto, + minFeePercentage sdk.DecProto, maxPrice sdk.Coins, spendLimit sdk.Coins, fulfillerFeePart sdk.DecProto, @@ -28,7 +28,7 @@ func NewRollappCriteria( return &RollappCriteria{ RollappId: rollappID, Denoms: denoms, - MinLpFeePercentage: minLPFeePercentage, + MinFeePercentage: minFeePercentage, MaxPrice: maxPrice, SpendLimit: spendLimit, OperatorFeeShare: fulfillerFeePart, @@ -97,16 +97,14 @@ func (a FulfillOrderAuthorization) Accept( errorsmod.Wrapf(errors.ErrInvalidCoins, "invalid fee amount: %s", err) } - operatorFee := orderFeeDec.Mul(matchedCriteria.OperatorFeeShare.Dec) amountDec := mFulfill.Price[0].Amount.Add(orderFeeDec.RoundInt()).ToLegacyDec() - minLPFee := amountDec.Mul(matchedCriteria.MinLpFeePercentage.Dec) - lpFee := orderFeeDec.Sub(operatorFee) + minFee := amountDec.Mul(matchedCriteria.MinFeePercentage.Dec) - if lpFee.LT(minLPFee) { + if orderFeeDec.LT(minFee) { return authz.AcceptResponse{}, errorsmod.Wrapf(errors.ErrUnauthorized, - "order LP fee %s is less than minimum LP fee %s", - lpFee.String(), minLPFee.String()) + "order fee %s is less than minimum fee %s", + orderFeeDec.String(), minFee.String()) } // Check if the order price does not exceed the max price @@ -186,9 +184,9 @@ func (a FulfillOrderAuthorization) ValidateBasic() error { } rollappIDSet[criteria.RollappId] = struct{}{} - // Validate MinLpFeePercentage - if !criteria.MinLpFeePercentage.Dec.IsNil() && criteria.MinLpFeePercentage.Dec.IsNegative() { - return errorsmod.Wrapf(errors.ErrInvalidRequest, "min_lp_fee_percentage cannot be negative for rollapp_id %s", criteria.RollappId) + // Validate MinFeePercentage + if !criteria.MinFeePercentage.Dec.IsNil() && criteria.MinFeePercentage.Dec.IsNegative() { + return errorsmod.Wrapf(errors.ErrInvalidRequest, "min_fee_percentage cannot be negative for rollapp_id %s", criteria.RollappId) } // Validate OperatorFeeShare diff --git a/x/eibc/types/fulfill_order_authorization_test.go b/x/eibc/types/fulfill_order_authorization_test.go index dc52004a0..05551619e 100644 --- a/x/eibc/types/fulfill_order_authorization_test.go +++ b/x/eibc/types/fulfill_order_authorization_test.go @@ -27,7 +27,7 @@ func TestFulfillOrderAuthorization_Accept(t *testing.T) { Denoms: []string{"atom"}, MaxPrice: sdk.NewCoins(sdk.NewInt64Coin("atom", 500)), SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)), - MinLpFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, + MinFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, OperatorFeeShare: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.02")}, SettlementValidated: true, }, @@ -49,7 +49,7 @@ func TestFulfillOrderAuthorization_Accept(t *testing.T) { Denoms: []string{"atom"}, MaxPrice: sdk.NewCoins(sdk.NewInt64Coin("atom", 500)), SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 600)), - MinLpFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, + MinFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, OperatorFeeShare: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.02")}, SettlementValidated: true, }, @@ -128,7 +128,7 @@ func TestFulfillOrderAuthorization_ValidateBasic(t *testing.T) { Denoms: []string{"atom", "btc"}, MaxPrice: sdk.NewCoins(sdk.NewInt64Coin("atom", 500)), SpendLimit: sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)), - MinLpFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, + MinFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.05")}, OperatorFeeShare: sdk.DecProto{Dec: sdk.MustNewDecFromStr("0.02")}, SettlementValidated: true, }, @@ -137,16 +137,16 @@ func TestFulfillOrderAuthorization_ValidateBasic(t *testing.T) { expectedError: "", }, { - name: "Negative MinLpFeePercentage", + name: "Negative MinFeePercentage", authorization: FulfillOrderAuthorization{ Rollapps: []*RollappCriteria{ { - RollappId: "rollapp1", - MinLpFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("-0.01")}, + RollappId: "rollapp1", + MinFeePercentage: sdk.DecProto{Dec: sdk.MustNewDecFromStr("-0.01")}, }, }, }, - expectedError: "min_lp_fee_percentage cannot be negative for rollapp_id rollapp1", + expectedError: "min_fee_percentage cannot be negative for rollapp_id rollapp1", }, { name: "OperatorFeeShare Greater Than One",