diff --git a/swagger/proto-config-gen.json b/swagger/proto-config-gen.json index a658f766ef..eecef5a8da 100644 --- a/swagger/proto-config-gen.json +++ b/swagger/proto-config-gen.json @@ -45,6 +45,14 @@ "Params": "IncentiveParams" } } + }, + { + "url": "./tmp-swagger-gen/umee/metoken/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "MeTokenParams" + } + } } ] } \ No newline at end of file diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index ee71dc9e2e..253cab5b5b 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -2288,6 +2288,102 @@ paths: format: byte tags: - Query + /umee/ugov/v1/inflation_cycle_end: + get: + summary: InflationCycleEnd returns inflation cycle end time + operationId: InflationCycleEnd + responses: + '200': + description: A successful response. + schema: + type: object + properties: + end: + type: string + format: date-time + description: QueryInflationCycleEndResponse response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/ugov/v1/inflation_params: + get: + summary: InflationParams returns params of inflation reduction rates + operationId: InflationParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + max_supply: + description: max_supply is the maximum supply for liquidation. + type: object + properties: + denom: + type: string + amount: + type: string + inflation_cycle: + type: string + description: >- + inflation_cycle duration after which inflation rates are + changed. + inflation_reduction_rate: + type: integer + format: int64 + description: inflation_reduction_rate for every inflation cycle. + description: >- + InflationParams params for changing the inflation min rate and + max rate of mint module params. + description: QueryInflationParamsResponse response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query /umee/ugov/v1/min_gas_price: get: summary: MinGasPrice returns minimum transaction fees. @@ -3446,155 +3542,673 @@ paths: type: string tags: - Query -definitions: - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - cosmos.base.v1beta1.DecCoin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - google.protobuf.Any: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - grpc.gateway.runtime.Error: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - umee.leverage.v1.BadDebt: - type: object - properties: - address: - type: string - denom: - type: string - description: >- - BadDebt is a bad debt instance used in the leverage module's genesis - state. - umee.leverage.v1.DecBalances: - type: object - properties: - collateral: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: >- - Collateral contains all uTokens the account has collateralized. It has - been converted from uTokens to tokens. - borrowed: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: >- - Borrowed contains all tokens the account has borrowed, including - interest owed. - description: DecBalances contains an account's position denoted in symbol denom tokens. - umee.leverage.v1.InspectAccount: - type: object - properties: - address: - type: string - title: Address of a borrower - analysis: - description: USD totals of borrower's collateral, debt, and liquidation threshold. - type: object - properties: - Borrowed: - type: number - format: double - description: Borrowed is account's borrowed value in USD. - Liquidation: - type: number - format: double - description: Liquidation is account's liquidation threshold in USD. - Value: - type: number - format: double - description: Value is account's collateral value in USD. - position: - description: >- - Collateral and borrowed tokens, denoted in human-readable symbol denom - instead of ibc denom. - type: object - properties: - collateral: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + /umee/metoken/v1/index_balances: + get: + summary: >- + IndexBalances queries for Index's balances of a specific or all the + registered indexes. + operationId: IndexBalances + responses: + '200': + description: A successful response. + schema: + type: object + properties: + index_balances: + type: array + items: + type: object + properties: + metoken_supply: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Dec which implements the custom - method + NOTE: The amount field is an Int which implements the + custom method - signatures required by gogoproto. + signatures required by gogoproto. + asset_balances: + type: array + items: + type: object + properties: + denom: + type: string + leveraged: + type: string + reserved: + type: string + fees: + type: string + interest: + type: string + description: >- + AssetBalance tracks how much of a single asset is held + in leverage, reserves, fees and interest account. + description: >- + IndexBalances is the state of an Index, containing its + meToken supply and all underlying asset balances. description: >- - Collateral contains all uTokens the account has collateralized. It + QueryIndexBalanceResponse defines the response structure for the + IndexBalances gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: metoken_denom + in: query + required: false + type: string + tags: + - Query + /umee/metoken/v1/index_price: + get: + summary: >- + IndexPrice queries for Index's price of a specific or all the registered + indexes. + operationId: IndexPrice + responses: + '200': + description: A successful response. + schema: + type: object + properties: + prices: + type: array + items: + type: object + properties: + denom: + type: string + description: meToken denom. + price: + type: string + description: >- + Price in USD of one unit of meToken, expressed in + decimals. + exponent: + type: integer + format: int64 + description: >- + Exponent is the power of ten by which to multiply, in + order to convert + + an amount of the meToken for the exchange operations. + description: Price is used to inform meToken price and exponent. + description: >- + QueryIndexPriceResponse defines the response structure for the + IndexPrice gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: metoken_denom + in: query + required: false + type: string + tags: + - Query + /umee/metoken/v1/indexes: + get: + summary: Indexes queries for a specific or all the registered indexes. + operationId: Indexes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + registry: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + Denom is the denomination of the Index's meToken denom + that will be given to user in exchange of accepted + + assets. + max_supply: + type: string + description: >- + MaxSupply is the maximum amount of Index's meTokens can + be minted. + + A swap that requires to mint more Index's meToken than + this value will result in an error. + + Must be a non negative value. 0 means that there is no + limit. + exponent: + type: integer + format: int64 + description: >- + Exponent is the power of ten by which to multiply, in + order to convert + + an amount of the meToken for the exchange operations. + + Valid value: must be the same as the + oracle.Denom.exponent. + fee: + description: >- + Fee contains fee parameters used for swap and redemption + fee calculations for all underlying + + assets in this index. + type: object + properties: + min_fee: + type: string + description: >- + Min fee is the minimum fee to be charged to the + user. The applied fee will tend to decrease down to + this value, + + when the accepted asset is undersupplied in the + index. It must be less than Balanced and Max fees. + + Valid values: 0-1. + balanced_fee: + type: string + description: >- + Balanced fee is the fee to be charged to the user + when the index is balanced. It must be greater than + min_fee and + + lower than max_fee + + Valid values: 0-1. + max_fee: + type: string + description: >- + Max fee is the maximum fee to be charged to the + user. The applied fee will tend to increase up to + this value, + + when the accepted asset is oversupplied in the + index. It must be greater than Min and Balanced fee. + + Valid values: 0-1. + title: >- + Fee are the parameters used for the calculation of the + fee to be applied for swaps and redemptions and charged + to + + the user. The usage of these parameters is explained + here: + + https://github.com/umee-network/umee/tree/main/x/metoken#dynamic-fee + accepted_assets: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + Denom is the denomination of the underlying asset. + Must be the base + + denom as registered in the Bank module (so IBC + denom for IBC tokens). + reserve_portion: + type: string + description: >- + Reserve portion is the portion of swapped assets + that will be kept in the metoken module as + reserves, + + instead of supplied to the leverage module. It is + also the + + portion that will be taken from metoken module + reserves when a redemption occurs. + + Valid values: 0-1. + target_allocation: + type: string + description: >- + Target allocation is the portion of an accepted + asset the Index is targeting to have. The sum of + + target allocations of every accepted asset in the + Index should be equal to 1. + + Valid values: 0-1. + title: >- + AcceptedAsset is an asset that is accepted to + participate in the Index's swaps and redemptions, + along with its + + metadata and parameters + description: >- + Accepted Assets is the list of underlying Tokens that + can be swapped and redeemed for the Index's meToken, + + along with their token-specific parameters. + description: >- + Index defines an index of assets that are allowed to swap + and redeem for the Index's meToken, + + along with its metadata and parameters. + description: >- + QueryIndexesResponse defines the response structure for the + Indexes gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: metoken_denom + in: query + required: false + type: string + tags: + - Query + /umee/metoken/v1/params: + get: + summary: Params queries the parameters of the x/metoken module. + operationId: MeTokenParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + rebalancing_frequency: + type: string + format: int64 + title: >- + Reserves Re-balancing Frequency in seconds, determines how + often the re-balancing of the module reserves will be + + triggered + claiming_frequency: + type: string + format: int64 + title: >- + Interest claiming frequency in seconds, determines how + often metoken module will claim accrued interest from + + leverage module + description: Params defines the parameters for the metoken module. + description: >- + QueryParamsResponse defines the response structure for the Params + gRPC + + service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/metoken/v1/redeem_fee: + get: + summary: RedeemFee computes a fee that would be applied when executing MsgRedeem. + operationId: RedeemFee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + asset: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryRedeemFeeResponse defines the response structure for the + RedeemFee gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: metoken.denom + in: query + required: false + type: string + - name: metoken.amount + in: query + required: false + type: string + - name: asset_denom + in: query + required: false + type: string + tags: + - Query + /umee/metoken/v1/swap_fee: + get: + summary: SwapFee computes fee that would be applied when executing MsgSwap. + operationId: SwapFee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + asset: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QuerySwapFeeResponse defines the response structure for the + SwapFee gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: asset.denom + in: query + required: false + type: string + - name: asset.amount + in: query + required: false + type: string + - name: metoken_denom + in: query + required: false + type: string + tags: + - Query +definitions: + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + google.protobuf.Any: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + grpc.gateway.runtime.Error: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + umee.leverage.v1.BadDebt: + type: object + properties: + address: + type: string + denom: + type: string + description: >- + BadDebt is a bad debt instance used in the leverage module's genesis + state. + umee.leverage.v1.DecBalances: + type: object + properties: + collateral: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: >- + Collateral contains all uTokens the account has collateralized. It has + been converted from uTokens to tokens. + borrowed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: >- + Borrowed contains all tokens the account has borrowed, including + interest owed. + description: DecBalances contains an account's position denoted in symbol denom tokens. + umee.leverage.v1.InspectAccount: + type: object + properties: + address: + type: string + title: Address of a borrower + analysis: + description: USD totals of borrower's collateral, debt, and liquidation threshold. + type: object + properties: + Borrowed: + type: number + format: double + description: Borrowed is account's borrowed value in USD. + Liquidation: + type: number + format: double + description: Liquidation is account's liquidation threshold in USD. + Value: + type: number + format: double + description: Value is account's collateral value in USD. + position: + description: >- + Collateral and borrowed tokens, denoted in human-readable symbol denom + instead of ibc denom. + type: object + properties: + collateral: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + Collateral contains all uTokens the account has collateralized. It has been converted from uTokens to tokens. borrowed: type: array @@ -5285,12 +5899,65 @@ definitions: description: |- QueryParamsResponse defines the response structure for the Params gRPC service handler. + umee.ugov.v1.InflationParams: + type: object + properties: + max_supply: + description: max_supply is the maximum supply for liquidation. + type: object + properties: + denom: + type: string + amount: + type: string + inflation_cycle: + type: string + description: inflation_cycle duration after which inflation rates are changed. + inflation_reduction_rate: + type: integer + format: int64 + description: inflation_reduction_rate for every inflation cycle. + description: >- + InflationParams params for changing the inflation min rate and max rate of + mint module params. umee.ugov.v1.QueryEmergencyGroupResponse: type: object properties: emergency_group: type: string description: QueryEmergencyGroupResponse response type. + umee.ugov.v1.QueryInflationCycleEndResponse: + type: object + properties: + end: + type: string + format: date-time + description: QueryInflationCycleEndResponse response type. + umee.ugov.v1.QueryInflationParamsResponse: + type: object + properties: + params: + type: object + properties: + max_supply: + description: max_supply is the maximum supply for liquidation. + type: object + properties: + denom: + type: string + amount: + type: string + inflation_cycle: + type: string + description: inflation_cycle duration after which inflation rates are changed. + inflation_reduction_rate: + type: integer + format: int64 + description: inflation_reduction_rate for every inflation cycle. + description: >- + InflationParams params for changing the inflation min rate and max + rate of mint module params. + description: QueryInflationParamsResponse response type. umee.ugov.v1.QueryMinGasPriceResponse: type: object properties: @@ -5717,22 +6384,215 @@ definitions: IncentiveProgram defines a liquidity mining incentive program on a single - locked uToken denom that will run for a set amount of time. - description: |- - QueryIncentivePrograResponse defines the response structure for the - IncentiveProgram gRPC service handler. - umee.incentive.v1.QueryLastRewardTimeResponse: + locked uToken denom that will run for a set amount of time. + description: |- + QueryIncentivePrograResponse defines the response structure for the + IncentiveProgram gRPC service handler. + umee.incentive.v1.QueryLastRewardTimeResponse: + type: object + properties: + time: + type: string + format: int64 + description: >- + QueryLastRewardTimeResponse defines the response structure for the + LastRewardTime gRPC + + service handler. + umee.incentive.v1.QueryOngoingIncentiveProgramsResponse: + type: object + properties: + programs: + type: array + items: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. + + It is zero when the program is being proposed by governance, and + is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the incentives + begin. + + If a program is passed after its intended start time, its start + time + + will be increased to the current time, with program duration + unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from start time + to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. Suppliers + who collateralize + + this asset then bond it to the incentive module are eligible for + this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can + happen when + + a program passes if funding from community fund, or any time + before the + + program's start time if funding with MsgSponsor. A program that + reaches + + its start time without being funded is cancelled. + total_rewards: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + remaining_rewards: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryOngoingIncentiveProgramsResponse defines the response structure for + the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service + handlers. + umee.incentive.v1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + max_unbondings: + type: integer + format: int64 + description: >- + max_unbondings is the maximum amount of concurrent unbondings an + address can have + + of each bonded uToken denom. Zero is interpreted as no limit. + unbonding_duration: + type: string + format: int64 + description: unbonding_duration is the unbonding duration (in seconds). + emergency_unbond_fee: + type: string + description: >- + emergency_unbond_fee is the portion of a bond that is paid when it + is instantly + + released using MsgEmergencyUnbond. For example, 0.01 is a 1% fee. + Ranges 0-1. + description: Params defines the parameters for the incentive module. + description: |- + QueryParamsResponse defines the response structure for the Params gRPC + service handler. + umee.incentive.v1.QueryPendingRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryPendingRewardsResponse defines the response structure for the + PendingRewards gRPC service handler. + umee.incentive.v1.QueryTotalBondedResponse: + type: object + properties: + bonded: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryTotalBondedResponse defines the response structure for the + TotalBonded gRPC service handler. + umee.incentive.v1.QueryTotalUnbondingResponse: type: object properties: - time: - type: string - format: int64 - description: >- - QueryLastRewardTimeResponse defines the response structure for the - LastRewardTime gRPC + unbonding: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - service handler. - umee.incentive.v1.QueryOngoingIncentiveProgramsResponse: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryTotalUnbondingResponse defines the response structure for the + TotalUnbonding gRPC service handler. + umee.incentive.v1.QueryUpcomingIncentiveProgramsResponse: type: object properties: programs: @@ -5825,219 +6685,559 @@ definitions: signatures required by gogoproto. description: >- - IncentiveProgram defines a liquidity mining incentive program on a - single - - locked uToken denom that will run for a set amount of time. + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryUpcomingIncentiveProgramsResponse defines the response structure for + the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service + handlers. + umee.incentive.v1.Unbonding: + type: object + properties: + start: + type: string + format: int64 + end: + type: string + format: int64 + uToken: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + Unbonding is a structure that tracks an in-progress token unbonding. + It tracks both its start time and end time, so that if the module's + unbonding time changes, the unbonding can complete at the earlier of + its original end time or its new one based on the new parameter. + umeenetwork.umee.metoken.v1.AcceptedAsset: + type: object + properties: + denom: + type: string + description: |- + Denom is the denomination of the underlying asset. Must be the base + denom as registered in the Bank module (so IBC denom for IBC tokens). + reserve_portion: + type: string + description: >- + Reserve portion is the portion of swapped assets that will be kept in + the metoken module as reserves, + + instead of supplied to the leverage module. It is also the + + portion that will be taken from metoken module reserves when a + redemption occurs. + + Valid values: 0-1. + target_allocation: + type: string + description: >- + Target allocation is the portion of an accepted asset the Index is + targeting to have. The sum of + + target allocations of every accepted asset in the Index should be + equal to 1. + + Valid values: 0-1. + title: >- + AcceptedAsset is an asset that is accepted to participate in the Index's + swaps and redemptions, along with its + + metadata and parameters + umeenetwork.umee.metoken.v1.AssetBalance: + type: object + properties: + denom: + type: string + leveraged: + type: string + reserved: + type: string + fees: + type: string + interest: + type: string + description: >- + AssetBalance tracks how much of a single asset is held in leverage, + reserves, fees and interest account. + umeenetwork.umee.metoken.v1.Fee: + type: object + properties: + min_fee: + type: string + description: >- + Min fee is the minimum fee to be charged to the user. The applied fee + will tend to decrease down to this value, + + when the accepted asset is undersupplied in the index. It must be less + than Balanced and Max fees. + + Valid values: 0-1. + balanced_fee: + type: string + description: >- + Balanced fee is the fee to be charged to the user when the index is + balanced. It must be greater than min_fee and + + lower than max_fee + + Valid values: 0-1. + max_fee: + type: string + description: >- + Max fee is the maximum fee to be charged to the user. The applied fee + will tend to increase up to this value, + + when the accepted asset is oversupplied in the index. It must be + greater than Min and Balanced fee. + + Valid values: 0-1. + title: >- + Fee are the parameters used for the calculation of the fee to be applied + for swaps and redemptions and charged to + + the user. The usage of these parameters is explained here: + + https://github.com/umee-network/umee/tree/main/x/metoken#dynamic-fee + umeenetwork.umee.metoken.v1.Index: + type: object + properties: + denom: + type: string + description: >- + Denom is the denomination of the Index's meToken denom that will be + given to user in exchange of accepted + + assets. + max_supply: + type: string + description: >- + MaxSupply is the maximum amount of Index's meTokens can be minted. + + A swap that requires to mint more Index's meToken than this value will + result in an error. + + Must be a non negative value. 0 means that there is no limit. + exponent: + type: integer + format: int64 + description: |- + Exponent is the power of ten by which to multiply, in order to convert + an amount of the meToken for the exchange operations. + Valid value: must be the same as the oracle.Denom.exponent. + fee: + description: >- + Fee contains fee parameters used for swap and redemption fee + calculations for all underlying + + assets in this index. + type: object + properties: + min_fee: + type: string + description: >- + Min fee is the minimum fee to be charged to the user. The applied + fee will tend to decrease down to this value, + + when the accepted asset is undersupplied in the index. It must be + less than Balanced and Max fees. + + Valid values: 0-1. + balanced_fee: + type: string + description: >- + Balanced fee is the fee to be charged to the user when the index + is balanced. It must be greater than min_fee and + + lower than max_fee + + Valid values: 0-1. + max_fee: + type: string + description: >- + Max fee is the maximum fee to be charged to the user. The applied + fee will tend to increase up to this value, + + when the accepted asset is oversupplied in the index. It must be + greater than Min and Balanced fee. + + Valid values: 0-1. + title: >- + Fee are the parameters used for the calculation of the fee to be + applied for swaps and redemptions and charged to + + the user. The usage of these parameters is explained here: + + https://github.com/umee-network/umee/tree/main/x/metoken#dynamic-fee + accepted_assets: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + Denom is the denomination of the underlying asset. Must be the + base + + denom as registered in the Bank module (so IBC denom for IBC + tokens). + reserve_portion: + type: string + description: >- + Reserve portion is the portion of swapped assets that will be + kept in the metoken module as reserves, + + instead of supplied to the leverage module. It is also the + + portion that will be taken from metoken module reserves when a + redemption occurs. + + Valid values: 0-1. + target_allocation: + type: string + description: >- + Target allocation is the portion of an accepted asset the Index + is targeting to have. The sum of + + target allocations of every accepted asset in the Index should + be equal to 1. + + Valid values: 0-1. + title: >- + AcceptedAsset is an asset that is accepted to participate in the + Index's swaps and redemptions, along with its + + metadata and parameters + description: >- + Accepted Assets is the list of underlying Tokens that can be swapped + and redeemed for the Index's meToken, + + along with their token-specific parameters. + description: >- + Index defines an index of assets that are allowed to swap and redeem for + the Index's meToken, + + along with its metadata and parameters. + umeenetwork.umee.metoken.v1.IndexBalances: + type: object + properties: + metoken_supply: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + asset_balances: + type: array + items: + type: object + properties: + denom: + type: string + leveraged: + type: string + reserved: + type: string + fees: + type: string + interest: + type: string + description: >- + AssetBalance tracks how much of a single asset is held in leverage, + reserves, fees and interest account. + description: >- + IndexBalances is the state of an Index, containing its meToken supply and + all underlying asset balances. + umeenetwork.umee.metoken.v1.Params: + type: object + properties: + rebalancing_frequency: + type: string + format: int64 + title: >- + Reserves Re-balancing Frequency in seconds, determines how often the + re-balancing of the module reserves will be + + triggered + claiming_frequency: + type: string + format: int64 + title: >- + Interest claiming frequency in seconds, determines how often metoken + module will claim accrued interest from + + leverage module + description: Params defines the parameters for the metoken module. + umeenetwork.umee.metoken.v1.Price: + type: object + properties: + denom: + type: string + description: meToken denom. + price: + type: string + description: Price in USD of one unit of meToken, expressed in decimals. + exponent: + type: integer + format: int64 + description: |- + Exponent is the power of ten by which to multiply, in order to convert + an amount of the meToken for the exchange operations. + description: Price is used to inform meToken price and exponent. + umeenetwork.umee.metoken.v1.QueryIndexBalancesResponse: + type: object + properties: + index_balances: + type: array + items: + type: object + properties: + metoken_supply: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + asset_balances: + type: array + items: + type: object + properties: + denom: + type: string + leveraged: + type: string + reserved: + type: string + fees: + type: string + interest: + type: string + description: >- + AssetBalance tracks how much of a single asset is held in + leverage, reserves, fees and interest account. + description: >- + IndexBalances is the state of an Index, containing its meToken + supply and all underlying asset balances. description: >- - QueryOngoingIncentiveProgramsResponse defines the response structure for - the - - OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service - handlers. - umee.incentive.v1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - max_unbondings: - type: integer - format: int64 - description: >- - max_unbondings is the maximum amount of concurrent unbondings an - address can have - - of each bonded uToken denom. Zero is interpreted as no limit. - unbonding_duration: - type: string - format: int64 - description: unbonding_duration is the unbonding duration (in seconds). - emergency_unbond_fee: - type: string - description: >- - emergency_unbond_fee is the portion of a bond that is paid when it - is instantly - - released using MsgEmergencyUnbond. For example, 0.01 is a 1% fee. - Ranges 0-1. - description: Params defines the parameters for the incentive module. - description: |- - QueryParamsResponse defines the response structure for the Params gRPC - service handler. - umee.incentive.v1.QueryPendingRewardsResponse: + QueryIndexBalanceResponse defines the response structure for the + IndexBalances gRPC service handler. + umeenetwork.umee.metoken.v1.QueryIndexPriceResponse: type: object properties: - rewards: + prices: type: array items: type: object properties: denom: type: string - amount: + description: meToken denom. + price: type: string - description: |- - Coin defines a token with a denomination and an amount. + description: Price in USD of one unit of meToken, expressed in decimals. + exponent: + type: integer + format: int64 + description: >- + Exponent is the power of ten by which to multiply, in order to + convert - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + an amount of the meToken for the exchange operations. + description: Price is used to inform meToken price and exponent. description: >- - QueryPendingRewardsResponse defines the response structure for the - PendingRewards gRPC service handler. - umee.incentive.v1.QueryTotalBondedResponse: + QueryIndexPriceResponse defines the response structure for the IndexPrice + gRPC service handler. + umeenetwork.umee.metoken.v1.QueryIndexesResponse: type: object properties: - bonded: + registry: type: array items: type: object properties: denom: type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + description: >- + Denom is the denomination of the Index's meToken denom that will + be given to user in exchange of accepted - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QueryTotalBondedResponse defines the response structure for the - TotalBonded gRPC service handler. - umee.incentive.v1.QueryTotalUnbondingResponse: - type: object - properties: - unbonding: - type: array - items: - type: object - properties: - denom: - type: string - amount: + assets. + max_supply: type: string - description: |- - Coin defines a token with a denomination and an amount. + description: >- + MaxSupply is the maximum amount of Index's meTokens can be + minted. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QueryTotalUnbondingResponse defines the response structure for the - TotalUnbonding gRPC service handler. - umee.incentive.v1.QueryUpcomingIncentiveProgramsResponse: - type: object - properties: - programs: - type: array - items: - type: object - properties: - ID: + A swap that requires to mint more Index's meToken than this + value will result in an error. + + Must be a non negative value. 0 means that there is no limit. + exponent: type: integer format: int64 description: >- - ID uniquely identifies the incentive program after it has been - created. + Exponent is the power of ten by which to multiply, in order to + convert - It is zero when the program is being proposed by governance, and - is set + an amount of the meToken for the exchange operations. - to its final value when the proposal passes. - start_time: - type: string - format: int64 + Valid value: must be the same as the oracle.Denom.exponent. + fee: description: >- - start_time is the unix time (in seconds) at which the incentives - begin. + Fee contains fee parameters used for swap and redemption fee + calculations for all underlying - If a program is passed after its intended start time, its start - time + assets in this index. + type: object + properties: + min_fee: + type: string + description: >- + Min fee is the minimum fee to be charged to the user. The + applied fee will tend to decrease down to this value, - will be increased to the current time, with program duration - unchanged. - duration: - type: string - format: int64 - description: >- - duration is the length of the incentive program from start time - to + when the accepted asset is undersupplied in the index. It + must be less than Balanced and Max fees. - completion in seconds. - uToken: - type: string - description: >- - uToken is the incentivized uToken collateral denom. Suppliers - who collateralize + Valid values: 0-1. + balanced_fee: + type: string + description: >- + Balanced fee is the fee to be charged to the user when the + index is balanced. It must be greater than min_fee and - this asset then bond it to the incentive module are eligible for - this program's + lower than max_fee - rewards. - funded: - type: boolean - description: >- - funded indicates whether a program bas been funded. This can - happen when + Valid values: 0-1. + max_fee: + type: string + description: >- + Max fee is the maximum fee to be charged to the user. The + applied fee will tend to increase up to this value, - a program passes if funding from community fund, or any time - before the + when the accepted asset is oversupplied in the index. It + must be greater than Min and Balanced fee. - program's start time if funding with MsgSponsor. A program that - reaches + Valid values: 0-1. + title: >- + Fee are the parameters used for the calculation of the fee to be + applied for swaps and redemptions and charged to - its start time without being funded is cancelled. - total_rewards: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + the user. The usage of these parameters is explained here: + https://github.com/umee-network/umee/tree/main/x/metoken#dynamic-fee + accepted_assets: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + Denom is the denomination of the underlying asset. Must be + the base - NOTE: The amount field is an Int which implements the custom - method + denom as registered in the Bank module (so IBC denom for + IBC tokens). + reserve_portion: + type: string + description: >- + Reserve portion is the portion of swapped assets that will + be kept in the metoken module as reserves, - signatures required by gogoproto. - remaining_rewards: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + instead of supplied to the leverage module. It is also the + portion that will be taken from metoken module reserves + when a redemption occurs. - NOTE: The amount field is an Int which implements the custom - method + Valid values: 0-1. + target_allocation: + type: string + description: >- + Target allocation is the portion of an accepted asset the + Index is targeting to have. The sum of - signatures required by gogoproto. + target allocations of every accepted asset in the Index + should be equal to 1. + + Valid values: 0-1. + title: >- + AcceptedAsset is an asset that is accepted to participate in + the Index's swaps and redemptions, along with its + + metadata and parameters + description: >- + Accepted Assets is the list of underlying Tokens that can be + swapped and redeemed for the Index's meToken, + + along with their token-specific parameters. description: >- - IncentiveProgram defines a liquidity mining incentive program on a - single + Index defines an index of assets that are allowed to swap and redeem + for the Index's meToken, - locked uToken denom that will run for a set amount of time. + along with its metadata and parameters. description: >- - QueryUpcomingIncentiveProgramsResponse defines the response structure for - the + QueryIndexesResponse defines the response structure for the Indexes gRPC + service handler. + umeenetwork.umee.metoken.v1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + rebalancing_frequency: + type: string + format: int64 + title: >- + Reserves Re-balancing Frequency in seconds, determines how often + the re-balancing of the module reserves will be - OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service - handlers. - umee.incentive.v1.Unbonding: + triggered + claiming_frequency: + type: string + format: int64 + title: >- + Interest claiming frequency in seconds, determines how often + metoken module will claim accrued interest from + + leverage module + description: Params defines the parameters for the metoken module. + description: |- + QueryParamsResponse defines the response structure for the Params gRPC + service handler. + umeenetwork.umee.metoken.v1.QueryRedeemFeeResponse: type: object properties: - start: - type: string - format: int64 - end: - type: string - format: int64 - uToken: + asset: type: object properties: denom: @@ -6049,8 +7249,24 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - description: |- - Unbonding is a structure that tracks an in-progress token unbonding. - It tracks both its start time and end time, so that if the module's - unbonding time changes, the unbonding can complete at the earlier of - its original end time or its new one based on the new parameter. + description: >- + QueryRedeemFeeResponse defines the response structure for the RedeemFee + gRPC service handler. + umeenetwork.umee.metoken.v1.QuerySwapFeeResponse: + type: object + properties: + asset: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QuerySwapFeeResponse defines the response structure for the SwapFee gRPC + service handler.