From 15d9dbee2c850ab243ee2d70224d0424fadf18eb Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Wed, 15 May 2024 17:28:09 +0200 Subject: [PATCH] update metoken params name and docs --- app/upgrades.go | 2 +- proto/umee/metoken/v1/metoken.proto | 7 +- swagger/swagger.yaml | 33 +++--- x/metoken/keeper/intest/msg_server_test.go | 4 +- x/metoken/keeper/swap.go | 2 +- x/metoken/keeper/swap_test.go | 4 +- x/metoken/metoken.pb.go | 115 +++++++++++---------- x/metoken/params.go | 2 +- 8 files changed, 90 insertions(+), 79 deletions(-) diff --git a/app/upgrades.go b/app/upgrades.go index 13f496b810..0964f363ac 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -73,7 +73,7 @@ func (app *UmeeApp) registerUpgrade6_5(upgradeInfo upgradetypes.Plan) { mekeeper := app.MetokenKeeperB.Keeper(&ctx) meparams := mekeeper.GetParams() - meparams.RewardsAuctionFactor = metoken.DefaultParams().RewardsAuctionFactor + meparams.RewardsAuctionFeeFactor = metoken.DefaultParams().RewardsAuctionFeeFactor if err := mekeeper.SetParams(meparams); err != nil { return nil, err } diff --git a/proto/umee/metoken/v1/metoken.proto b/proto/umee/metoken/v1/metoken.proto index e96ebde122..f436ccc30b 100644 --- a/proto/umee/metoken/v1/metoken.proto +++ b/proto/umee/metoken/v1/metoken.proto @@ -19,10 +19,11 @@ message Params { // leverage module int64 claiming_frequency = 2; - // Rewards Auction Factor determines the portion of swap and redeem fee that is sent to the - // auction module for the rewards auction. + // Rewards Auction Fee Factor determines the portion of total fees collected by the metoken + // module that will go for the rewards auction. Note: this is different than x/leverage + // Params.rewards_auction_factor. // Valid values: 0-10000 (in basis points, 2000 = 20%). - uint32 rewards_auction_factor = 3 [ + uint32 rewards_auction_fee_factor = 3 [ (gogoproto.customtype) = "github.com/umee-network/umee/v6/util/bpmath.FixedBP", (gogoproto.nullable) = false ]; diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index f2461760e1..ab0d230611 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -5870,14 +5870,17 @@ paths: often metoken module will claim accrued interest from leverage module - rewards_auction_factor: + rewards_auction_fee_factor: type: integer format: int64 description: >- - Rewards Auction Factor determines the portion of swap and - redeem fee that is sent to the + Rewards Auction Fee Factor determines the portion of total + fees collected by the metoken + + module that will go for the rewards auction. Note: this is + different than x/leverage - auction module for the rewards auction. + Params.rewards_auction_factor. Valid values: 0-10000 (in basis points, 2000 = 20%). description: Params defines the parameters for the metoken module. @@ -10548,14 +10551,17 @@ definitions: module will claim accrued interest from leverage module - rewards_auction_factor: + rewards_auction_fee_factor: type: integer format: int64 description: >- - Rewards Auction Factor determines the portion of swap and redeem fee - that is sent to the + Rewards Auction Fee Factor determines the portion of total fees + collected by the metoken - auction module for the rewards auction. + module that will go for the rewards auction. Note: this is different + than x/leverage + + Params.rewards_auction_factor. Valid values: 0-10000 (in basis points, 2000 = 20%). description: Params defines the parameters for the metoken module. @@ -10895,14 +10901,17 @@ definitions: metoken module will claim accrued interest from leverage module - rewards_auction_factor: + rewards_auction_fee_factor: type: integer format: int64 description: >- - Rewards Auction Factor determines the portion of swap and redeem - fee that is sent to the + Rewards Auction Fee Factor determines the portion of total fees + collected by the metoken + + module that will go for the rewards auction. Note: this is + different than x/leverage - auction module for the rewards auction. + Params.rewards_auction_factor. Valid values: 0-10000 (in basis points, 2000 = 20%). description: Params defines the parameters for the metoken module. diff --git a/x/metoken/keeper/intest/msg_server_test.go b/x/metoken/keeper/intest/msg_server_test.go index 120b1ae804..4ae71e28bc 100644 --- a/x/metoken/keeper/intest/msg_server_test.go +++ b/x/metoken/keeper/intest/msg_server_test.go @@ -896,7 +896,7 @@ func verifySwap( // totalfee = feeRate * amount totalFee := sdk.NewCoin(denom, feeRate.MulInt(tc.asset.Amount).TruncateInt()) - feeToAuction := params.RewardsAuctionFactor.Mul(totalFee.Amount) + feeToAuction := params.RewardsAuctionFeeFactor.Mul(totalFee.Amount) feeToReserve := totalFee.Amount.Sub(feeToAuction) // amount_to_swap = swap_amount - fee @@ -1718,7 +1718,7 @@ func verifyRedeem( // totalfee = feeRate * amount_to_redeem totalFee := sdk.NewCoin(tc.denom, feeRate.MulInt(amountToWithdraw).TruncateInt()) - feeToAuction := params.RewardsAuctionFactor.Mul(totalFee.Amount) + feeToAuction := params.RewardsAuctionFeeFactor.Mul(totalFee.Amount) feeToReserve := totalFee.Amount.Sub(feeToAuction) amountToRedeem := amountToWithdraw.Sub(totalFee.Amount) diff --git a/x/metoken/keeper/swap.go b/x/metoken/keeper/swap.go index 10784efbb7..37bdabc037 100644 --- a/x/metoken/keeper/swap.go +++ b/x/metoken/keeper/swap.go @@ -185,7 +185,7 @@ func (k Keeper) availableToSupply(denom string) (bool, sdkmath.Int, error) { // breakFee calculates the protocol fee for the burn auction and the reminder func (k Keeper) breakFee(fee sdkmath.Int) (sdkmath.Int, sdkmath.Int) { p := k.GetParams() - toAuction := p.RewardsAuctionFactor.Mul(fee) + toAuction := p.RewardsAuctionFeeFactor.Mul(fee) return toAuction, fee.Sub(toAuction) } diff --git a/x/metoken/keeper/swap_test.go b/x/metoken/keeper/swap_test.go index 087ebd3bd3..ada315213d 100644 --- a/x/metoken/keeper/swap_test.go +++ b/x/metoken/keeper/swap_test.go @@ -41,7 +41,7 @@ func TestSwap_Valid(t *testing.T) { usdBal2, n := indexBal2.AssetBalance(tenUSDT.Denom) assert.GreaterOrEqual(n, 0) usdBal1, _ := indexBal1.AssetBalance(tenUSDT.Denom) - toAuction := params.RewardsAuctionFactor.Mul(resp.fee.Amount) + toAuction := params.RewardsAuctionFeeFactor.Mul(resp.fee.Amount) assert.Equal(usdBal2.Fees.Sub(usdBal1.Fees), resp.fee.Amount.Sub(toAuction)) // exchange_rate = coin_price / metoken_price @@ -88,7 +88,7 @@ func TestBreakFees(t *testing.T) { assert := assert.New(t) k := initMeUSDNoopKeper(t) p := k.GetParams() - assert.EqualValues(p.RewardsAuctionFactor, 1000) + assert.EqualValues(p.RewardsAuctionFeeFactor, 1000) amount := sdkmath.NewInt(2_000) toAuction, toRevenue := k.breakFee(amount) diff --git a/x/metoken/metoken.pb.go b/x/metoken/metoken.pb.go index b8daf5a481..9ce34dd16e 100644 --- a/x/metoken/metoken.pb.go +++ b/x/metoken/metoken.pb.go @@ -34,10 +34,11 @@ type Params struct { // Interest claiming frequency in seconds, determines how often metoken module will claim accrued interest from // leverage module ClaimingFrequency int64 `protobuf:"varint,2,opt,name=claiming_frequency,json=claimingFrequency,proto3" json:"claiming_frequency,omitempty"` - // Rewards Auction Factor determines the portion of swap and redeem fee that is sent to the - // auction module for the rewards auction. + // Rewards Auction Fee Factor determines the portion of total fees collected by the metoken + // module that will go for the rewards auction. Note: this is different than x/leverage + // Params.rewards_auction_factor. // Valid values: 0-10000 (in basis points, 2000 = 20%). - RewardsAuctionFactor github_com_umee_network_umee_v6_util_bpmath.FixedBP `protobuf:"varint,3,opt,name=rewards_auction_factor,json=rewardsAuctionFactor,proto3,customtype=github.com/umee-network/umee/v6/util/bpmath.FixedBP" json:"rewards_auction_factor"` + RewardsAuctionFeeFactor github_com_umee_network_umee_v6_util_bpmath.FixedBP `protobuf:"varint,3,opt,name=rewards_auction_fee_factor,json=rewardsAuctionFeeFactor,proto3,customtype=github.com/umee-network/umee/v6/util/bpmath.FixedBP" json:"rewards_auction_fee_factor"` } func (m *Params) Reset() { *m = Params{} } @@ -341,53 +342,53 @@ func init() { func init() { proto.RegisterFile("umee/metoken/v1/metoken.proto", fileDescriptor_dda977db8ad52437) } var fileDescriptor_dda977db8ad52437 = []byte{ - // 721 bytes of a gzipped FileDescriptorProto + // 723 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6b, 0xdb, 0x48, - 0x14, 0xc0, 0xad, 0xc8, 0x76, 0xe2, 0xe7, 0xfc, 0xd9, 0x08, 0x67, 0x31, 0x59, 0xa2, 0x78, 0x73,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, 0xcc, 0x6e, - 0x32, 0x25, 0xff, 0x59, 0x03, 0xbd, 0x8b, 0x68, 0xec, 0xc3, 0x7c, 0x18, 0x44, 0xae, 0x68, 0x47, - 0xca, 0xb7, 0x2d, 0x65, 0xf8, 0xdb, 0xcc, 0xe5, 0xce, 0x64, 0xd5, 0xcf, 0x36, 0xf3, 0x87, 0x36, - 0x3f, 0x8d, 0x91, 0x59, 0x1d, 0xf4, 0x9c, 0x72, 0x18, 0x44, 0x02, 0xf4, 0x14, 0x16, 0xb3, 0x59, - 0x40, 0x5f, 0xd2, 0xe6, 0x72, 0xd1, 0xaa, 0x53, 0xc6, 0xb4, 0x37, 0x92, 0x4a, 0x9a, 0x9e, 0xb3, - 0x37, 0x92, 0x76, 0x11, 0x95, 0xf2, 0xa5, 0x06, 0x4b, 0x77, 0x2e, 0xd0, 0x23, 0xf7, 0xfd, 0x39, - 0xac, 0x24, 0xc8, 0x30, 0x99, 0xa0, 0x1b, 0xd3, 0x44, 0x8c, 0x4d, 0x4e, 0x99, 0x65, 0x85, 0xe9, - 0x65, 0x14, 0xe3, 0x25, 0xac, 0x72, 0x92, 0x0c, 0x90, 0xbb, 0x64, 0x34, 0xa2, 0x1e, 0x91, 0xe8, - 0x7c, 0x66, 0x3f, 0x65, 0xa0, 0xd6, 0x0d, 0x47, 0x39, 0xbe, 0xd1, 0xa0, 0x2a, 0x67, 0xba, 0x97, - 0x04, 0x1e, 0xb2, 0x47, 0x0c, 0x3b, 0x50, 0x8a, 0x45, 0x3c, 0xa7, 0x57, 0x56, 0xfc, 0xcd, 0x09, - 0xff, 0x0b, 0xca, 0x6a, 0x54, 0x8b, 0x72, 0x54, 0x7f, 0x79, 0x38, 0xaa, 0x22, 0x2c, 0xbb, 0x54, - 0x73, 0xaa, 0x0a, 0x94, 0xc8, 0x27, 0x1d, 0xe0, 0x36, 0xc5, 0xd8, 0x00, 0xe8, 0x13, 0x86, 0xee, - 0xac, 0x4c, 0x45, 0xec, 0x74, 0xa4, 0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0x73, 0xe2, 0x99, 0xac, 0xbc, 0x6c, 0x33, 0x6f, + 0x68, 0xf2, 0xe3, 0x08, 0x99, 0xd1, 0x41, 0xd7, 0x2e, 0x07, 0x7e, 0x7a, 0xb2, 0xda, 0x73, 0x58, + 0xcc, 0x5a, 0x02, 0x3d, 0x41, 0x9b, 0xcb, 0x45, 0xab, 0x4e, 0x19, 0xd3, 0xbd, 0x91, 0x44, 0xd0, + 0xd4, 0x9c, 0x7b, 0x23, 0x89, 0x85, 0x28, 0x95, 0xcf, 0x15, 0x58, 0xba, 0x71, 0x40, 0xf7, 0x3c, + 0xf7, 0x97, 0xb0, 0x12, 0x23, 0xc3, 0x78, 0x82, 0x4e, 0x44, 0xe3, 0xb4, 0x73, 0x72, 0xca, 0x2c, + 0x4b, 0x4c, 0x37, 0xa3, 0x68, 0xaf, 0x61, 0x95, 0x93, 0x78, 0x80, 0xdc, 0x21, 0xa3, 0x11, 0x75, + 0x89, 0x40, 0xe7, 0x33, 0xfb, 0x23, 0x03, 0xb5, 0xae, 0x38, 0xd2, 0xf1, 0xbd, 0x02, 0x55, 0xd1, + 0xd3, 0xdd, 0xd8, 0x77, 0x91, 0xdd, 0x63, 0xd8, 0x81, 0x52, 0x94, 0xc6, 0x73, 0x7a, 0x65, 0xc5, + 0x3f, 0xed, 0xf0, 0x07, 0x50, 0x96, 0xad, 0x5a, 0x14, 0xad, 0xfa, 0xd7, 0xdd, 0x56, 0x4d, 0xc3, + 0x62, 0x97, 0xb2, 0x4f, 0x65, 0x81, 0x14, 0xf9, 0xaa, 0x02, 0x5c, 0xa7, 0x68, 0x1b, 0x00, 0x3d, + 0xc2, 0xd0, 0x99, 0x95, 0xa9, 0xa4, 0x33, 0x1d, 0x21, 0xf4, 0x37, 0x2c, 0xb2, 0xe3, 0xa0, 0x47, + 0x47, 0x32, 0x41, 0x78, 0xd9, 0xd5, 0x6c, 0xae, 0x73, 0xd3, 0x59, 0xfd, 0x5d, 0xce, 0xc5, 0x5b, + 0xce, 0x4f, 0xa0, 0xc2, 0x8e, 0x48, 0xe4, 0xc4, 0x84, 0x63, 0xbd, 0x94, 0x6b, 0x95, 0x85, 0x14, + 0x60, 0x13, 0x8e, 0xda, 0x33, 0xa8, 0xc6, 0xe8, 0x21, 0x06, 0x19, 0xae, 0x9c, 0x0b, 0x07, 0x19, + 0x42, 0x00, 0x0f, 0x40, 0xc0, 0xc5, 0xdb, 0x34, 0x9f, 0x8b, 0x36, 0x9f, 0xd6, 0x5b, 0xe2, 0x83, + 0x24, 0xc1, 0x02, 0xb6, 0x90, 0x0b, 0x56, 0xc9, 0x08, 0x57, 0x6f, 0x67, 0x7b, 0xff, 0xe4, 0x5c, + 0x2f, 0x9c, 0x5c, 0xe8, 0xca, 0xe9, 0x85, 0xae, 0x7c, 0xba, 0xd0, 0x95, 0xb7, 0x97, 0x7a, 0xe1, + 0xf4, 0x52, 0x2f, 0x7c, 0xb8, 0xd4, 0x0b, 0xaf, 0xfe, 0xfd, 0xd5, 0xf7, 0x3f, 0x99, 0xfe, 0xf2, + 0x7a, 0x65, 0xf1, 0x33, 0xdb, 0xfb, 0x11, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xff, 0x31, 0x27, 0x14, + 0x07, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -415,7 +416,7 @@ func (this *Params) Equal(that interface{}) bool { if this.ClaimingFrequency != that1.ClaimingFrequency { return false } - if !this.RewardsAuctionFactor.Equal(that1.RewardsAuctionFactor) { + if !this.RewardsAuctionFeeFactor.Equal(that1.RewardsAuctionFeeFactor) { return false } return true @@ -624,8 +625,8 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.RewardsAuctionFactor != 0 { - i = encodeVarintMetoken(dAtA, i, uint64(m.RewardsAuctionFactor)) + if m.RewardsAuctionFeeFactor != 0 { + i = encodeVarintMetoken(dAtA, i, uint64(m.RewardsAuctionFeeFactor)) i-- dAtA[i] = 0x18 } @@ -988,8 +989,8 @@ func (m *Params) Size() (n int) { if m.ClaimingFrequency != 0 { n += 1 + sovMetoken(uint64(m.ClaimingFrequency)) } - if m.RewardsAuctionFactor != 0 { - n += 1 + sovMetoken(uint64(m.RewardsAuctionFactor)) + if m.RewardsAuctionFeeFactor != 0 { + n += 1 + sovMetoken(uint64(m.RewardsAuctionFeeFactor)) } return n } @@ -1181,9 +1182,9 @@ func (m *Params) Unmarshal(dAtA []byte) error { } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardsAuctionFactor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RewardsAuctionFeeFactor", wireType) } - m.RewardsAuctionFactor = 0 + m.RewardsAuctionFeeFactor = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMetoken @@ -1193,7 +1194,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RewardsAuctionFactor |= github_com_umee_network_umee_v6_util_bpmath.FixedBP(b&0x7F) << shift + m.RewardsAuctionFeeFactor |= github_com_umee_network_umee_v6_util_bpmath.FixedBP(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/metoken/params.go b/x/metoken/params.go index 87ebcb4c2f..1e55a62b24 100644 --- a/x/metoken/params.go +++ b/x/metoken/params.go @@ -5,6 +5,6 @@ func DefaultParams() Params { return Params{ RebalancingFrequency: 60 * 60 * 12, // 12h ClaimingFrequency: 60 * 60 * 24 * 7, // 7d - RewardsAuctionFactor: 2000, // 20% of fees goes to rewards auction + RewardsAuctionFeeFactor: 2000, // 20% of fees goes to rewards auction } }