From c5f0edc8d24461703affb1624bf2e27742d75ad1 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 4 Jul 2022 23:12:57 +0200 Subject: [PATCH 01/17] feat: add max collateral supply token param --- proto/umee/leverage/v1/leverage.proto | 9 ++ x/leverage/types/leverage.pb.go | 147 +++++++++++++++++--------- 2 files changed, 105 insertions(+), 51 deletions(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index cbf9690a8d..f5483a4f88 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -139,4 +139,13 @@ message Token { // and enable_borrow set to false. Such tokens can be safely removed from the // oracle and price feeder as well. bool blacklist = 14; + + // Maximum allowed collateral supply specifis how much of the token can + // be provided in total as a collatera in the system. + // Value is provided in pre cent, Allowed values are in [0; 100] range. + // 100 means that the token has no restriction. 10 means maximum 10% of total + // collateral value can provided by this token. + uint32 max_collateral_supply = 15 [ + (gogoproto.moretags) = "yaml:\"small_liquidation_size\"" + ]; } diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 973f68a7f6..2d3954f141 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -91,14 +91,14 @@ type Token struct { // asset can contribute to a user's liquidation threshold (above which they // become eligible for liquidation). LiquidationThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=liquidation_threshold,json=liquidationThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidation_threshold" yaml:"liquidation_threshold"` - // The base_borrow_rate defines the base interest rate for borrowing this + // The base_borrow_rate defines the minimum interest rate for borrowing this // asset. BaseBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=base_borrow_rate,json=baseBorrowRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_borrow_rate" yaml:"base_borrow_rate"` // The kink_borrow_rate defines the interest rate for borrowing this // asset when utilization equals to 'kink_utilization'. KinkBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=kink_borrow_rate,json=kinkBorrowRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"kink_borrow_rate" yaml:"kink_borrow_rate"` // The max_borrow_rate defines the interest rate for borrowing this - // asset (seen when utilization is 100%). + // asset (seen when supply utilization is 100%). MaxBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=max_borrow_rate,json=maxBorrowRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_borrow_rate" yaml:"max_borrow_rate"` // The kink_utilization defines the value where the kink rate kicks off for // borrow rates. @@ -126,6 +126,12 @@ type Token struct { // and enable_borrow set to false. Such tokens can be safely removed from the // oracle and price feeder as well. Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"` + // Maximum allowed collateral supply specifis how much of the token can + // be provided in total as a collatera in the system. + // Value is provided in pre cent, Allowed values are in [0; 100] range. + // 100 means that the token has no restriction. 10 means maximum 10% of total + // collateral value can provided by this token. + MaxCollateralSupply uint32 `protobuf:"varint,15,opt,name=max_collateral_supply,json=maxCollateralSupply,proto3" json:"max_collateral_supply,omitempty" yaml:"small_liquidation_size"` } func (m *Token) Reset() { *m = Token{} } @@ -203,6 +209,13 @@ func (m *Token) GetBlacklist() bool { return false } +func (m *Token) GetMaxCollateralSupply() uint32 { + if m != nil { + return m.MaxCollateralSupply + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "umee.leverage.v1.Params") proto.RegisterType((*Token)(nil), "umee.leverage.v1.Token") @@ -211,55 +224,57 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 766 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x4f, 0xeb, 0x46, - 0x14, 0x8d, 0xdb, 0x40, 0xc9, 0x40, 0x12, 0x30, 0x01, 0x2c, 0x9a, 0xc6, 0x68, 0xa4, 0x56, 0x6c, - 0x88, 0x4b, 0xdb, 0x55, 0x96, 0x29, 0x6a, 0x01, 0x41, 0x5b, 0x4d, 0xa9, 0x90, 0xba, 0xb1, 0x26, - 0xce, 0x6d, 0x62, 0x65, 0xec, 0x49, 0x3d, 0x93, 0x0f, 0xd8, 0x74, 0x51, 0x75, 0xdf, 0x65, 0x37, - 0x95, 0x90, 0xfa, 0x27, 0xfa, 0x13, 0x58, 0xb2, 0x7c, 0x7a, 0x8b, 0xe8, 0x09, 0x36, 0x6f, 0x9d, - 0x5f, 0xf0, 0xe4, 0xb1, 0x13, 0x3b, 0x90, 0xf7, 0xa4, 0x08, 0x56, 0xf1, 0x9c, 0x7b, 0x73, 0xce, - 0x99, 0xb9, 0xf7, 0xce, 0x20, 0xb3, 0xe7, 0x01, 0x58, 0x0c, 0xfa, 0x10, 0xd0, 0x16, 0x58, 0xfd, - 0xc3, 0xe9, 0x77, 0xb5, 0x1b, 0x70, 0xc9, 0xf5, 0xf5, 0x30, 0xa1, 0x3a, 0x05, 0xfb, 0x87, 0xbb, - 0xa5, 0x16, 0x6f, 0x71, 0x15, 0xb4, 0xc2, 0xaf, 0x28, 0x0f, 0xff, 0x9f, 0x45, 0xcb, 0x3f, 0xd1, - 0x80, 0x7a, 0x42, 0xff, 0x57, 0x43, 0x15, 0x87, 0x7b, 0x5d, 0x06, 0x12, 0x6c, 0xe6, 0xfe, 0xde, - 0x73, 0x9b, 0x54, 0xba, 0xdc, 0xb7, 0x65, 0x3b, 0x00, 0xd1, 0xe6, 0xac, 0x69, 0x7c, 0xb4, 0xa7, - 0xed, 0xe7, 0xea, 0x97, 0xb7, 0x23, 0x33, 0xf3, 0x7a, 0x64, 0x7e, 0xd1, 0x72, 0x65, 0xb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fd, 0xaf, 0xac, 0x61, 0xf2, 0xc0, 0xab, 0x22, 0x35, 0x96, 0xd5, 0x9b, 0xfd, 0xf5, - 0xbb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0xff, 0x70, 0x19, 0xfe, 0x07, 0x00, 0x00, + // 797 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x6f, 0x23, 0x45, + 0x14, 0xf6, 0x82, 0x2f, 0xc4, 0x73, 0x67, 0x3b, 0xd9, 0xd8, 0x77, 0xab, 0xc3, 0x78, 0xc3, 0x48, + 0xa0, 0x34, 0xe7, 0xe5, 0x80, 0xca, 0xa5, 0xef, 0x04, 0x77, 0xa7, 0x0b, 0xa0, 0x49, 0xa2, 0x48, + 0x34, 0xab, 0xf1, 0xfa, 0x61, 0xaf, 0x3c, 0xb3, 0x63, 0x76, 0xc6, 0xbf, 0xd2, 0x50, 0x20, 0x7a, + 0x4a, 0x1a, 0xa4, 0xfc, 0x19, 0xfc, 0x09, 0x29, 0x53, 0x22, 0x0a, 0x0b, 0x25, 0x0d, 0xb5, 0x4b, + 0x2a, 0xb4, 0xb3, 0x6b, 0xef, 0x3a, 0x31, 0x20, 0x2b, 0xa9, 0x76, 0xe7, 0x7b, 0x6f, 0xbe, 0xef, + 0x9b, 0x79, 0x6f, 0x46, 0x83, 0xec, 0x21, 0x07, 0x70, 0x18, 0x8c, 0x20, 0xa4, 0x5d, 0x70, 0x46, + 0xcf, 0x97, 0xff, 0x8d, 0x41, 0x28, 0x94, 0x30, 0x77, 0xa2, 0x84, 0xc6, 0x12, 0x1c, 0x3d, 0x7f, + 0x5a, 0xe9, 0x8a, 0xae, 0xd0, 0x41, 0x27, 0xfa, 0x8b, 0xf3, 0xf0, 0x6f, 0x79, 0xb4, 0xf5, 0x0d, + 0x0d, 0x29, 0x97, 0xe6, 0xaf, 0x06, 0xaa, 0x7b, 0x82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 0x90, 0xc3, 0xc1, + 0x80, 0x4d, 0xad, 0xb2, 0x5e, 0xe9, 0x87, 0xff, 0x7f, 0xfb, 0xee, 0x71, 0x3a, 0x79, 0xb1, 0x9c, + 0x7e, 0xa4, 0x67, 0x37, 0xf3, 0x7f, 0x9d, 0xdb, 0x46, 0xeb, 0xcd, 0xc5, 0x55, 0xdd, 0xb8, 0xbc, + 0xaa, 0x1b, 0x7f, 0x5e, 0xd5, 0x8d, 0x9f, 0xaf, 0xeb, 0xb9, 0xcb, 0xeb, 0x7a, 0xee, 0xf7, 0xeb, + 0x7a, 0xee, 0xdb, 0x4f, 0x32, 0xd5, 0x8e, 0x1e, 0x01, 0xcf, 0x02, 0x50, 0x63, 0x11, 0xf6, 0xf5, + 0xc0, 0x19, 0x7d, 0xea, 0x4c, 0xd2, 0x77, 0x83, 0xae, 0x7d, 0x7b, 0x4b, 0x3f, 0x05, 0x3e, 0xfb, + 0x27, 0x00, 0x00, 0xff, 0xff, 0x46, 0xd2, 0x3b, 0x26, 0x55, 0x08, 0x00, 0x00, } func (this *Token) Equal(that interface{}) bool { @@ -323,6 +338,9 @@ func (this *Token) Equal(that interface{}) bool { if this.Blacklist != that1.Blacklist { return false } + if this.MaxCollateralSupply != that1.MaxCollateralSupply { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -408,6 +426,11 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MaxCollateralSupply != 0 { + i = encodeVarintLeverage(dAtA, i, uint64(m.MaxCollateralSupply)) + i-- + dAtA[i] = 0x78 + } if m.Blacklist { i-- if m.Blacklist { @@ -610,6 +633,9 @@ func (m *Token) Size() (n int) { if m.Blacklist { n += 2 } + if m.MaxCollateralSupply != 0 { + n += 1 + sovLeverage(uint64(m.MaxCollateralSupply)) + } return n } @@ -1249,6 +1275,25 @@ func (m *Token) Unmarshal(dAtA []byte) error { } } m.Blacklist = bool(v != 0) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxCollateralSupply", wireType) + } + m.MaxCollateralSupply = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeverage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxCollateralSupply |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipLeverage(dAtA[iNdEx:]) From 2a9a73e426292cd4beef6238ca05bbfd69cd9a73 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 4 Jul 2022 23:38:14 +0200 Subject: [PATCH 02/17] adding tests --- x/leverage/types/token.go | 4 + x/leverage/types/token_test.go | 271 ++++++++++----------------------- 2 files changed, 84 insertions(+), 191 deletions(-) diff --git a/x/leverage/types/token.go b/x/leverage/types/token.go index 2c032d60df..b7333098fc 100644 --- a/x/leverage/types/token.go +++ b/x/leverage/types/token.go @@ -84,6 +84,10 @@ func (t Token) Validate() error { } } + if t.MaxCollateralSupply > 100 { + return sdkerrors.ErrInvalidRequest.Wrap("Token.MaxCollateralSupply must be in [0; 100] range") + } + return nil } diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index fcc69eb019..8271b37aab 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -61,236 +61,125 @@ registry: } func TestToken_Validate(t *testing.T) { + validToken := func() types.Token { + return types.Token{ + BaseDenom: "uumee", + SymbolDenom: "umee", + Exponent: 6, + ReserveFactor: sdk.MustNewDecFromStr("0.25"), + CollateralWeight: sdk.MustNewDecFromStr("0.50"), + LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), + BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), + KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), + MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), + KinkUtilization: sdk.MustNewDecFromStr("0.75"), + LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), + EnableMsgLend: true, + EnableMsgBorrow: true, + Blacklist: false, + MaxCollateralSupply: 0, + } + } + invalidBaseToken := validToken() + invalidBaseToken.BaseDenom = "$$" + invalidBaseToken.SymbolDenom = "" + + invalidUToken := validToken() + invalidUToken.BaseDenom = "u/uumee" + invalidUToken.SymbolDenom = "" + + invalidReserveFactor := validToken() + invalidReserveFactor.ReserveFactor = sdk.MustNewDecFromStr("-0.25") + + invalidCollateralWeight := validToken() + invalidCollateralWeight.CollateralWeight = sdk.MustNewDecFromStr("50.00") + + invalidLiquidationThreshold := validToken() + invalidLiquidationThreshold.LiquidationThreshold = sdk.MustNewDecFromStr("0.40") + + invalidBaseBorrowRate := validToken() + invalidBaseBorrowRate.BaseBorrowRate = sdk.MustNewDecFromStr("-0.01") + + invalidKinkBorrowRate := validToken() + invalidKinkBorrowRate.KinkBorrowRate = sdk.MustNewDecFromStr("-0.05") + + invalidMaxBorrowRate := validToken() + invalidMaxBorrowRate.MaxBorrowRate = sdk.MustNewDecFromStr("-1.0") + + invalidKinkUtilization := validToken() + invalidKinkUtilization.KinkUtilization = sdk.ZeroDec() + + invalidLiquidationIncentive := validToken() + invalidLiquidationIncentive.LiquidationIncentive = sdk.MustNewDecFromStr("-0.05") + + invalidBlacklisted := validToken() + invalidBlacklisted.EnableMsgBorrow = false + invalidBlacklisted.Blacklist = true + + invalidMaxCollateralSupply := validToken() + invalidMaxCollateralSupply.MaxCollateralSupply = 101 + + validMaxCollateralSupply := validToken() + validMaxCollateralSupply.MaxCollateralSupply = 100 + testCases := map[string]struct { input types.Token expectErr bool }{ "valid token": { - input: types.Token{ - BaseDenom: "uumee", - SymbolDenom: "umee", - Exponent: 6, - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: validToken(), }, "invalid base token": { - input: types.Token{ - BaseDenom: "$$", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidBaseToken, expectErr: true, }, "invalid base token (utoken)": { - input: types.Token{ - BaseDenom: "u/uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidUToken, expectErr: true, }, "invalid reserve factor": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("-0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidReserveFactor, expectErr: true, }, "invalid collateral weight": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("50.00"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidCollateralWeight, expectErr: true, }, "invalid liquidation threshold": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.40"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidLiquidationThreshold, expectErr: true, }, "invalid base borrow rate": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("-0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidBaseBorrowRate, expectErr: true, }, "invalid kink borrow rate": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("-0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidKinkBorrowRate, expectErr: true, }, "invalid max borrow rate": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("-1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidMaxBorrowRate, expectErr: true, }, "invalid kink utilization rate": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.ZeroDec(), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, + input: invalidKinkUtilization, expectErr: true, }, "invalid liquidation incentive": { - input: types.Token{ - BaseDenom: "uumee", - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("-0.05"), - EnableMsgLend: true, - EnableMsgBorrow: true, - Blacklist: false, - }, - expectErr: true, - }, + input: invalidLiquidationIncentive, + expectErr: true}, "blacklisted but lend enabled": { - input: types.Token{ - BaseDenom: "uumee", - SymbolDenom: "umee", - Exponent: 6, - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, - EnableMsgBorrow: false, - Blacklist: true, - }, + input: invalidBlacklisted, expectErr: true, }, - "blacklisted but borrow enabled": { - input: types.Token{ - BaseDenom: "uumee", - SymbolDenom: "umee", - Exponent: 6, - ReserveFactor: sdk.MustNewDecFromStr("0.25"), - CollateralWeight: sdk.MustNewDecFromStr("0.50"), - LiquidationThreshold: sdk.MustNewDecFromStr("0.50"), - BaseBorrowRate: sdk.MustNewDecFromStr("0.01"), - KinkBorrowRate: sdk.MustNewDecFromStr("0.05"), - MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), - KinkUtilization: sdk.MustNewDecFromStr("0.75"), - LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: false, - EnableMsgBorrow: true, - Blacklist: true, - }, + "invalid max collateral supply": { + input: invalidMaxCollateralSupply, expectErr: true, }, + "valid max collateral supply": { + input: validMaxCollateralSupply, + expectErr: false, + }, } for name, tc := range testCases { From 435153e97e1c9d22b4a2c21310b07342989a68e9 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 4 Jul 2022 23:40:47 +0200 Subject: [PATCH 03/17] changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f2ceb2915..882c0cb609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [913](https://github.com/umee-network/umee/pull/913) Changed update registry gov proposal to add and update tokens, but never delete them. - [918](https://github.com/umee-network/umee/pull/918) Add MarketSummary query to CLI. - [1068](https://github.com/umee-network/umee/pull/1068) Add a cache layer for token registry. +- [1096](https://github.com/umee-network/umee/pull/1096) Add `max_collateral_supply` to the x/leverage token registry. ### Improvements From 063768a4326c3905b155e157aae380f82320685e Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 4 Jul 2022 23:47:49 +0200 Subject: [PATCH 04/17] review: typos --- proto/umee/leverage/v1/leverage.proto | 6 +- x/leverage/types/leverage.pb.go | 104 +++++++++++++------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index f5483a4f88..b736d4fb5a 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -140,12 +140,12 @@ message Token { // oracle and price feeder as well. bool blacklist = 14; - // Maximum allowed collateral supply specifis how much of the token can - // be provided in total as a collatera in the system. + // Maximum allowed collateral supply specifies how much of the token can + // be provided in total as a collateral in the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. uint32 max_collateral_supply = 15 [ - (gogoproto.moretags) = "yaml:\"small_liquidation_size\"" + (gogoproto.moretags) = "yaml:\"max_collateral_supply\"" ]; } diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 2d3954f141..381632819b 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -126,12 +126,12 @@ type Token struct { // and enable_borrow set to false. Such tokens can be safely removed from the // oracle and price feeder as well. Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"` - // Maximum allowed collateral supply specifis how much of the token can - // be provided in total as a collatera in the system. + // Maximum allowed collateral supply specifies how much of the token can + // be provided in total as a collateral in the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. - MaxCollateralSupply uint32 `protobuf:"varint,15,opt,name=max_collateral_supply,json=maxCollateralSupply,proto3" json:"max_collateral_supply,omitempty" yaml:"small_liquidation_size"` + MaxCollateralSupply uint32 `protobuf:"varint,15,opt,name=max_collateral_supply,json=maxCollateralSupply,proto3" json:"max_collateral_supply,omitempty" yaml:"max_collateral_supply"` } func (m *Token) Reset() { *m = Token{} } @@ -224,57 +224,57 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 797 bytes of a gzipped FileDescriptorProto + // 798 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x6f, 0x23, 0x45, - 0x14, 0xf6, 0x82, 0x2f, 0xc4, 0x73, 0x67, 0x3b, 0xd9, 0xd8, 0x77, 0xab, 0xc3, 0x78, 0xc3, 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 0xf2, 0xff, 0x9c, 0xdb, 0x46, 0xfb, 0xcd, 0xc5, 0x55, 0xdd, 0xb8, + 0xbc, 0xaa, 0x1b, 0x7f, 0x5f, 0xd5, 0x8d, 0x5f, 0xaf, 0xeb, 0xb9, 0xcb, 0xeb, 0x7a, 0xee, 0xcf, + 0xeb, 0x7a, 0xee, 0xfb, 0x4f, 0x33, 0xc5, 0x8e, 0xde, 0x00, 0xcf, 0x02, 0x50, 0x13, 0x11, 0x0e, + 0xf4, 0xc2, 0x19, 0x7f, 0xe6, 0x4c, 0xd3, 0x67, 0x83, 0x2e, 0x7d, 0x67, 0x47, 0xbf, 0x04, 0x3e, + 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x73, 0x46, 0x42, 0xae, 0x54, 0x08, 0x00, 0x00, } func (this *Token) Equal(that interface{}) bool { From b53409187535fb6c8acaaa3b7a883e73ea7218a7 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 4 Jul 2022 23:54:01 +0200 Subject: [PATCH 05/17] add missing test --- x/leverage/types/token_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index 8271b37aab..9a406055ff 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -112,9 +112,13 @@ func TestToken_Validate(t *testing.T) { invalidLiquidationIncentive := validToken() invalidLiquidationIncentive.LiquidationIncentive = sdk.MustNewDecFromStr("-0.05") - invalidBlacklisted := validToken() - invalidBlacklisted.EnableMsgBorrow = false - invalidBlacklisted.Blacklist = true + invalidBlacklistedBorrow := validToken() + invalidBlacklistedBorrow.EnableMsgLend = false + invalidBlacklistedBorrow.Blacklist = true + + invalidBlacklistedLend := validToken() + invalidBlacklistedLend.EnableMsgBorrow = false + invalidBlacklistedLend.Blacklist = true invalidMaxCollateralSupply := validToken() invalidMaxCollateralSupply.MaxCollateralSupply = 101 @@ -169,7 +173,11 @@ func TestToken_Validate(t *testing.T) { input: invalidLiquidationIncentive, expectErr: true}, "blacklisted but lend enabled": { - input: invalidBlacklisted, + input: invalidBlacklistedLend, + expectErr: true, + }, + "blacklisted but borrow enabled": { + input: invalidBlacklistedBorrow, expectErr: true, }, "invalid max collateral supply": { From 78e3306fb3880db9acf7a3cdf037790a41ba9bc1 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 5 Jul 2022 00:00:49 +0200 Subject: [PATCH 06/17] typo --- proto/umee/leverage/v1/leverage.proto | 2 +- x/leverage/types/leverage.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index b736d4fb5a..797edc5de6 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -141,7 +141,7 @@ message Token { bool blacklist = 14; // Maximum allowed collateral supply specifies how much of the token can - // be provided in total as a collateral in the system. + // be provided in total as a collateral to the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 381632819b..a5b98843db 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -127,7 +127,7 @@ type Token struct { // oracle and price feeder as well. Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"` // Maximum allowed collateral supply specifies how much of the token can - // be provided in total as a collateral in the system. + // be provided in total as a collateral to the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. From ba83b708a5461f3fac82aa94f7ade2e32d7db600 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 5 Jul 2022 22:55:02 +0200 Subject: [PATCH 07/17] rename MaxCollateralSupply to MaxCollateralShare --- proto/umee/leverage/v1/leverage.proto | 4 +- x/leverage/types/leverage.pb.go | 125 +++++++-------- x/leverage/types/query.pb.go | 211 +++++++++++++------------- x/leverage/types/token.go | 2 +- x/leverage/types/token_test.go | 6 +- 5 files changed, 175 insertions(+), 173 deletions(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index 797edc5de6..ffb8c4f6c0 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -140,12 +140,12 @@ message Token { // oracle and price feeder as well. bool blacklist = 14; - // Maximum allowed collateral supply specifies how much of the token can + // Maximum collateral share specifies how much of the token can // be provided in total as a collateral to the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. - uint32 max_collateral_supply = 15 [ + uint32 max_collateral_share = 15 [ (gogoproto.moretags) = "yaml:\"max_collateral_supply\"" ]; } diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index a5b98843db..b66ef4a439 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -126,12 +126,12 @@ type Token struct { // and enable_borrow set to false. Such tokens can be safely removed from the // oracle and price feeder as well. Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"` - // Maximum allowed collateral supply specifies how much of the token can + // Maximum collateral share specifies how much of the token can // be provided in total as a collateral to the system. // Value is provided in pre cent, Allowed values are in [0; 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. - MaxCollateralSupply uint32 `protobuf:"varint,15,opt,name=max_collateral_supply,json=maxCollateralSupply,proto3" json:"max_collateral_supply,omitempty" yaml:"max_collateral_supply"` + MaxCollateralShare uint32 `protobuf:"varint,15,opt,name=max_collateral_share,json=maxCollateralShare,proto3" json:"max_collateral_share,omitempty" yaml:"max_collateral_supply"` } func (m *Token) Reset() { *m = Token{} } @@ -209,9 +209,9 @@ func (m *Token) GetBlacklist() bool { return false } -func (m *Token) GetMaxCollateralSupply() uint32 { +func (m *Token) GetMaxCollateralShare() uint32 { if m != nil { - return m.MaxCollateralSupply + return m.MaxCollateralShare } return 0 } @@ -224,57 +224,58 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 798 bytes of a gzipped FileDescriptorProto + // 801 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x6f, 0x23, 0x45, - 0x14, 0xf6, 0x82, 0x2f, 0xc4, 0x73, 0x67, 0x3b, 0xd9, 0xd8, 0x77, 0xab, 0xc3, 0x78, 0xad, 0x91, - 0x40, 0x69, 0xce, 0xcb, 0x01, 0x95, 0x4b, 0xdf, 0x09, 0xee, 0x4e, 0x17, 0x40, 0x93, 0xa0, 0x48, - 0x34, 0xab, 0xf1, 0xfa, 0x61, 0xaf, 0x3c, 0xb3, 0x63, 0x76, 0xc6, 0xbf, 0xd2, 0x50, 0x20, 0x7a, - 0x4a, 0x1a, 0xa4, 0xfc, 0x19, 0xfc, 0x09, 0x29, 0x53, 0x22, 0x0a, 0x0b, 0x25, 0x0d, 0xb5, 0x3b, - 0x3a, 0xb4, 0xb3, 0x6b, 0xef, 0x3a, 0x31, 0x27, 0x59, 0x49, 0xe5, 0x9d, 0xef, 0x3d, 0x7f, 0xdf, - 0x37, 0xf3, 0xde, 0x1b, 0x0d, 0xb2, 0x47, 0x1c, 0xc0, 0x61, 0x30, 0x86, 0x90, 0xf6, 0xc0, 0x19, - 0x3f, 0x5f, 0x7d, 0x37, 0x87, 0xa1, 0x50, 0xc2, 0xdc, 0x8b, 0x12, 0x9a, 0x2b, 0x70, 0xfc, 0xfc, - 0x69, 0xa5, 0x27, 0x7a, 0x42, 0x07, 0x9d, 0xe8, 0x2b, 0xce, 0xc3, 0x7f, 0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0x52, 0x83, + 0x91, 0x01, 0x2e, 0xa8, 0xc7, 0xc0, 0x15, 0x30, 0xa6, 0xa2, 0xb3, 0x30, 0x90, 0xbf, 0x9b, 0x81, + 0x4d, 0x9c, 0x98, 0x98, 0x31, 0x4c, 0x34, 0x9a, 0x18, 0xf8, 0xc5, 0x40, 0x4f, 0x64, 0x40, 0x19, + 0x5b, 0xd9, 0x40, 0xe9, 0x9f, 0x83, 0xf5, 0x40, 0x7b, 0xf8, 0x66, 0x6b, 0x0f, 0x1f, 0xc5, 0x1e, + 0x36, 0xb3, 0x62, 0x52, 0xd1, 0x81, 0x4c, 0x39, 0x4e, 0xfc, 0x73, 0x68, 0xe6, 0x7f, 0xbb, 0xb0, + 0x73, 0xf8, 0x5f, 0x84, 0x1e, 0x9c, 0xf2, 0x3e, 0x84, 0xe6, 0x17, 0x08, 0xb5, 0xa9, 0x04, 0xb7, + 0x03, 0x21, 0x0f, 0x2c, 0x43, 0x5b, 0x39, 0x98, 0xcf, 0xec, 0xfd, 0x98, 0x3c, 0x8d, 0x61, 0x52, + 0x88, 0x26, 0xaf, 0xa2, 0xb1, 0x19, 0xa2, 0x92, 0x00, 0x09, 0x62, 0xb4, 0xac, 0x64, 0xdc, 0x5e, + 0x5f, 0x6d, 0xbd, 0x88, 0x83, 0x58, 0x67, 0x95, 0x0d, 0x93, 0x62, 0x02, 0x24, 0xbb, 0x37, 0x46, + 0xfb, 0x1e, 0x67, 0x8c, 0x2a, 0x10, 0x94, 0xb9, 0x63, 0xf0, 0xbb, 0x3d, 0x95, 0x34, 0xcf, 0xdb, + 0xad, 0x25, 0xad, 0x45, 0x47, 0xaf, 0x11, 0x62, 0xb2, 0x97, 0x62, 0x67, 0x1a, 0x32, 0x7f, 0x36, + 0xd0, 0xc1, 0xe6, 0xf3, 0x14, 0x77, 0xce, 0xd7, 0x5b, 0xab, 0x57, 0x63, 0xf5, 0xff, 0x39, 0x46, + 0x15, 0xb6, 0xe9, 0xf8, 0x48, 0xb4, 0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, 0x75, 0xe3, 0x70, + 0xb7, 0xf5, 0x2c, 0x2d, 0xd6, 0x5a, 0x02, 0x26, 0xc5, 0x18, 0x39, 0x96, 0xdd, 0x23, 0x08, 0x3b, + 0xe6, 0x6b, 0xb4, 0x9f, 0x49, 0x89, 0xcb, 0x6a, 0x15, 0x35, 0x4b, 0x35, 0x3d, 0xd9, 0xb7, 0x52, + 0x30, 0x29, 0x2f, 0x79, 0xe2, 0xd2, 0x9b, 0x55, 0x54, 0x68, 0x33, 0xea, 0xf5, 0x99, 0x2f, 0x95, + 0x55, 0x8a, 0x18, 0x48, 0x0a, 0x98, 0x04, 0x55, 0xa2, 0xbe, 0xc9, 0x5c, 0x11, 0xb2, 0x47, 0x05, + 0x58, 0x65, 0xbd, 0xd0, 0x7a, 0xba, 0xdd, 0xeb, 0x59, 0xc3, 0xc1, 0x80, 0x4d, 0xa3, 0xbf, 0x20, + 0x3a, 0x79, 0xb9, 0x84, 0x4f, 0xa2, 0x6f, 0x9b, 0xf9, 0x7f, 0x2e, 0x6c, 0xa3, 0xf5, 0xf6, 0xf2, + 0xba, 0x66, 0x5c, 0x5d, 0xd7, 0x8c, 0xbf, 0xaf, 0x6b, 0xc6, 0xaf, 0x37, 0xb5, 0xdc, 0xd5, 0x4d, + 0x2d, 0xf7, 0xe7, 0x4d, 0x2d, 0xf7, 0xfd, 0xa7, 0x99, 0x52, 0x47, 0x2f, 0x80, 0xe7, 0x21, 0xa8, + 0x31, 0x17, 0x7d, 0x3d, 0x71, 0x46, 0x9f, 0x39, 0x93, 0xf4, 0xd1, 0xa0, 0x0b, 0xdf, 0xde, 0xd1, + 0xef, 0x80, 0xcf, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x34, 0xd0, 0x9f, 0x0a, 0x52, 0x08, 0x00, + 0x00, } func (this *Token) Equal(that interface{}) bool { @@ -338,7 +339,7 @@ func (this *Token) Equal(that interface{}) bool { if this.Blacklist != that1.Blacklist { return false } - if this.MaxCollateralSupply != that1.MaxCollateralSupply { + if this.MaxCollateralShare != that1.MaxCollateralShare { return false } return true @@ -426,8 +427,8 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MaxCollateralSupply != 0 { - i = encodeVarintLeverage(dAtA, i, uint64(m.MaxCollateralSupply)) + if m.MaxCollateralShare != 0 { + i = encodeVarintLeverage(dAtA, i, uint64(m.MaxCollateralShare)) i-- dAtA[i] = 0x78 } @@ -633,8 +634,8 @@ func (m *Token) Size() (n int) { if m.Blacklist { n += 2 } - if m.MaxCollateralSupply != 0 { - n += 1 + sovLeverage(uint64(m.MaxCollateralSupply)) + if m.MaxCollateralShare != 0 { + n += 1 + sovLeverage(uint64(m.MaxCollateralShare)) } return n } @@ -1277,9 +1278,9 @@ func (m *Token) Unmarshal(dAtA []byte) error { m.Blacklist = bool(v != 0) case 15: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxCollateralSupply", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxCollateralShare", wireType) } - m.MaxCollateralSupply = 0 + m.MaxCollateralShare = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeverage @@ -1289,7 +1290,7 @@ func (m *Token) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxCollateralSupply |= uint32(b&0x7F) << shift + m.MaxCollateralShare |= uint32(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index d8827b6411..55eac1fbc7 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -1866,111 +1866,112 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 1654 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59,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x7a, 0x1e, 0x70, 0x42, 0x1d, - 0xcd, 0xe3, 0x30, 0xee, 0xc1, 0x10, 0x9f, 0x18, 0xc8, 0x39, 0x81, 0x9f, 0xc4, 0x60, 0x22, 0xcf, - 0xf7, 0x90, 0x42, 0x0c, 0x73, 0x0c, 0x83, 0x4c, 0x4a, 0x69, 0x0c, 0x7c, 0x24, 0x21, 0x9f, 0xc1, - 0x48, 0xd0, 0x75, 0x93, 0x05, 0x81, 0xd1, 0xae, 0x71, 0x45, 0x5e, 0xec, 0x29, 0x87, 0xee, 0x15, - 0xe6, 0x7e, 0x86, 0xc8, 0x69, 0xf7, 0x41, 0x2f, 0x4e, 0xbe, 0x97, 0x60, 0x22, 0xd1, 0xf7, 0x93, - 0xe5, 0x1e, 0xe6, 0xe3, 0xed, 0xa1, 0xfc, 0xff, 0xfe, 0x84, 0x11, 0xd0, 0x12, 0x03, 0xa4, 0x90, - 0x39, 0x31, 0x20, 0xde, 0x1a, 0xfa, 0x17, 0xc2, 0x3b, 0x48, 0xe1, 0x85, 0x24, 0xba, 0x6d, 0xe1, - 0x85, 0x24, 0xbb, 0xe9, 0xbc, 0x0b, 0xe1, 0x5d, 0x25, 0xf9, 0x56, 0x82, 0xb1, 0x58, 0xef, 0x4a, - 0xce, 0xe7, 0x1a, 0x4e, 0x9c, 0xc5, 0x85, 0x7e, 0x44, 0x11, 0xc8, 0x02, 0x03, 0x32, 0x47, 0xca, - 0x22, 0x20, 0x78, 0x0e, 0x8f, 0x25, 0x98, 0xec, 0x7a, 0x32, 0x22, 0x2b, 0x02, 0x3f, 0xd9, 0xef, - 0x51, 0x72, 0xa5, 0x5f, 0x71, 0x84, 0x76, 0x81, 0x41, 0x3b, 0x47, 0x94, 0x34, 0xb4, 0x6e, 0x76, - 0x25, 0x5f, 0x49, 0x30, 0x1a, 0x3e, 0x1d, 0x91, 0xfc, 0xc0, 0x8c, 0x9e, 0x80, 0xe4, 0xa5, 0xde, - 0x82, 0x08, 0xe6, 0x1c, 0x03, 0x53, 0x26, 0x33, 0xa2, 0x88, 0xd1, 0xf4, 0xf6, 0x21, 0xf9, 0x14, - 0x86, 0xf1, 0xdd, 0x88, 0x08, 0x03, 0x21, 0xf1, 0x08, 0x25, 0x2f, 0xf4, 0x12, 0xeb, 0x9d, 0x42, - 0xac, 0xaa, 0xfa, 0xde, 0x1f, 0x4a, 0x00, 0xd1, 0xfb, 0x0b, 0x11, 0x6d, 0x2e, 0xf5, 0xae, 0x23, - 0x9f, 0xef, 0x43, 0x12, 0x71, 0xcc, 0x33, 0x1c, 0xb3, 0xe4, 0x4c, 0x1a, 0x47, 0xac, 0x86, 0x92, - 0x1f, 0x25, 0x98, 0xec, 0x7a, 0x0f, 0x12, 0x86, 0x4b, 0xf6, 0x63, 0x93, 0x30, 0x5c, 0x04, 0xcf, - 0x4c, 0x79, 0x3c, 0xcb, 0xc8, 0x55, 0x8b, 0xe3, 0xf3, 0xd9, 0x26, 0x31, 0x77, 0x09, 0xd9, 0x26, - 0x6b, 0xa0, 0x13, 0xb2, 0x4d, 0xe6, 0x28, 0x97, 0xc7, 0x36, 0x58, 0x8b, 0x35, 0x5e, 0xa4, 0xc8, - 0x37, 0x12, 0x40, 0x54, 0x03, 0x85, 0x37, 0x98, 0xaa, 0xad, 0xc2, 0x1b, 0x4c, 0x17, 0xd4, 0xbc, - 0x48, 0x8e, 0x6a, 0x39, 0xcb, 0xf7, 0xae, 0x27, 0x0c, 0xe1, 0x05, 0x66, 0xbf, 0x9c, 0x08, 0x2f, - 0x50, 0xf0, 0x32, 0x92, 0x97, 0xef, 0xdd, 0x2f, 0x26, 0xe4, 0x91, 0x04, 0xe3, 0x89, 0xee, 0x52, - 0xc4, 0x79, 0x19, 0x33, 0xa2, 0xbc, 0xdc, 0x97, 0x2c, 0xa2, 0x5a, 0x64, 0xa8, 0xce, 0x92, 0xd9, - 0x34, 0xaa, 0x44, 0xa7, 0xcc, 0x08, 0x3b, 0x36, 0xb8, 0x09, 0x09, 0x3b, 0x3d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 0x1b, 0x00, 0x00, + // 1667 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x6f, 0xdc, 0x54, + 0x17, 0x8f, 0xdb, 0xe6, 0x75, 0x92, 0x7c, 0xa9, 0xee, 0x97, 0x7e, 0x99, 0xfa, 0x4b, 0x27, 0xa9, + 0x69, 0x1e, 0x6d, 0x9a, 0x71, 0x1e, 0x12, 0x12, 0x82, 0x05, 0x49, 0x4b, 0x45, 0x4b, 0x03, 0xe9, + 0xf4, 0x21, 0xda, 0x8d, 0xf1, 0xcc, 0x5c, 0x26, 0xa3, 0x78, 0xec, 0x89, 0xed, 0x99, 0x36, 0x05, + 0x04, 0x42, 0x08, 0x8a, 0xc4, 0xa2, 0x12, 0x6c, 0x90, 0x60, 0xc7, 0x02, 0xb1, 0xe2, 0xcf, 0xe8, + 0xb2, 0x12, 0x1b, 0xc4, 0xa2, 0xa0, 0x96, 0xbf, 0x80, 0xbf, 0x00, 0xf9, 0xde, 0xe3, 0xd7, 0xd8, + 0xd7, 0x33, 0x75, 0xda, 0x55, 0x33, 0xd7, 0xe7, 0xf1, 0xbb, 0xf7, 0x9e, 0xf3, 0x3b, 0xe7, 0xdc, + 0xc2, 0x4c, 0xbb, 0x49, 0xa9, 0x6a, 0xd0, 0x0e, 0xb5, 0xf5, 0x3a, 0x55, 0x3b, 0x6b, 0xea, 0x7e, + 0x9b, 0xda, 0x07, 0xa5, 0x96, 0x6d, 0xb9, 0x16, 0x39, 0xee, 0x7d, 0x2d, 0xf9, 0x5f, 0x4b, 0x9d, + 0x35, 0x79, 0xa6, 0x6e, 0x59, 0x75, 0x83, 0xaa, 0x7a, 0xab, 0xa1, 0xea, 0xa6, 0x69, 0xb9, 0xba, + 0xdb, 0xb0, 0x4c, 0x87, 0xcb, 0xcb, 0xb3, 0x09, 0x6b, 0x81, 0x2e, 0x17, 0x98, 0xaa, 0x5b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33, 0x86, 0xac, 0xf6, 0x29, 0xe8, 0x6f, + 0x40, 0x59, 0xfe, 0xfc, 0xb7, 0xbf, 0xbf, 0x3d, 0x32, 0x4f, 0x5e, 0x51, 0x13, 0xcf, 0x03, 0x76, + 0xa0, 0xa3, 0xb9, 0x1c, 0xc6, 0x5d, 0x18, 0xe2, 0x13, 0x03, 0x39, 0x23, 0xf0, 0x13, 0x1b, 0x4c, + 0xe4, 0xf9, 0x1e, 0x52, 0x88, 0x61, 0x8e, 0x61, 0x90, 0x49, 0x21, 0x89, 0x81, 0x8f, 0x24, 0xe4, + 0x53, 0x18, 0xf1, 0xbb, 0x6e, 0xb2, 0x20, 0x30, 0xda, 0x35, 0xae, 0xc8, 0x8b, 0x3d, 0xe5, 0xd0, + 0xbd, 0xc2, 0xdc, 0xcf, 0x10, 0x39, 0xe9, 0xde, 0xef, 0xc5, 0xc9, 0x77, 0x12, 0x4c, 0xc4, 0xfa, + 0x7e, 0xb2, 0xdc, 0xc3, 0x7c, 0xb4, 0x3d, 0x94, 0xcf, 0xf7, 0x27, 0x8c, 0x80, 0x96, 0x18, 0x20, + 0x85, 0xcc, 0x89, 0x01, 0xf1, 0xd6, 0xd0, 0xbb, 0x10, 0xde, 0x41, 0x0a, 0x2f, 0x24, 0xd6, 0x6d, + 0x0b, 0x2f, 0x24, 0xde, 0x4d, 0x67, 0x5d, 0x08, 0xef, 0x2a, 0xc9, 0x37, 0x12, 0x8c, 0x45, 0x7a, + 0x57, 0x72, 0x36, 0xd3, 0x70, 0xec, 0x2c, 0xce, 0xf5, 0x23, 0x8a, 0x40, 0x16, 0x18, 0x90, 0x39, + 0x52, 0x14, 0x01, 0xc1, 0x73, 0xf8, 0x41, 0x82, 0xc9, 0xae, 0x27, 0x23, 0xb2, 0x22, 0xf0, 0x93, + 0xfe, 0x1e, 0x25, 0x97, 0xfa, 0x15, 0x47, 0x68, 0xe7, 0x18, 0xb4, 0x33, 0x44, 0x49, 0x42, 0xeb, + 0x66, 0x57, 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x49, 0xdd, 0xbb, 0x96, 0xbd, 0xc7, 0x8d, 0x77, 0xd6, 0xd5, 0x7b, 0xa1, 0x07, 0xd6, 0xe3, 0x57, + 0x86, 0xd8, 0x7f, 0x92, 0x6d, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xd1, 0x85, 0xbc, 0xcb, + 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/leverage/types/token.go b/x/leverage/types/token.go index b7333098fc..215575806a 100644 --- a/x/leverage/types/token.go +++ b/x/leverage/types/token.go @@ -84,7 +84,7 @@ func (t Token) Validate() error { } } - if t.MaxCollateralSupply > 100 { + if t.MaxCollateralShare > 100 { return sdkerrors.ErrInvalidRequest.Wrap("Token.MaxCollateralSupply must be in [0; 100] range") } diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index 9a406055ff..8e9c6bdd98 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -77,7 +77,7 @@ func TestToken_Validate(t *testing.T) { EnableMsgLend: true, EnableMsgBorrow: true, Blacklist: false, - MaxCollateralSupply: 0, + MaxCollateralShare: 0, } } invalidBaseToken := validToken() @@ -121,10 +121,10 @@ func TestToken_Validate(t *testing.T) { invalidBlacklistedLend.Blacklist = true invalidMaxCollateralSupply := validToken() - invalidMaxCollateralSupply.MaxCollateralSupply = 101 + invalidMaxCollateralSupply.MaxCollateralShare = 101 validMaxCollateralSupply := validToken() - validMaxCollateralSupply.MaxCollateralSupply = 100 + validMaxCollateralSupply.MaxCollateralShare = 100 testCases := map[string]struct { input types.Token From 83f5bfd3785f0cfb9dab5f223af188f80dc4ccda Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:10:25 -0700 Subject: [PATCH 08/17] finish var renames --- x/leverage/types/token.go | 2 +- x/leverage/types/token_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x/leverage/types/token.go b/x/leverage/types/token.go index 215575806a..6be0e2d290 100644 --- a/x/leverage/types/token.go +++ b/x/leverage/types/token.go @@ -85,7 +85,7 @@ func (t Token) Validate() error { } if t.MaxCollateralShare > 100 { - return sdkerrors.ErrInvalidRequest.Wrap("Token.MaxCollateralSupply must be in [0; 100] range") + return sdkerrors.ErrInvalidRequest.Wrap("Token.MaxCollateralShare must be in [0; 100] range") } return nil diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index 8e9c6bdd98..159ef982cd 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -120,11 +120,11 @@ func TestToken_Validate(t *testing.T) { invalidBlacklistedLend.EnableMsgBorrow = false invalidBlacklistedLend.Blacklist = true - invalidMaxCollateralSupply := validToken() - invalidMaxCollateralSupply.MaxCollateralShare = 101 + invalidMaxCollateralShare := validToken() + invalidMaxCollateralShare.MaxCollateralShare = 101 - validMaxCollateralSupply := validToken() - validMaxCollateralSupply.MaxCollateralShare = 100 + validMaxCollateralShare := validToken() + validMaxCollateralShare.MaxCollateralShare = 100 testCases := map[string]struct { input types.Token @@ -180,12 +180,12 @@ func TestToken_Validate(t *testing.T) { input: invalidBlacklistedBorrow, expectErr: true, }, - "invalid max collateral supply": { - input: invalidMaxCollateralSupply, + "invalid max collateral share": { + input: invalidMaxCollateralShare, expectErr: true, }, - "valid max collateral supply": { - input: validMaxCollateralSupply, + "valid max collateral share": { + input: validMaxCollateralShare, expectErr: false, }, } From cbbca2ad628aaeda5ea07e46ada82de06970cea8 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:12:03 -0700 Subject: [PATCH 09/17] Update proto comment --- proto/umee/leverage/v1/leverage.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index ffb8c4f6c0..01022ca011 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -140,9 +140,9 @@ message Token { // oracle and price feeder as well. bool blacklist = 14; - // Maximum collateral share specifies how much of the token can - // be provided in total as a collateral to the system. - // Value is provided in pre cent, Allowed values are in [0; 100] range. + // Maximum collateral share specifies how much of the + // system's overall collateral be provided by a single token. + // Value is a percent; allowed values are in [0, 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. uint32 max_collateral_share = 15 [ From f5b55a57fe3792a8fddb8a3509fcb6d9b534bcd0 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:12:40 -0700 Subject: [PATCH 10/17] make proto-gen --- x/leverage/types/leverage.pb.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index b66ef4a439..32026927dd 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -126,9 +126,9 @@ type Token struct { // and enable_borrow set to false. Such tokens can be safely removed from the // oracle and price feeder as well. Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"` - // Maximum collateral share specifies how much of the token can - // be provided in total as a collateral to the system. - // Value is provided in pre cent, Allowed values are in [0; 100] range. + // Maximum collateral share specifies how much of the + // system's overall collateral be provided by a single token. + // Value is a percent; allowed values are in [0, 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. MaxCollateralShare uint32 `protobuf:"varint,15,opt,name=max_collateral_share,json=maxCollateralShare,proto3" json:"max_collateral_share,omitempty" yaml:"max_collateral_supply"` From b955b18596582fa08ec69d1d3ffc72797567d4dd Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:14:19 -0700 Subject: [PATCH 11/17] fix yaml tag --- proto/umee/leverage/v1/leverage.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/umee/leverage/v1/leverage.proto b/proto/umee/leverage/v1/leverage.proto index 01022ca011..f61e510c2c 100644 --- a/proto/umee/leverage/v1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -146,6 +146,6 @@ message Token { // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. uint32 max_collateral_share = 15 [ - (gogoproto.moretags) = "yaml:\"max_collateral_supply\"" + (gogoproto.moretags) = "yaml:\"max_collateral_share\"" ]; } From 774717dd3f02e71782cc73eb5f030ccf5b170163 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:15:05 -0700 Subject: [PATCH 12/17] make proto-gen --- x/leverage/types/leverage.pb.go | 103 ++++++++++++++++---------------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 32026927dd..bcfa5072da 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -131,7 +131,7 @@ type Token struct { // Value is a percent; allowed values are in [0, 100] range. // 100 means that the token has no restriction. 10 means maximum 10% of total // collateral value can provided by this token. - MaxCollateralShare uint32 `protobuf:"varint,15,opt,name=max_collateral_share,json=maxCollateralShare,proto3" json:"max_collateral_share,omitempty" yaml:"max_collateral_supply"` + MaxCollateralShare uint32 `protobuf:"varint,15,opt,name=max_collateral_share,json=maxCollateralShare,proto3" json:"max_collateral_share,omitempty" yaml:"max_collateral_share"` } func (m *Token) Reset() { *m = Token{} } @@ -224,58 +224,57 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 801 bytes of a gzipped FileDescriptorProto + // 797 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0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 0x22, 0x06, 0x92, 0x02, 0xe6, 0x37, 0xa8, 0x12, 0xf5, 0x4d, 0xe6, 0x8a, 0x90, 0x5d, 0x2a, + 0xc0, 0x2a, 0xeb, 0x85, 0xda, 0x99, 0x2f, 0xd0, 0x92, 0xac, 0xe8, 0x0b, 0x44, 0xc7, 0x7b, 0x73, + 0xf4, 0x34, 0x02, 0x1b, 0xf9, 0xbf, 0xaf, 0x6c, 0xa3, 0x79, 0x74, 0x7d, 0x5b, 0x33, 0x6e, 0x6e, + 0x6b, 0xc6, 0x5f, 0xb7, 0x35, 0xe3, 0x97, 0xbb, 0x5a, 0xee, 0xe6, 0xae, 0x96, 0xfb, 0xe3, 0xae, + 0x96, 0xfb, 0xee, 0xe3, 0x4c, 0xa5, 0xa3, 0x07, 0xc0, 0xdb, 0x10, 0xd4, 0x88, 0x8b, 0x9e, 0x9e, + 0x38, 0xc3, 0x4f, 0x9c, 0x71, 0xfa, 0x66, 0xd0, 0x75, 0x6f, 0xad, 0xe9, 0x67, 0xc0, 0xa7, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0x38, 0x2c, 0x8b, 0xa1, 0x51, 0x08, 0x00, 0x00, } func (this *Token) Equal(that interface{}) bool { From 4bbf7e69342111a4b9a60d89fc187e057eeff671 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:15:40 -0700 Subject: [PATCH 13/17] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b6ac5754..c3c29b5106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,7 +57,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [913](https://github.com/umee-network/umee/pull/913) Changed update registry gov proposal to add and update tokens, but never delete them. - [918](https://github.com/umee-network/umee/pull/918) Add MarketSummary query to CLI. - [1068](https://github.com/umee-network/umee/pull/1068) Add a cache layer for token registry. -- [1096](https://github.com/umee-network/umee/pull/1096) Add `max_collateral_supply` to the x/leverage token registry. +- [1096](https://github.com/umee-network/umee/pull/1096) Add `max_collateral_share` to the x/leverage token registry. - [1094](https://github.com/umee-network/umee/pull/1094) Added TotalCollateral query. ### Improvements From acfb1e4b07394364255e73fb898d46df839ee166 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:16:41 -0700 Subject: [PATCH 14/17] update spec --- x/leverage/spec/02_state.md | 1 + 1 file changed, 1 insertion(+) diff --git a/x/leverage/spec/02_state.md b/x/leverage/spec/02_state.md index 6a24989b87..756cc8f927 100644 --- a/x/leverage/spec/02_state.md +++ b/x/leverage/spec/02_state.md @@ -49,5 +49,6 @@ type Token struct { EnableMsgLend bool EnableMsgBorrow bool Blacklist bool + MaxCollateralShare uint32 } ``` From 0418643189ff1518e42b2f8014ddb228b8f79c76 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:13:20 -0700 Subject: [PATCH 15/17] make proto-gen --- x/leverage/types/leverage.pb.go | 102 +++++++++++++++--------------- x/leverage/types/query.pb.go | 107 +------------------------------- 2 files changed, 52 insertions(+), 157 deletions(-) diff --git a/x/leverage/types/leverage.pb.go b/x/leverage/types/leverage.pb.go index 285a97bd47..a5b5fa2e9c 100644 --- a/x/leverage/types/leverage.pb.go +++ b/x/leverage/types/leverage.pb.go @@ -224,57 +224,57 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/leverage.proto", fileDescriptor_8cb1bf9ea641ecc6) } var fileDescriptor_8cb1bf9ea641ecc6 = []byte{ - // 797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x6f, 0x23, 0x45, - 0x14, 0xf6, 0x82, 0x2f, 0xc4, 0x73, 0x67, 0x3b, 0xd9, 0x73, 0xee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4c, 0xa5, 0xa3, 0x07, 0xc0, 0xdb, 0x10, 0xd4, 0x88, 0x8b, 0x9e, 0x9e, - 0x38, 0xc3, 0x4f, 0x9c, 0x71, 0xfa, 0x66, 0xd0, 0x75, 0x6f, 0xad, 0xe9, 0x67, 0xc0, 0xa7, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x38, 0x2c, 0x8b, 0xa1, 0x51, 0x08, 0x00, 0x00, + // 789 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x4f, 0x2b, 0x37, + 0x14, 0xcd, 0xb4, 0x81, 0x12, 0x43, 0x12, 0x18, 0x02, 0x8c, 0xda, 0x34, 0x83, 0x2c, 0xb5, 0x62, + 0x43, 0xa6, 0xb4, 0x5d, 0x65, 0x19, 0x50, 0x0b, 0xa8, 0xf4, 0xc3, 0x50, 0x21, 0x75, 0x33, 0x72, + 0x26, 0x6e, 0x32, 0x8a, 0x67, 0x9c, 0xda, 0xce, 0x17, 0x9b, 0x2e, 0xaa, 0xee, 0xbb, 0xec, 0xa6, + 0x12, 0x3f, 0xa3, 0x3f, 0x81, 0x25, 0xcb, 0xa7, 0xb7, 0x88, 0x9e, 0x60, 0xf3, 0xd6, 0x59, 0xbf, + 0xc5, 0xd3, 0xd8, 0x93, 0x64, 0x02, 0x79, 0x48, 0x11, 0xac, 0x62, 0x9f, 0x7b, 0x73, 0xce, 0xb1, + 0xef, 0xb5, 0xc7, 0xc0, 0xee, 0x04, 0x84, 0x38, 0x94, 0x74, 0x09, 0xc7, 0x0d, 0xe2, 0x74, 0x0f, + 0x26, 0xe3, 0x72, 0x9b, 0x33, 0xc9, 0xcc, 0xf5, 0x28, 0xa1, 0x3c, 0x01, 0xbb, 0x07, 0x9f, 0x16, + 0x1a, 0xac, 0xc1, 0x54, 0xd0, 0x89, 0x46, 0x3a, 0x0f, 0xfe, 0x9f, 0x06, 0x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 0x54, 0x50, 0x81, 0x44, 0x39, 0xce, 0xfd, 0x2b, 0x52, 0x49, 0xff, 0x7b, 0x6d, 0xa7, + 0xe0, 0x3b, 0x00, 0x96, 0x2e, 0x58, 0x8b, 0x84, 0xe6, 0xb7, 0x00, 0xd4, 0xb0, 0x20, 0x6e, 0x9d, + 0x84, 0x2c, 0xb0, 0x0c, 0x65, 0x65, 0x6b, 0x34, 0xb4, 0x37, 0x34, 0xf9, 0x34, 0x06, 0x51, 0x26, + 0x9a, 0x1c, 0x45, 0x63, 0x33, 0x04, 0x39, 0x4e, 0x04, 0xe1, 0xdd, 0x49, 0x25, 0x75, 0x7b, 0x7d, + 0xbf, 0xf0, 0x22, 0xb6, 0xb4, 0xce, 0x2c, 0x1b, 0x44, 0xd9, 0x18, 0x88, 0x77, 0xaf, 0x07, 0x36, + 0x3c, 0x46, 0x29, 0x96, 0x84, 0x63, 0xea, 0xf6, 0x88, 0xdf, 0x68, 0xca, 0xb8, 0x79, 0x4e, 0x17, + 0x96, 0xb4, 0xc6, 0x1d, 0xfd, 0x80, 0x10, 0xa2, 0xf5, 0x29, 0x76, 0xa9, 0x20, 0xf3, 0x2f, 0x03, + 0x6c, 0xcd, 0x3f, 0x4f, 0xba, 0x73, 0x7e, 0x5c, 0x58, 0xbd, 0xa8, 0xd5, 0x3f, 0x70, 0x8c, 0x0a, + 0x74, 0xde, 0xf1, 0x11, 0x60, 0x5d, 0x15, 0xa2, 0xc6, 0x38, 0x67, 0x3d, 0x97, 0x63, 0x39, 0xee, + 0x9a, 0x93, 0x85, 0xf5, 0x77, 0x12, 0x85, 0x4d, 0xf0, 0x41, 0x94, 0x8b, 0xa0, 0xaa, 0x42, 0x10, + 0x96, 0x24, 0x12, 0x6d, 0xf9, 0x61, 0x6b, 0x46, 0x74, 0xf9, 0x79, 0xa2, 0x0f, 0xf9, 0x20, 0xca, + 0x45, 0x50, 0x42, 0xb4, 0x0d, 0xf2, 0x01, 0xee, 0xcf, 0x68, 0x7e, 0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, 0xc4, 0x45, 0x21, 0x9a, 0x98, 0x13, 0x2b, 0xaf, 0x96, 0x6b, 0x27, 0xbe, 0x43, + 0x73, 0xb2, 0xa2, 0xef, 0x10, 0xee, 0x1f, 0x4e, 0xd0, 0xf3, 0x08, 0xac, 0xa4, 0xdf, 0x5e, 0xdb, + 0x46, 0xf5, 0xf4, 0xe6, 0xae, 0x64, 0xdc, 0xde, 0x95, 0x8c, 0x37, 0x77, 0x25, 0xe3, 0x9f, 0xfb, + 0x52, 0xea, 0xf6, 0xbe, 0x94, 0x7a, 0x75, 0x5f, 0x4a, 0xfd, 0xf6, 0x55, 0xa2, 0xde, 0xd1, 0x33, + 0x60, 0x3f, 0x24, 0xb2, 0xc7, 0x78, 0x4b, 0x4d, 0x9c, 0xee, 0xd7, 0x4e, 0x7f, 0xfa, 0x72, 0x50, + 0xd5, 0xaf, 0x2d, 0xab, 0xc7, 0xc0, 0x37, 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x3f, 0x04, + 0x83, 0x57, 0x08, 0x00, 0x00, } func (this *Token) Equal(that interface{}) bool { diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index 81b60bf2e7..7febbebd6c 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -1866,112 +1866,7 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 1667 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcb, 0x6f, 0xdc, 0x54, - 0x17, 0x8f, 0xdb, 0xe6, 0x75, 0x92, 0x7c, 0xa9, 0xee, 0x97, 0x7e, 0x99, 0xfa, 0x4b, 0x27, 0xa9, - 0x69, 0x1e, 0x6d, 0x9a, 0x71, 0x1e, 0x12, 0x12, 0x82, 0x05, 0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21, 0x89, 0x81, 0x8f, 0x24, 0xe4, - 0x53, 0x18, 0xf1, 0xbb, 0x6e, 0xb2, 0x20, 0x30, 0xda, 0x35, 0xae, 0xc8, 0x8b, 0x3d, 0xe5, 0xd0, - 0xbd, 0xc2, 0xdc, 0xcf, 0x10, 0x39, 0xe9, 0xde, 0xef, 0xc5, 0xc9, 0x77, 0x12, 0x4c, 0xc4, 0xfa, - 0x7e, 0xb2, 0xdc, 0xc3, 0x7c, 0xb4, 0x3d, 0x94, 0xcf, 0xf7, 0x27, 0x8c, 0x80, 0x96, 0x18, 0x20, - 0x85, 0xcc, 0x89, 0x01, 0xf1, 0xd6, 0xd0, 0xbb, 0x10, 0xde, 0x41, 0x0a, 0x2f, 0x24, 0xd6, 0x6d, - 0x0b, 0x2f, 0x24, 0xde, 0x4d, 0x67, 0x5d, 0x08, 0xef, 0x2a, 0xc9, 0x37, 0x12, 0x8c, 0x45, 0x7a, - 0x57, 0x72, 0x36, 0xd3, 0x70, 0xec, 0x2c, 0xce, 0xf5, 0x23, 0x8a, 0x40, 0x16, 0x18, 0x90, 0x39, - 0x52, 0x14, 0x01, 0xc1, 0x73, 0xf8, 0x41, 0x82, 0xc9, 0xae, 0x27, 0x23, 0xb2, 0x22, 0xf0, 0x93, - 0xfe, 0x1e, 0x25, 0x97, 0xfa, 0x15, 0x47, 0x68, 0xe7, 0x18, 0xb4, 0x33, 0x44, 0x49, 0x42, 0xeb, - 0x66, 0x57, 0xf2, 0x85, 0x04, 0xa3, 0xc1, 0xd3, 0x11, 0xc9, 0x0e, 0xcc, 0xf0, 0x09, 0x48, 0x5e, - 0xea, 0x2d, 0x88, 0x60, 0xce, 0x30, 0x30, 0x45, 0x32, 0x23, 0x8a, 0x18, 0x4d, 0x6f, 0x1d, 0x90, - 0x8f, 0x61, 0x18, 0xdf, 0x8d, 0x88, 0x30, 0x10, 0x62, 0x8f, 0x50, 0xf2, 0x42, 0x2f, 0xb1, 0xde, - 0x29, 0xc4, 0xaa, 0xa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0x0e, 0x22, 0x55, 0x19, 0xd2, - 0xb3, 0x64, 0x31, 0x85, 0xb2, 0xd2, 0x46, 0x42, 0xf2, 0xb3, 0x04, 0x24, 0x39, 0xa0, 0x91, 0xd5, - 0x3e, 0x9c, 0xc7, 0xa6, 0x3d, 0x79, 0xed, 0x39, 0x34, 0x10, 0xec, 0x0a, 0x03, 0xbb, 0x48, 0xe6, - 0x7b, 0x80, 0x45, 0x4c, 0x1e, 0x7f, 0xc4, 0x46, 0x3b, 0x21, 0x7f, 0xa4, 0x0d, 0x8d, 0x42, 0xfe, - 0x48, 0x9d, 0x16, 0xb3, 0xf8, 0xc3, 0xe7, 0x34, 0x04, 0xf1, 0x13, 0xa3, 0xdd, 0x58, 0x23, 0x9d, - 0x41, 0xbb, 0x69, 0x5d, 0x7a, 0x06, 0xed, 0xa6, 0xf6, 0xe7, 0xca, 0x3a, 0x03, 0x77, 0x9e, 0x9c, - 0x4b, 0xa3, 0x5d, 0x57, 0x37, 0xb4, 0x30, 0x77, 0xd5, 0x8f, 0x58, 0xcb, 0xff, 0xc9, 0xd6, 0x95, - 0x47, 0x4f, 0x8b, 0xd2, 0xe3, 0xa7, 0x45, 0xe9, 0xaf, 0xa7, 0x45, 0xe9, 0xe1, 0xb3, 0xe2, 0xc0, - 0xe3, 0x67, 0xc5, 0x81, 0xdf, 0x9f, 0x15, 0x07, 0xee, 0xac, 0x46, 0xba, 0x7a, 0xcf, 0xde, 0x8a, - 0x49, 0xdd, 0xbb, 0x96, 0xbd, 0xc7, 0x8d, 0x77, 0xd6, 0xd5, 0x7b, 0xa1, 0x07, 0xd6, 0xe3, 0x57, - 0x86, 0xd8, 0x7f, 0x92, 0x6d, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xd1, 0x85, 0xbc, 0xcb, - 0x1b, 0x00, 0x00, + // 1646 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x6f, 0xdc, 0xd4, 0x17, 0x8f, 0xdb, 0x26, 0x4d, 0x4e, 0x92, 0x7f, 0xaa, 0xfb, 0x4f, 0xc9, 0xd4, 0xa4, 0x33, 0x53, 0xd3, 0x34, 0x69, 0xda, 0xd8, 0x79, 0x48, 0x48, 0x08, 0x16, 0x24, 0x2d, 0x15, 0x94, 0x06, 0xd2, From e2c009c0ee889d793e447830266a2d6e27a24445 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:23:55 -0700 Subject: [PATCH 16/17] fix merge --- x/leverage/types/token_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index f965b4fccb..bd0102a888 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -179,8 +179,6 @@ func TestToken_Validate(t *testing.T) { "blacklisted but borrow enabled": { input: invalidBlacklistedBorrow, expectErr: true, - }, - expectErr: true, }, "invalid max collateral share": { input: invalidMaxCollateralShare, From e6dbc1862ff29c94a786b1c6ad7d56a23b4f6e72 Mon Sep 17 00:00:00 2001 From: toteki <63419657+toteki@users.noreply.github.com> Date: Tue, 5 Jul 2022 16:36:43 -0700 Subject: [PATCH 17/17] fix stringer test --- x/leverage/types/token_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/x/leverage/types/token_test.go b/x/leverage/types/token_test.go index bd0102a888..1d6055c320 100644 --- a/x/leverage/types/token_test.go +++ b/x/leverage/types/token_test.go @@ -36,6 +36,7 @@ func TestUpdateRegistryProposal_String(t *testing.T) { EnableMsgSupply: true, EnableMsgBorrow: true, Blacklist: false, + MaxCollateralShare: 10, }, }, } @@ -56,6 +57,7 @@ registry: enable_msg_supply: true enable_msg_borrow: true blacklist: false + max_collateral_share: 10 ` require.Equal(t, expected, p.String()) } @@ -74,7 +76,7 @@ func TestToken_Validate(t *testing.T) { MaxBorrowRate: sdk.MustNewDecFromStr("1.0"), KinkUtilization: sdk.MustNewDecFromStr("0.75"), LiquidationIncentive: sdk.MustNewDecFromStr("0.05"), - EnableMsgLend: true, + EnableMsgSupply: true, EnableMsgBorrow: true, Blacklist: false, MaxCollateralShare: 0, @@ -171,7 +173,8 @@ func TestToken_Validate(t *testing.T) { }, "invalid liquidation incentive": { input: invalidLiquidationIncentive, - expectErr: true}, + expectErr: true, + }, "blacklisted but supply enabled": { input: invalidBlacklistedSupply, expectErr: true,