diff --git a/proto/umee/uibc/v1/quota.proto b/proto/umee/uibc/v1/quota.proto index bef592e45e..ca91a5609e 100644 --- a/proto/umee/uibc/v1/quota.proto +++ b/proto/umee/uibc/v1/quota.proto @@ -42,6 +42,12 @@ message Params { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + // inflow_outflow_quota_token_base defines the inflow outflow quota base for token + string inflow_outflow_quota_token_base = 7 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // IBCTransferStatus status of ibc-transfer quota check for inflow and outflow diff --git a/x/uibc/params.go b/x/uibc/params.go index 4848c93db8..f381c89a00 100644 --- a/x/uibc/params.go +++ b/x/uibc/params.go @@ -10,12 +10,13 @@ import ( // DefaultParams returns default genesis params func DefaultParams() Params { return Params{ - IbcStatus: IBCTransferStatus_IBC_TRANSFER_STATUS_QUOTA_ENABLED, - TotalQuota: sdk.NewDec(1_600_000), // $1.6M - TokenQuota: sdk.NewDec(900_000), // $900K - QuotaDuration: time.Second * 60 * 60 * 24, // 24h - InflowOutflowQuotaBase: sdk.NewDec(1_000_000), // 1M - InflowOutflowQuotaRate: sdk.MustNewDecFromStr("0.25"), + IbcStatus: IBCTransferStatus_IBC_TRANSFER_STATUS_QUOTA_ENABLED, + TotalQuota: sdk.NewDec(1_600_000), // $1.6M + TokenQuota: sdk.NewDec(1_200_000), // $1.2M + QuotaDuration: time.Second * 60 * 60 * 24, // 24h + InflowOutflowQuotaBase: sdk.NewDec(1_000_000), // 1M + InflowOutflowQuotaRate: sdk.MustNewDecFromStr("0.25"), + InflowOutflowQuotaTokenBase: sdk.NewDec(900_000), // $0.9M } } @@ -38,6 +39,9 @@ func (p Params) Validate() error { if err := validateQuota(p.InflowOutflowQuotaRate, "total inflow outflow quota rate"); err != nil { return err } + if err := validateQuota(p.InflowOutflowQuotaTokenBase, "total inflow outflow quota token base"); err != nil { + return err + } if p.TotalQuota.LT(p.TokenQuota) { return fmt.Errorf("token quota shouldn't be less than quota per denom") } diff --git a/x/uibc/quota.pb.go b/x/uibc/quota.pb.go index 0d73164d21..10916eb2b9 100644 --- a/x/uibc/quota.pb.go +++ b/x/uibc/quota.pb.go @@ -87,6 +87,8 @@ type Params struct { InflowOutflowQuotaBase github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=inflow_outflow_quota_base,json=inflowOutflowQuotaBase,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflow_outflow_quota_base"` // inflow_outflow_quota_rate defines the rate of total inflows InflowOutflowQuotaRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=inflow_outflow_quota_rate,json=inflowOutflowQuotaRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflow_outflow_quota_rate"` + // inflow_outflow_quota_token_base defines the inflow outflow quota base for token + InflowOutflowQuotaTokenBase github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=inflow_outflow_quota_token_base,json=inflowOutflowQuotaTokenBase,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflow_outflow_quota_token_base"` } func (m *Params) Reset() { *m = Params{} } @@ -144,42 +146,43 @@ func init() { func init() { proto.RegisterFile("umee/uibc/v1/quota.proto", fileDescriptor_651be1a0280abcb6) } var fileDescriptor_651be1a0280abcb6 = []byte{ - // 546 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0x80, 0xe3, 0x34, 0x8d, 0xd4, 0x2b, 0x54, 0xc1, 0x02, 0xe4, 0x74, 0xb0, 0x43, 0xa0, 0x51, - 0xa8, 0x88, 0xad, 0x16, 0x89, 0x01, 0x01, 0x22, 0x8e, 0x5d, 0xc9, 0x12, 0x4a, 0x52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5, 0xad, 0xae, 0xde, 0x32, 0x8e, - 0x0c, 0x5d, 0x2b, 0xe5, 0xf8, 0x1a, 0xa8, 0x5e, 0x05, 0x1d, 0xf7, 0x3a, 0x76, 0xd3, 0xd1, 0x0c, - 0xab, 0xa9, 0xbe, 0xd2, 0xb5, 0x12, 0xc7, 0xef, 0x81, 0x7b, 0xeb, 0x39, 0xbd, 0xcd, 0xb0, 0x3c, - 0xbf, 0x0f, 0x6a, 0xeb, 0xb1, 0x4e, 0xcf, 0x3e, 0x57, 0x6e, 0xf0, 0x0f, 0xc1, 0xde, 0x7a, 0xd6, - 0x68, 0x9f, 0xa3, 0x05, 0xbe, 0x0e, 0x1e, 0x5c, 0x85, 0xae, 0x62, 0xcb, 0xe9, 0x36, 0x7b, 0x96, - 0xae, 0x95, 0x36, 0xd5, 0x97, 0xa7, 0x0b, 0x91, 0x3b, 0x5b, 0x88, 0xdc, 0xcf, 0x85, 0xc8, 0x7d, - 0x5a, 0x8a, 0xb9, 0xb3, 0xa5, 0x98, 0xfb, 0xb6, 0x14, 0x73, 0xaf, 0x2f, 0x8e, 0x3c, 0xfd, 0x2f, - 0x36, 0x42, 0x44, 0xa6, 0x38, 0x1a, 0xd2, 0x40, 0x99, 0x3c, 0x51, 0xde, 0xd3, 0xcf, 0x86, 0x5b, - 0xa4, 0xef, 0xf3, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x73, 0x20, 0x82, 0x4a, 0x04, - 0x00, 0x00, + // 571 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x9b, 0xfd, 0x25, 0x3b, 0xab, 0xcb, 0x1a, 0x54, 0xd2, 0x15, 0x92, 0x5a, 0xdd, 0x52, + 0x17, 0x9b, 0xb0, 0x2b, 0x78, 0x10, 0x15, 0x9b, 0x26, 0x0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 0x69, 0x05, 0xdc, 0xbc, 0xf2, 0x59, 0xf3, 0xf7, + 0x81, 0x64, 0xa8, 0x35, 0xc7, 0x36, 0xab, 0x75, 0xeb, 0x48, 0x37, 0x1d, 0xcb, 0xae, 0xda, 0x2d, + 0xcb, 0x69, 0xd5, 0xad, 0xa6, 0x5e, 0x33, 0x8e, 0x0c, 0x5d, 0xdb, 0xc9, 0xf1, 0x25, 0x50, 0x9c, + 0x27, 0x3a, 0x6e, 0x35, 0xec, 0xaa, 0xa3, 0x19, 0x56, 0x55, 0x7d, 0xa5, 0x6b, 0x3b, 0x1c, 0xbf, + 0x07, 0xee, 0x2d, 0xd6, 0xe9, 0x75, 0x26, 0x5b, 0xe1, 0xf7, 0x41, 0x69, 0xb1, 0xac, 0xd1, 0xb2, + 0xcf, 0x91, 0xab, 0xfc, 0x43, 0xb0, 0xb7, 0x58, 0x6b, 0xd4, 0xcf, 0xa5, 0x6b, 0x7c, 0x19, 0x3c, + 0x98, 0x27, 0x9d, 0xc5, 0x96, 0xd3, 0xac, 0xb6, 0x2c, 0x5d, 0xdb, 0x59, 0x57, 0x5f, 0x9e, 0x4e, + 0x44, 0xee, 0x6c, 0x22, 0x72, 0xbf, 0x26, 0x22, 0xf7, 0x79, 0x2a, 0xe6, 0xce, 0xa6, 0x62, 0xee, + 0xfb, 0x54, 0xcc, 0xbd, 0xbe, 0x38, 0xf7, 0xf4, 0x42, 0xa8, 0x84, 0x88, 0x0c, 0x71, 0xd4, 0xa5, + 0x81, 0x32, 0x78, 0xa2, 0xbc, 0xa7, 0x77, 0x97, 0xbb, 0x41, 0x7f, 0x92, 0xc7, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xf1, 0xe6, 0x9a, 0xe6, 0xcf, 0x04, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -202,6 +205,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.InflowOutflowQuotaTokenBase.Size() + i -= size + if _, err := m.InflowOutflowQuotaTokenBase.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuota(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a { size := m.InflowOutflowQuotaRate.Size() i -= size @@ -288,6 +301,8 @@ func (m *Params) Size() (n int) { n += 1 + l + sovQuota(uint64(l)) l = m.InflowOutflowQuotaRate.Size() n += 1 + l + sovQuota(uint64(l)) + l = m.InflowOutflowQuotaTokenBase.Size() + n += 1 + l + sovQuota(uint64(l)) return n } @@ -514,6 +529,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflowOutflowQuotaTokenBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuota + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuota + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuota + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflowOutflowQuotaTokenBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuota(dAtA[iNdEx:]) diff --git a/x/uibc/quota/keeper/params_test.go b/x/uibc/quota/keeper/params_test.go index 6eb7734ccb..5c0a38be15 100644 --- a/x/uibc/quota/keeper/params_test.go +++ b/x/uibc/quota/keeper/params_test.go @@ -24,6 +24,7 @@ func TestUnitParams(t *testing.T) { params.TotalQuota = sdk.MustNewDecFromStr("3.4321") params.InflowOutflowQuotaBase = sdk.MustNewDecFromStr("3.4321") params.InflowOutflowQuotaRate = sdk.MustNewDecFromStr("0.2") + params.InflowOutflowQuotaTokenBase = sdk.MustNewDecFromStr("0.2") err := k.SetParams(params) require.NoError(err) diff --git a/x/uibc/quota/keeper/quota.go b/x/uibc/quota/keeper/quota.go index 52e0abcac1..f001aece7a 100644 --- a/x/uibc/quota/keeper/quota.go +++ b/x/uibc/quota/keeper/quota.go @@ -170,9 +170,14 @@ func (k Keeper) CheckAndUpdateQuota(denom string, newOutflow sdkmath.Int) error o := k.GetTokenOutflows(denom) o.Amount = o.Amount.Add(exchangePrice) - if !params.TokenQuota.IsZero() && o.Amount.GT(params.TokenQuota) { - return uibc.ErrQuotaExceeded + inToken := k.GetTokenInflow(denom) + if !params.TokenQuota.IsZero() { + if o.Amount.GT(params.TokenQuota) || + o.Amount.GT(params.InflowOutflowQuotaTokenBase.Add((sdk.MustNewDecFromStr("0.25").Mul(inToken.Amount)))) { + return uibc.ErrQuotaExceeded + } } + // Allow outflow either of two conditions // 1. Total Outflow Sum <= Total Outflow Quota // or diff --git a/x/uibc/quota/keeper/quota_test.go b/x/uibc/quota/keeper/quota_test.go index 366f4ab0f7..246dfdff2d 100644 --- a/x/uibc/quota/keeper/quota_test.go +++ b/x/uibc/quota/keeper/quota_test.go @@ -47,6 +47,7 @@ func TestUnitCheckAndUpdateQuota(t *testing.T) { k.SetTokenInflow(sdk.NewInt64DecCoin(umee, 6)) k.SetTotalOutflowSum(sdk.NewDec(50)) k.SetTotalInflow(sdk.NewDec(50)) + k.SetTokenInflow(sdk.NewDecCoin(umee, math.NewInt(50))) err := k.CheckAndUpdateQuota(umee, sdk.NewInt(1)) assert.NilError(t, err) diff --git a/x/uibc/quota/keeper/unit_test.go b/x/uibc/quota/keeper/unit_test.go index 2e83ebc18c..a697e14af9 100644 --- a/x/uibc/quota/keeper/unit_test.go +++ b/x/uibc/quota/keeper/unit_test.go @@ -54,9 +54,10 @@ func (k TestKeeper) checkOutflows(denom string, perToken, total int64) { func (k TestKeeper) setQuotaParams(perToken, total int64) { err := k.SetParams(uibc.Params{ - TokenQuota: sdk.NewDec(perToken), - TotalQuota: sdk.NewDec(total), - InflowOutflowQuotaBase: sdk.NewDec(1_000_000), + TokenQuota: sdk.NewDec(perToken), + TotalQuota: sdk.NewDec(total), + InflowOutflowQuotaBase: sdk.NewDec(1_000_000), + InflowOutflowQuotaTokenBase: sdk.NewDec(9_00_000), }) require.NoError(k.t, err) }