diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 232354387..ff9288ef6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,4 +17,4 @@ jobs: run: go build -v ./... - name: Test - run: go test -v `go list ./... | grep -v -E 'deprecated/|x/derivatives/|x/ecosystemincentive/|x/nftbackedloan/|x/nftfactory/|x/pricefeed/|x/yieldaggregator/'` + run: go test -v `go list ./... | grep -v -E 'deprecated/|x/ecosystemincentive/|x/nftbackedloan/|x/nftfactory/|x/derivatives/'` diff --git a/app/app.go b/app/app.go index 79902b39b..4b4d9439e 100644 --- a/app/app.go +++ b/app/app.go @@ -153,11 +153,13 @@ import ( // "github.com/UnUniFi/chain/x/nftfactory" // nftmintkeeper "github.com/UnUniFi/chain/x/nftfactory/keeper" // nftminttypes "github.com/UnUniFi/chain/x/nftfactory/types" - // "github.com/UnUniFi/chain/x/derivatives" - // derivativeskeeper "github.com/UnUniFi/chain/x/derivatives/keeper" - // derivativestypes "github.com/UnUniFi/chain/x/derivatives/types" - // "github.com/UnUniFi/chain/x/pricefeed" - // pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" + "github.com/UnUniFi/chain/x/derivatives" + derivativeskeeper "github.com/UnUniFi/chain/x/derivatives/keeper" + derivativestypes "github.com/UnUniFi/chain/x/derivatives/types" + "github.com/UnUniFi/chain/x/pricefeed" + pricefeedkeeper "github.com/UnUniFi/chain/x/pricefeed/keeper" + pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" + // ecosystemincentive "github.com/UnUniFi/chain/x/ecosystemincentive" // ecosystemincentivetypes "github.com/UnUniFi/chain/x/ecosystemincentive/types" @@ -253,8 +255,8 @@ var ( records.AppModuleBasic{}, icacallbacks.AppModuleBasic{}, - // pricefeed.AppModuleBasic{}, - // derivatives.AppModuleBasic{}, + pricefeed.AppModuleBasic{}, + derivatives.AppModuleBasic{}, // ecosystemincentive.AppModuleBasic{}, ) @@ -282,9 +284,9 @@ var ( stakeibctypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, interchainquerytypes.ModuleName: nil, - // derivativestypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - // derivativestypes.DerivativeFeeCollector: nil, - // derivativestypes.MarginManager: nil, + derivativestypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + derivativestypes.DerivativeFeeCollector: nil, + derivativestypes.MarginManager: nil, // ecosystemincentivetypes.ModuleName: nil, } @@ -374,8 +376,8 @@ type App struct { ScopedIcacallbacksKeeper capabilitykeeper.ScopedKeeper IcacallbacksKeeper icacallbackskeeper.Keeper - // DerivativesKeeper derivativeskeeper.Keeper - // PricefeedKeeper pricefeedkeeper.Keeper + DerivativesKeeper derivativeskeeper.Keeper + PricefeedKeeper pricefeedkeeper.Keeper // EcosystemincentiveKeeper ecosystemincentivekeeper.Keeper @@ -440,8 +442,8 @@ func NewApp( recordstypes.StoreKey, icacallbackstypes.StoreKey, - // derivativestypes.StoreKey, - // pricefeedtypes.StoreKey, + derivativestypes.StoreKey, + pricefeedtypes.StoreKey, // ecosystemincentivetypes.StoreKey, ) @@ -809,23 +811,22 @@ func NewApp( app.StakeibcKeeper.Hooks(), ), ) + app.PricefeedKeeper = pricefeedkeeper.NewKeeper( + appCodec, + keys[pricefeedtypes.StoreKey], + keys[pricefeedtypes.MemStoreKey], + app.GetSubspace(pricefeedtypes.ModuleName), + app.BankKeeper, + ) - // app.DerivativesKeeper = derivativeskeeper.NewKeeper( - // appCodec, - // keys[derivativestypes.StoreKey], - // keys[derivativestypes.MemStoreKey], - // app.GetSubspace(derivativestypes.ModuleName), - // app.BankKeeper, - // app.PricefeedKeeper, - // ) - - // app.PricefeedKeeper = pricefeedkeeper.NewKeeper( - // appCodec, - // keys[pricefeedtypes.StoreKey], - // keys[pricefeedtypes.MemStoreKey], - // app.GetSubspace(pricefeedtypes.ModuleName), - // app.BankKeeper, - // ) + app.DerivativesKeeper = derivativeskeeper.NewKeeper( + appCodec, + keys[derivativestypes.StoreKey], + keys[derivativestypes.MemStoreKey], + app.GetSubspace(derivativestypes.ModuleName), + app.BankKeeper, + app.PricefeedKeeper, + ) // app.EcosystemincentiveKeeper = ecosystemincentivekeeper.NewKeeper( // appCodec, @@ -954,8 +955,8 @@ func NewApp( records.NewAppModule(appCodec, app.RecordsKeeper, app.AccountKeeper, app.BankKeeper), icacallbacks.NewAppModule(appCodec, app.IcacallbacksKeeper, app.AccountKeeper, app.BankKeeper), - // derivatives.NewAppModule(appCodec, app.DerivativesKeeper, app.BankKeeper), - // pricefeed.NewAppModule(appCodec, app.PricefeedKeeper, app.AccountKeeper), + derivatives.NewAppModule(appCodec, app.DerivativesKeeper, app.BankKeeper), + pricefeed.NewAppModule(appCodec, app.PricefeedKeeper, app.AccountKeeper), // ecosystemincentive.NewAppModule(appCodec, app.EcosystemincentiveKeeper, app.BankKeeper), ) @@ -985,7 +986,7 @@ func NewApp( consensusparamtypes.ModuleName, // original modules // ecosystemincentivetypes.ModuleName, - // pricefeedtypes.ModuleName, + pricefeedtypes.ModuleName, // nftminttypes.ModuleName, // nftmarkettypes.ModuleName, @@ -997,7 +998,7 @@ func NewApp( icacallbackstypes.ModuleName, yieldaggregatortypes.ModuleName, - // derivativestypes.ModuleName, + derivativestypes.ModuleName, // additional non simd modules ibctransfertypes.ModuleName, @@ -1029,7 +1030,7 @@ func NewApp( consensusparamtypes.ModuleName, // original modules // ecosystemincentivetypes.ModuleName, - // pricefeedtypes.ModuleName, + pricefeedtypes.ModuleName, // nftminttypes.ModuleName, // nftmarkettypes.ModuleName, @@ -1040,7 +1041,7 @@ func NewApp( icacallbackstypes.ModuleName, yieldaggregatortypes.ModuleName, - // derivativestypes.ModuleName, + derivativestypes.ModuleName, // additional non simd modules ibctransfertypes.ModuleName, @@ -1079,7 +1080,7 @@ func NewApp( consensusparamtypes.ModuleName, // original modules - // pricefeedtypes.ModuleName, + pricefeedtypes.ModuleName, // nftminttypes.ModuleName, // nftmarkettypes.ModuleName, // ecosystemincentivetypes.ModuleName, @@ -1091,7 +1092,7 @@ func NewApp( icacallbackstypes.ModuleName, yieldaggregatortypes.ModuleName, - // derivativestypes.ModuleName, + derivativestypes.ModuleName, // additional non simd modules ibctransfertypes.ModuleName, @@ -1434,8 +1435,8 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(icacallbackstypes.ModuleName) paramsKeeper.Subspace(yieldaggregatortypes.ModuleName) - // paramsKeeper.Subspace(pricefeedtypes.ModuleName) - // paramsKeeper.Subspace(derivativestypes.ModuleName) + paramsKeeper.Subspace(pricefeedtypes.ModuleName) + paramsKeeper.Subspace(derivativestypes.ModuleName) // paramsKeeper.Subspace(ecosystemincentivetypes.ModuleName) return paramsKeeper @@ -1480,4 +1481,6 @@ func (app *App) setupAppkeeper() { app.AppKeepers.ParamsKeeper = &app.ParamsKeeper app.AppKeepers.WasmKeeper = &app.WasmKeeper app.AppKeepers.YieldaggregatorKeeper = &app.YieldaggregatorKeeper + app.AppKeepers.PricefeedKeeper = &app.PricefeedKeeper + app.AppKeepers.DerivativesKeeper = &app.DerivativesKeeper } diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index b89b99f10..293bb624c 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -13,6 +13,8 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" + derivativeskeeper "github.com/UnUniFi/chain/x/derivatives/keeper" + pricefeedkeeper "github.com/UnUniFi/chain/x/pricefeed/keeper" yieldaggregatorKeeper "github.com/UnUniFi/chain/x/yieldaggregator/keeper" ) @@ -43,4 +45,6 @@ type AppKeepers struct { // ununifi original keepers YieldaggregatorKeeper *yieldaggregatorKeeper.Keeper + PricefeedKeeper *pricefeedkeeper.Keeper + DerivativesKeeper *derivativeskeeper.Keeper } diff --git a/app/test_common.go b/app/test_common.go index 2c81c8ca1..6acd7b814 100644 --- a/app/test_common.go +++ b/app/test_common.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmd/x/wasm" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto" @@ -33,10 +32,11 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" // "github.com/cosmos/cosmos-sdk/x/supply" + pricefeedkeeper "github.com/UnUniFi/chain/x/pricefeed/keeper" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" // authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" // "github.com/cosmos/cosmos-sdk/x/supply" - // "github.com/CosmWasm/wasmd/x/wasm" + "github.com/CosmWasm/wasmd/x/wasm" ) var emptyWasmOpts []wasm.Option = nil @@ -98,7 +98,7 @@ func (tApp TestApp) GetUpgradeKeeper() *upgradekeeper.Keeper { return tApp.Upgr func (tApp TestApp) GetParamsKeeper() paramskeeper.Keeper { return tApp.ParamsKeeper } // func (tApp TestApp) GetVVKeeper() validatorvesting.Keeper { return tApp.vvKeeper } -// func (tApp TestApp) GetPriceFeedKeeper() pricefeedkeeper.Keeper { return tApp.PricefeedKeeper } +func (tApp TestApp) GetPriceFeedKeeper() pricefeedkeeper.Keeper { return tApp.PricefeedKeeper } // func (tApp TestApp) GetHarvestKeeper() harvest.Keeper { return tApp.harvestKeeper } // func (tApp TestApp) GetCommitteeKeeper() committee.Keeper { return tApp.committeeKeeper } diff --git a/docs/client/swagger.yaml b/docs/client/swagger.yaml index 9ba3493e8..3b34effd4 100644 --- a/docs/client/swagger.yaml +++ b/docs/client/swagger.yaml @@ -3004,6 +3004,23 @@ paths: custom method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -3731,6 +3748,23 @@ paths: custom method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -4195,6 +4229,24 @@ paths: the custom method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -8264,6 +8316,20 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -8477,6 +8543,23 @@ definitions: method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -8722,6 +8805,23 @@ definitions: method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -8980,6 +9080,23 @@ definitions: method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time @@ -9505,6 +9622,23 @@ definitions: method signatures required by gogoproto. + levied_amount: + 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. + levied_amount_negative: + type: boolean last_levied_at: type: string format: date-time diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 9e5b49cef..b5ca996da 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -1,765 +1,721 @@ + # Protobuf Documentation + ## Table of Contents - [auction/auction.proto](#auction/auction.proto) - - [BaseAuction](#ununifi.auction.BaseAuction) - - [CollateralAuction](#ununifi.auction.CollateralAuction) - - [DebtAuction](#ununifi.auction.DebtAuction) - - [Params](#ununifi.auction.Params) - - [SurplusAuction](#ununifi.auction.SurplusAuction) - - [WeightedAddress](#ununifi.auction.WeightedAddress) - + - [BaseAuction](#ununifi.auction.BaseAuction) + - [CollateralAuction](#ununifi.auction.CollateralAuction) + - [DebtAuction](#ununifi.auction.DebtAuction) + - [Params](#ununifi.auction.Params) + - [SurplusAuction](#ununifi.auction.SurplusAuction) + - [WeightedAddress](#ununifi.auction.WeightedAddress) - [auction/genesis.proto](#auction/genesis.proto) - - [GenesisState](#ununifi.auction.GenesisState) - + - [GenesisState](#ununifi.auction.GenesisState) - [auction/query.proto](#auction/query.proto) - - [QueryAllAuctionRequest](#ununifi.auction.QueryAllAuctionRequest) - - [QueryAllAuctionResponse](#ununifi.auction.QueryAllAuctionResponse) - - [QueryGetAuctionRequest](#ununifi.auction.QueryGetAuctionRequest) - - [QueryGetAuctionResponse](#ununifi.auction.QueryGetAuctionResponse) - - [QueryParamsRequest](#ununifi.auction.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.auction.QueryParamsResponse) - - - [Query](#ununifi.auction.Query) - + + - [QueryAllAuctionRequest](#ununifi.auction.QueryAllAuctionRequest) + - [QueryAllAuctionResponse](#ununifi.auction.QueryAllAuctionResponse) + - [QueryGetAuctionRequest](#ununifi.auction.QueryGetAuctionRequest) + - [QueryGetAuctionResponse](#ununifi.auction.QueryGetAuctionResponse) + - [QueryParamsRequest](#ununifi.auction.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.auction.QueryParamsResponse) + + - [Query](#ununifi.auction.Query) + - [auction/tx.proto](#auction/tx.proto) - - [MsgPlaceBid](#ununifi.auction.MsgPlaceBid) - - [MsgPlaceBidResponse](#ununifi.auction.MsgPlaceBidResponse) - - - [Msg](#ununifi.auction.Msg) - + + - [MsgPlaceBid](#ununifi.auction.MsgPlaceBid) + - [MsgPlaceBidResponse](#ununifi.auction.MsgPlaceBidResponse) + + - [Msg](#ununifi.auction.Msg) + - [cdp/cdp.proto](#cdp/cdp.proto) - - [AugmentedCdp](#ununifi.cdp.AugmentedCdp) - - [Cdp](#ununifi.cdp.Cdp) - - [CollateralParam](#ununifi.cdp.CollateralParam) - - [DebtParam](#ununifi.cdp.DebtParam) - - [Deposit](#ununifi.cdp.Deposit) - - [Params](#ununifi.cdp.Params) - + - [AugmentedCdp](#ununifi.cdp.AugmentedCdp) + - [Cdp](#ununifi.cdp.Cdp) + - [CollateralParam](#ununifi.cdp.CollateralParam) + - [DebtParam](#ununifi.cdp.DebtParam) + - [Deposit](#ununifi.cdp.Deposit) + - [Params](#ununifi.cdp.Params) - [cdp/genesis.proto](#cdp/genesis.proto) - - [GenesisAccumulationTime](#ununifi.cdp.GenesisAccumulationTime) - - [GenesisState](#ununifi.cdp.GenesisState) - - [GenesisTotalPrincipal](#ununifi.cdp.GenesisTotalPrincipal) - + - [GenesisAccumulationTime](#ununifi.cdp.GenesisAccumulationTime) + - [GenesisState](#ununifi.cdp.GenesisState) + - [GenesisTotalPrincipal](#ununifi.cdp.GenesisTotalPrincipal) - [cdp/query.proto](#cdp/query.proto) - - [QueryAllAccountRequest](#ununifi.cdp.QueryAllAccountRequest) - - [QueryAllAccountResponse](#ununifi.cdp.QueryAllAccountResponse) - - [QueryAllCdpRequest](#ununifi.cdp.QueryAllCdpRequest) - - [QueryAllCdpResponse](#ununifi.cdp.QueryAllCdpResponse) - - [QueryAllDepositRequest](#ununifi.cdp.QueryAllDepositRequest) - - [QueryAllDepositResponse](#ununifi.cdp.QueryAllDepositResponse) - - [QueryGetCdpRequest](#ununifi.cdp.QueryGetCdpRequest) - - [QueryGetCdpResponse](#ununifi.cdp.QueryGetCdpResponse) - - [QueryParamsRequest](#ununifi.cdp.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.cdp.QueryParamsResponse) - - - [Query](#ununifi.cdp.Query) - + + - [QueryAllAccountRequest](#ununifi.cdp.QueryAllAccountRequest) + - [QueryAllAccountResponse](#ununifi.cdp.QueryAllAccountResponse) + - [QueryAllCdpRequest](#ununifi.cdp.QueryAllCdpRequest) + - [QueryAllCdpResponse](#ununifi.cdp.QueryAllCdpResponse) + - [QueryAllDepositRequest](#ununifi.cdp.QueryAllDepositRequest) + - [QueryAllDepositResponse](#ununifi.cdp.QueryAllDepositResponse) + - [QueryGetCdpRequest](#ununifi.cdp.QueryGetCdpRequest) + - [QueryGetCdpResponse](#ununifi.cdp.QueryGetCdpResponse) + - [QueryParamsRequest](#ununifi.cdp.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.cdp.QueryParamsResponse) + + - [Query](#ununifi.cdp.Query) + - [cdp/tx.proto](#cdp/tx.proto) - - [MsgCreateCdp](#ununifi.cdp.MsgCreateCdp) - - [MsgCreateCdpResponse](#ununifi.cdp.MsgCreateCdpResponse) - - [MsgDeposit](#ununifi.cdp.MsgDeposit) - - [MsgDepositResponse](#ununifi.cdp.MsgDepositResponse) - - [MsgDrawDebt](#ununifi.cdp.MsgDrawDebt) - - [MsgDrawDebtResponse](#ununifi.cdp.MsgDrawDebtResponse) - - [MsgLiquidate](#ununifi.cdp.MsgLiquidate) - - [MsgLiquidateResponse](#ununifi.cdp.MsgLiquidateResponse) - - [MsgRepayDebt](#ununifi.cdp.MsgRepayDebt) - - [MsgRepayDebtResponse](#ununifi.cdp.MsgRepayDebtResponse) - - [MsgWithdraw](#ununifi.cdp.MsgWithdraw) - - [MsgWithdrawResponse](#ununifi.cdp.MsgWithdrawResponse) - - - [Msg](#ununifi.cdp.Msg) - + + - [MsgCreateCdp](#ununifi.cdp.MsgCreateCdp) + - [MsgCreateCdpResponse](#ununifi.cdp.MsgCreateCdpResponse) + - [MsgDeposit](#ununifi.cdp.MsgDeposit) + - [MsgDepositResponse](#ununifi.cdp.MsgDepositResponse) + - [MsgDrawDebt](#ununifi.cdp.MsgDrawDebt) + - [MsgDrawDebtResponse](#ununifi.cdp.MsgDrawDebtResponse) + - [MsgLiquidate](#ununifi.cdp.MsgLiquidate) + - [MsgLiquidateResponse](#ununifi.cdp.MsgLiquidateResponse) + - [MsgRepayDebt](#ununifi.cdp.MsgRepayDebt) + - [MsgRepayDebtResponse](#ununifi.cdp.MsgRepayDebtResponse) + - [MsgWithdraw](#ununifi.cdp.MsgWithdraw) + - [MsgWithdrawResponse](#ununifi.cdp.MsgWithdrawResponse) + + - [Msg](#ununifi.cdp.Msg) + - [derivatives/derivatives.proto](#derivatives/derivatives.proto) - - [EventPriceIsNotFeeded](#ununifi.derivatives.EventPriceIsNotFeeded) - - [Market](#ununifi.derivatives.Market) - - [PoolAssetConf](#ununifi.derivatives.PoolAssetConf) - - [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) - - [PoolMarketCap.AssetInfo](#ununifi.derivatives.PoolMarketCap.AssetInfo) - - [PoolParams](#ununifi.derivatives.PoolParams) - - [Position](#ununifi.derivatives.Position) - - [QueriedPosition](#ununifi.derivatives.QueriedPosition) - - - [PositionType](#ununifi.derivatives.PositionType) - + + - [EventPriceIsNotFeeded](#ununifi.derivatives.EventPriceIsNotFeeded) + - [Market](#ununifi.derivatives.Market) + - [PoolAssetConf](#ununifi.derivatives.PoolAssetConf) + - [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) + - [PoolMarketCap.AssetInfo](#ununifi.derivatives.PoolMarketCap.AssetInfo) + - [PoolParams](#ununifi.derivatives.PoolParams) + - [Position](#ununifi.derivatives.Position) + - [QueriedPosition](#ununifi.derivatives.QueriedPosition) + + - [PositionType](#ununifi.derivatives.PositionType) + - [derivatives/perpetual_futures.proto](#derivatives/perpetual_futures.proto) - - [EventLossToLP](#ununifi.derivatives.EventLossToLP) - - [EventPerpetualFuturesPositionClosed](#ununifi.derivatives.EventPerpetualFuturesPositionClosed) - - [EventPerpetualFuturesPositionLevied](#ununifi.derivatives.EventPerpetualFuturesPositionLevied) - - [EventPerpetualFuturesPositionLiquidated](#ununifi.derivatives.EventPerpetualFuturesPositionLiquidated) - - [EventPerpetualFuturesPositionOpened](#ununifi.derivatives.EventPerpetualFuturesPositionOpened) - - [PerpetualFuturesGrossPositionOfMarket](#ununifi.derivatives.PerpetualFuturesGrossPositionOfMarket) - - [PerpetualFuturesParams](#ununifi.derivatives.PerpetualFuturesParams) - - [PerpetualFuturesPosition](#ununifi.derivatives.PerpetualFuturesPosition) - - [PerpetualFuturesPositionInstance](#ununifi.derivatives.PerpetualFuturesPositionInstance) - + - [EventLossToLP](#ununifi.derivatives.EventLossToLP) + - [EventPerpetualFuturesPositionClosed](#ununifi.derivatives.EventPerpetualFuturesPositionClosed) + - [EventPerpetualFuturesPositionLevied](#ununifi.derivatives.EventPerpetualFuturesPositionLevied) + - [EventPerpetualFuturesPositionLiquidated](#ununifi.derivatives.EventPerpetualFuturesPositionLiquidated) + - [EventPerpetualFuturesPositionOpened](#ununifi.derivatives.EventPerpetualFuturesPositionOpened) + - [PerpetualFuturesGrossPositionOfMarket](#ununifi.derivatives.PerpetualFuturesGrossPositionOfMarket) + - [PerpetualFuturesParams](#ununifi.derivatives.PerpetualFuturesParams) + - [PerpetualFuturesPosition](#ununifi.derivatives.PerpetualFuturesPosition) + - [PerpetualFuturesPositionInstance](#ununifi.derivatives.PerpetualFuturesPositionInstance) - [derivatives/perpetual_options.proto](#derivatives/perpetual_options.proto) - - [PerpetualOptionsParams](#ununifi.derivatives.PerpetualOptionsParams) - - [PerpetualOptionsPositionInstance](#ununifi.derivatives.PerpetualOptionsPositionInstance) - - - [OptionType](#ununifi.derivatives.OptionType) - + + - [PerpetualOptionsParams](#ununifi.derivatives.PerpetualOptionsParams) + - [PerpetualOptionsPositionInstance](#ununifi.derivatives.PerpetualOptionsPositionInstance) + + - [OptionType](#ununifi.derivatives.OptionType) + - [derivatives/params.proto](#derivatives/params.proto) - - [Params](#ununifi.derivatives.Params) - + - [Params](#ununifi.derivatives.Params) - [derivatives/genesis.proto](#derivatives/genesis.proto) - - [GenesisState](#ununifi.derivatives.GenesisState) - + - [GenesisState](#ununifi.derivatives.GenesisState) - [derivatives/query.proto](#derivatives/query.proto) - - [QueryAddressPositionsRequest](#ununifi.derivatives.QueryAddressPositionsRequest) - - [QueryAddressPositionsResponse](#ununifi.derivatives.QueryAddressPositionsResponse) - - [QueryAllPositionsRequest](#ununifi.derivatives.QueryAllPositionsRequest) - - [QueryAllPositionsResponse](#ununifi.derivatives.QueryAllPositionsResponse) - - [QueryAvailableAssetInPoolByDenomRequest](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomRequest) - - [QueryAvailableAssetInPoolByDenomResponse](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomResponse) - - [QueryAvailableAssetsInPoolRequest](#ununifi.derivatives.QueryAvailableAssetsInPoolRequest) - - [QueryAvailableAssetsInPoolResponse](#ununifi.derivatives.QueryAvailableAssetsInPoolResponse) - - [QueryDLPTokenRateRequest](#ununifi.derivatives.QueryDLPTokenRateRequest) - - [QueryDLPTokenRateResponse](#ununifi.derivatives.QueryDLPTokenRateResponse) - - [QueryEstimateDLPTokenAmountRequest](#ununifi.derivatives.QueryEstimateDLPTokenAmountRequest) - - [QueryEstimateDLPTokenAmountResponse](#ununifi.derivatives.QueryEstimateDLPTokenAmountResponse) - - [QueryEstimateRedeemAmountRequest](#ununifi.derivatives.QueryEstimateRedeemAmountRequest) - - [QueryEstimateRedeemAmountResponse](#ununifi.derivatives.QueryEstimateRedeemAmountResponse) - - [QueryLiquidityProviderTokenNominalAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYRequest) - - [QueryLiquidityProviderTokenNominalAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYResponse) - - [QueryLiquidityProviderTokenRealAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYRequest) - - [QueryLiquidityProviderTokenRealAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYResponse) - - [QueryParamsRequest](#ununifi.derivatives.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.derivatives.QueryParamsResponse) - - [QueryPerpetualFuturesMarketRequest](#ununifi.derivatives.QueryPerpetualFuturesMarketRequest) - - [QueryPerpetualFuturesMarketResponse](#ununifi.derivatives.QueryPerpetualFuturesMarketResponse) - - [QueryPerpetualFuturesPositionSizeRequest](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeRequest) - - [QueryPerpetualFuturesPositionSizeResponse](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeResponse) - - [QueryPerpetualFuturesRequest](#ununifi.derivatives.QueryPerpetualFuturesRequest) - - [QueryPerpetualFuturesResponse](#ununifi.derivatives.QueryPerpetualFuturesResponse) - - [QueryPerpetualOptionsMarketRequest](#ununifi.derivatives.QueryPerpetualOptionsMarketRequest) - - [QueryPerpetualOptionsMarketResponse](#ununifi.derivatives.QueryPerpetualOptionsMarketResponse) - - [QueryPerpetualOptionsRequest](#ununifi.derivatives.QueryPerpetualOptionsRequest) - - [QueryPerpetualOptionsResponse](#ununifi.derivatives.QueryPerpetualOptionsResponse) - - [QueryPoolRequest](#ununifi.derivatives.QueryPoolRequest) - - [QueryPoolResponse](#ununifi.derivatives.QueryPoolResponse) - - [QueryPositionRequest](#ununifi.derivatives.QueryPositionRequest) - - [QueryPositionResponse](#ununifi.derivatives.QueryPositionResponse) - - - [Query](#ununifi.derivatives.Query) - + + - [QueryAddressPositionsRequest](#ununifi.derivatives.QueryAddressPositionsRequest) + - [QueryAddressPositionsResponse](#ununifi.derivatives.QueryAddressPositionsResponse) + - [QueryAllPositionsRequest](#ununifi.derivatives.QueryAllPositionsRequest) + - [QueryAllPositionsResponse](#ununifi.derivatives.QueryAllPositionsResponse) + - [QueryAvailableAssetInPoolByDenomRequest](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomRequest) + - [QueryAvailableAssetInPoolByDenomResponse](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomResponse) + - [QueryAvailableAssetsInPoolRequest](#ununifi.derivatives.QueryAvailableAssetsInPoolRequest) + - [QueryAvailableAssetsInPoolResponse](#ununifi.derivatives.QueryAvailableAssetsInPoolResponse) + - [QueryDLPTokenRateRequest](#ununifi.derivatives.QueryDLPTokenRateRequest) + - [QueryDLPTokenRateResponse](#ununifi.derivatives.QueryDLPTokenRateResponse) + - [QueryEstimateDLPTokenAmountRequest](#ununifi.derivatives.QueryEstimateDLPTokenAmountRequest) + - [QueryEstimateDLPTokenAmountResponse](#ununifi.derivatives.QueryEstimateDLPTokenAmountResponse) + - [QueryEstimateRedeemAmountRequest](#ununifi.derivatives.QueryEstimateRedeemAmountRequest) + - [QueryEstimateRedeemAmountResponse](#ununifi.derivatives.QueryEstimateRedeemAmountResponse) + - [QueryLiquidityProviderTokenNominalAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYRequest) + - [QueryLiquidityProviderTokenNominalAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYResponse) + - [QueryLiquidityProviderTokenRealAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYRequest) + - [QueryLiquidityProviderTokenRealAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYResponse) + - [QueryParamsRequest](#ununifi.derivatives.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.derivatives.QueryParamsResponse) + - [QueryPerpetualFuturesMarketRequest](#ununifi.derivatives.QueryPerpetualFuturesMarketRequest) + - [QueryPerpetualFuturesMarketResponse](#ununifi.derivatives.QueryPerpetualFuturesMarketResponse) + - [QueryPerpetualFuturesPositionSizeRequest](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeRequest) + - [QueryPerpetualFuturesPositionSizeResponse](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeResponse) + - [QueryPerpetualFuturesRequest](#ununifi.derivatives.QueryPerpetualFuturesRequest) + - [QueryPerpetualFuturesResponse](#ununifi.derivatives.QueryPerpetualFuturesResponse) + - [QueryPerpetualOptionsMarketRequest](#ununifi.derivatives.QueryPerpetualOptionsMarketRequest) + - [QueryPerpetualOptionsMarketResponse](#ununifi.derivatives.QueryPerpetualOptionsMarketResponse) + - [QueryPerpetualOptionsRequest](#ununifi.derivatives.QueryPerpetualOptionsRequest) + - [QueryPerpetualOptionsResponse](#ununifi.derivatives.QueryPerpetualOptionsResponse) + - [QueryPoolRequest](#ununifi.derivatives.QueryPoolRequest) + - [QueryPoolResponse](#ununifi.derivatives.QueryPoolResponse) + - [QueryPositionRequest](#ununifi.derivatives.QueryPositionRequest) + - [QueryPositionResponse](#ununifi.derivatives.QueryPositionResponse) + + - [Query](#ununifi.derivatives.Query) + - [derivatives/tx.proto](#derivatives/tx.proto) - - [MsgClosePosition](#ununifi.derivatives.MsgClosePosition) - - [MsgClosePositionResponse](#ununifi.derivatives.MsgClosePositionResponse) - - [MsgDepositToPool](#ununifi.derivatives.MsgDepositToPool) - - [MsgDepositToPoolResponse](#ununifi.derivatives.MsgDepositToPoolResponse) - - [MsgOpenPosition](#ununifi.derivatives.MsgOpenPosition) - - [MsgOpenPositionResponse](#ununifi.derivatives.MsgOpenPositionResponse) - - [MsgReportLevyPeriod](#ununifi.derivatives.MsgReportLevyPeriod) - - [MsgReportLevyPeriodResponse](#ununifi.derivatives.MsgReportLevyPeriodResponse) - - [MsgReportLiquidation](#ununifi.derivatives.MsgReportLiquidation) - - [MsgReportLiquidationResponse](#ununifi.derivatives.MsgReportLiquidationResponse) - - [MsgWithdrawFromPool](#ununifi.derivatives.MsgWithdrawFromPool) - - [MsgWithdrawFromPoolResponse](#ununifi.derivatives.MsgWithdrawFromPoolResponse) - - - [Msg](#ununifi.derivatives.Msg) - + + - [MsgClosePosition](#ununifi.derivatives.MsgClosePosition) + - [MsgClosePositionResponse](#ununifi.derivatives.MsgClosePositionResponse) + - [MsgDepositToPool](#ununifi.derivatives.MsgDepositToPool) + - [MsgDepositToPoolResponse](#ununifi.derivatives.MsgDepositToPoolResponse) + - [MsgOpenPosition](#ununifi.derivatives.MsgOpenPosition) + - [MsgOpenPositionResponse](#ununifi.derivatives.MsgOpenPositionResponse) + - [MsgReportLevyPeriod](#ununifi.derivatives.MsgReportLevyPeriod) + - [MsgReportLevyPeriodResponse](#ununifi.derivatives.MsgReportLevyPeriodResponse) + - [MsgReportLiquidation](#ununifi.derivatives.MsgReportLiquidation) + - [MsgReportLiquidationResponse](#ununifi.derivatives.MsgReportLiquidationResponse) + - [MsgWithdrawFromPool](#ununifi.derivatives.MsgWithdrawFromPool) + - [MsgWithdrawFromPoolResponse](#ununifi.derivatives.MsgWithdrawFromPoolResponse) + + - [Msg](#ununifi.derivatives.Msg) + - [ecosystem-incentive/ecosystem_incentive.proto](#ecosystem-incentive/ecosystem_incentive.proto) - - [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) - - [IncentiveUnitIdsByAddr](#ununifi.ecosystemincentive.IncentiveUnitIdsByAddr) - - [RewardStore](#ununifi.ecosystemincentive.RewardStore) - - [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) - + - [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) + - [IncentiveUnitIdsByAddr](#ununifi.ecosystemincentive.IncentiveUnitIdsByAddr) + - [RewardStore](#ununifi.ecosystemincentive.RewardStore) + - [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) - [ecosystem-incentive/event.proto](#ecosystem-incentive/event.proto) - - [EventDeletedNftIdRecordedForFrontendReward](#ununifi.ecosystemincentive.EventDeletedNftIdRecordedForFrontendReward) - - [EventFailedParsingMemoInputs](#ununifi.ecosystemincentive.EventFailedParsingMemoInputs) - - [EventNotRecordedNftId](#ununifi.ecosystemincentive.EventNotRecordedNftId) - - [EventNotRegisteredIncentiveUnitId](#ununifi.ecosystemincentive.EventNotRegisteredIncentiveUnitId) - - [EventRecordedIncentiveUnitId](#ununifi.ecosystemincentive.EventRecordedIncentiveUnitId) - - [EventRegister](#ununifi.ecosystemincentive.EventRegister) - - [EventUpdatedReward](#ununifi.ecosystemincentive.EventUpdatedReward) - - [EventVersionUnmatched](#ununifi.ecosystemincentive.EventVersionUnmatched) - - [EventWithdrawAllRewards](#ununifi.ecosystemincentive.EventWithdrawAllRewards) - - [EventWithdrawReward](#ununifi.ecosystemincentive.EventWithdrawReward) - + - [EventDeletedNftIdRecordedForFrontendReward](#ununifi.ecosystemincentive.EventDeletedNftIdRecordedForFrontendReward) + - [EventFailedParsingMemoInputs](#ununifi.ecosystemincentive.EventFailedParsingMemoInputs) + - [EventNotRecordedNftId](#ununifi.ecosystemincentive.EventNotRecordedNftId) + - [EventNotRegisteredIncentiveUnitId](#ununifi.ecosystemincentive.EventNotRegisteredIncentiveUnitId) + - [EventRecordedIncentiveUnitId](#ununifi.ecosystemincentive.EventRecordedIncentiveUnitId) + - [EventRegister](#ununifi.ecosystemincentive.EventRegister) + - [EventUpdatedReward](#ununifi.ecosystemincentive.EventUpdatedReward) + - [EventVersionUnmatched](#ununifi.ecosystemincentive.EventVersionUnmatched) + - [EventWithdrawAllRewards](#ununifi.ecosystemincentive.EventWithdrawAllRewards) + - [EventWithdrawReward](#ununifi.ecosystemincentive.EventWithdrawReward) - [ecosystem-incentive/params.proto](#ecosystem-incentive/params.proto) - - [Params](#ununifi.ecosystemincentive.Params) - - [RewardParams](#ununifi.ecosystemincentive.RewardParams) - - [RewardRate](#ununifi.ecosystemincentive.RewardRate) - - - [RewardType](#ununifi.ecosystemincentive.RewardType) - + + - [Params](#ununifi.ecosystemincentive.Params) + - [RewardParams](#ununifi.ecosystemincentive.RewardParams) + - [RewardRate](#ununifi.ecosystemincentive.RewardRate) + + - [RewardType](#ununifi.ecosystemincentive.RewardType) + - [ecosystem-incentive/genesis.proto](#ecosystem-incentive/genesis.proto) - - [GenesisState](#ununifi.ecosystemincentive.GenesisState) - + - [GenesisState](#ununifi.ecosystemincentive.GenesisState) - [ecosystem-incentive/memo.proto](#ecosystem-incentive/memo.proto) - - [MemoInputs](#ununifi.ecosystemincentive.MemoInputs) - + - [MemoInputs](#ununifi.ecosystemincentive.MemoInputs) - [ecosystem-incentive/query.proto](#ecosystem-incentive/query.proto) - - [QueryAllRewardsRequest](#ununifi.ecosystemincentive.QueryAllRewardsRequest) - - [QueryAllRewardsResponse](#ununifi.ecosystemincentive.QueryAllRewardsResponse) - - [QueryIncentiveUnitIdsByAddrRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrRequest) - - [QueryIncentiveUnitIdsByAddrResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrResponse) - - [QueryIncentiveUnitRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitRequest) - - [QueryIncentiveUnitResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitResponse) - - [QueryParamsRequest](#ununifi.ecosystemincentive.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.ecosystemincentive.QueryParamsResponse) - - [QueryRecordedIncentiveUnitIdRequest](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdRequest) - - [QueryRecordedIncentiveUnitIdResponse](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdResponse) - - [QueryRewardRequest](#ununifi.ecosystemincentive.QueryRewardRequest) - - [QueryRewardResponse](#ununifi.ecosystemincentive.QueryRewardResponse) - - - [Query](#ununifi.ecosystemincentive.Query) - + + - [QueryAllRewardsRequest](#ununifi.ecosystemincentive.QueryAllRewardsRequest) + - [QueryAllRewardsResponse](#ununifi.ecosystemincentive.QueryAllRewardsResponse) + - [QueryIncentiveUnitIdsByAddrRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrRequest) + - [QueryIncentiveUnitIdsByAddrResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrResponse) + - [QueryIncentiveUnitRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitRequest) + - [QueryIncentiveUnitResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitResponse) + - [QueryParamsRequest](#ununifi.ecosystemincentive.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.ecosystemincentive.QueryParamsResponse) + - [QueryRecordedIncentiveUnitIdRequest](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdRequest) + - [QueryRecordedIncentiveUnitIdResponse](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdResponse) + - [QueryRewardRequest](#ununifi.ecosystemincentive.QueryRewardRequest) + - [QueryRewardResponse](#ununifi.ecosystemincentive.QueryRewardResponse) + + - [Query](#ununifi.ecosystemincentive.Query) + - [ecosystem-incentive/tx.proto](#ecosystem-incentive/tx.proto) - - [MsgRegister](#ununifi.ecosystemincentive.MsgRegister) - - [MsgRegisterResponse](#ununifi.ecosystemincentive.MsgRegisterResponse) - - [MsgWithdrawAllRewards](#ununifi.ecosystemincentive.MsgWithdrawAllRewards) - - [MsgWithdrawAllRewardsResponse](#ununifi.ecosystemincentive.MsgWithdrawAllRewardsResponse) - - [MsgWithdrawReward](#ununifi.ecosystemincentive.MsgWithdrawReward) - - [MsgWithdrawRewardResponse](#ununifi.ecosystemincentive.MsgWithdrawRewardResponse) - - - [Msg](#ununifi.ecosystemincentive.Msg) - + + - [MsgRegister](#ununifi.ecosystemincentive.MsgRegister) + - [MsgRegisterResponse](#ununifi.ecosystemincentive.MsgRegisterResponse) + - [MsgWithdrawAllRewards](#ununifi.ecosystemincentive.MsgWithdrawAllRewards) + - [MsgWithdrawAllRewardsResponse](#ununifi.ecosystemincentive.MsgWithdrawAllRewardsResponse) + - [MsgWithdrawReward](#ununifi.ecosystemincentive.MsgWithdrawReward) + - [MsgWithdrawRewardResponse](#ununifi.ecosystemincentive.MsgWithdrawRewardResponse) + + - [Msg](#ununifi.ecosystemincentive.Msg) + - [ethereum/signdoc.proto](#ethereum/signdoc.proto) - - [SignDocForMetamask](#ununifi.ethereum.SignDocForMetamask) - + - [SignDocForMetamask](#ununifi.ethereum.SignDocForMetamask) - [incentive/incentive.proto](#incentive/incentive.proto) - - [BaseClaim](#ununifi.incentive.BaseClaim) - - [BaseMultiClaim](#ununifi.incentive.BaseMultiClaim) - - [CdpMintingClaim](#ununifi.incentive.CdpMintingClaim) - - [Multiplier](#ununifi.incentive.Multiplier) - - [Params](#ununifi.incentive.Params) - - [RewardIndex](#ununifi.incentive.RewardIndex) - - [RewardPeriod](#ununifi.incentive.RewardPeriod) - + - [BaseClaim](#ununifi.incentive.BaseClaim) + - [BaseMultiClaim](#ununifi.incentive.BaseMultiClaim) + - [CdpMintingClaim](#ununifi.incentive.CdpMintingClaim) + - [Multiplier](#ununifi.incentive.Multiplier) + - [Params](#ununifi.incentive.Params) + - [RewardIndex](#ununifi.incentive.RewardIndex) + - [RewardPeriod](#ununifi.incentive.RewardPeriod) - [incentive/genesis.proto](#incentive/genesis.proto) - - [GenesisAccumulationTime](#ununifi.incentive.GenesisAccumulationTime) - - [GenesisDenoms](#ununifi.incentive.GenesisDenoms) - - [GenesisState](#ununifi.incentive.GenesisState) - + - [GenesisAccumulationTime](#ununifi.incentive.GenesisAccumulationTime) + - [GenesisDenoms](#ununifi.incentive.GenesisDenoms) + - [GenesisState](#ununifi.incentive.GenesisState) - [incentive/query.proto](#incentive/query.proto) - - [QueryParamsRequest](#ununifi.incentive.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.incentive.QueryParamsResponse) - - - [Query](#ununifi.incentive.Query) - + + - [QueryParamsRequest](#ununifi.incentive.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.incentive.QueryParamsResponse) + + - [Query](#ununifi.incentive.Query) + - [incentive/tx.proto](#incentive/tx.proto) - - [MsgClaimCdpMintingReward](#ununifi.incentive.MsgClaimCdpMintingReward) - - [MsgClaimCdpMintingRewardResponse](#ununifi.incentive.MsgClaimCdpMintingRewardResponse) - - - [Msg](#ununifi.incentive.Msg) - + + - [MsgClaimCdpMintingReward](#ununifi.incentive.MsgClaimCdpMintingReward) + - [MsgClaimCdpMintingRewardResponse](#ununifi.incentive.MsgClaimCdpMintingRewardResponse) + + - [Msg](#ununifi.incentive.Msg) + - [nftmarket/nftmarket.proto](#nftmarket/nftmarket.proto) - - [BidId](#ununifi.nftmarket.BidId) - - [EventBorrow](#ununifi.nftmarket.EventBorrow) - - [EventCancelBid](#ununifi.nftmarket.EventCancelBid) - - [EventCancelListNfting](#ununifi.nftmarket.EventCancelListNfting) - - [EventEndListNfting](#ununifi.nftmarket.EventEndListNfting) - - [EventExpandListingPeriod](#ununifi.nftmarket.EventExpandListingPeriod) - - [EventLiquidate](#ununifi.nftmarket.EventLiquidate) - - [EventListNft](#ununifi.nftmarket.EventListNft) - - [EventPayFullBid](#ununifi.nftmarket.EventPayFullBid) - - [EventPlaceBid](#ununifi.nftmarket.EventPlaceBid) - - [EventRepay](#ununifi.nftmarket.EventRepay) - - [EventSellingDecision](#ununifi.nftmarket.EventSellingDecision) - - [Liquidation](#ununifi.nftmarket.Liquidation) - - [Liquidations](#ununifi.nftmarket.Liquidations) - - [ListedClass](#ununifi.nftmarket.ListedClass) - - [Loan](#ununifi.nftmarket.Loan) - - [NftBid](#ununifi.nftmarket.NftBid) - - [NftIdentifier](#ununifi.nftmarket.NftIdentifier) - - [NftInfo](#ununifi.nftmarket.NftInfo) - - [NftListing](#ununifi.nftmarket.NftListing) - - [Params](#ununifi.nftmarket.Params) - - [PaymentStatus](#ununifi.nftmarket.PaymentStatus) - - [borrowing](#ununifi.nftmarket.borrowing) - - - [ListingState](#ununifi.nftmarket.ListingState) - - [ListingType](#ununifi.nftmarket.ListingType) - + + - [BidId](#ununifi.nftmarket.BidId) + - [EventBorrow](#ununifi.nftmarket.EventBorrow) + - [EventCancelBid](#ununifi.nftmarket.EventCancelBid) + - [EventCancelListNfting](#ununifi.nftmarket.EventCancelListNfting) + - [EventEndListNfting](#ununifi.nftmarket.EventEndListNfting) + - [EventExpandListingPeriod](#ununifi.nftmarket.EventExpandListingPeriod) + - [EventLiquidate](#ununifi.nftmarket.EventLiquidate) + - [EventListNft](#ununifi.nftmarket.EventListNft) + - [EventPayFullBid](#ununifi.nftmarket.EventPayFullBid) + - [EventPlaceBid](#ununifi.nftmarket.EventPlaceBid) + - [EventRepay](#ununifi.nftmarket.EventRepay) + - [EventSellingDecision](#ununifi.nftmarket.EventSellingDecision) + - [Liquidation](#ununifi.nftmarket.Liquidation) + - [Liquidations](#ununifi.nftmarket.Liquidations) + - [ListedClass](#ununifi.nftmarket.ListedClass) + - [Loan](#ununifi.nftmarket.Loan) + - [NftBid](#ununifi.nftmarket.NftBid) + - [NftIdentifier](#ununifi.nftmarket.NftIdentifier) + - [NftInfo](#ununifi.nftmarket.NftInfo) + - [NftListing](#ununifi.nftmarket.NftListing) + - [Params](#ununifi.nftmarket.Params) + - [PaymentStatus](#ununifi.nftmarket.PaymentStatus) + - [borrowing](#ununifi.nftmarket.borrowing) + + - [ListingState](#ununifi.nftmarket.ListingState) + - [ListingType](#ununifi.nftmarket.ListingType) + - [nftmarket/genesis.proto](#nftmarket/genesis.proto) - - [GenesisState](#ununifi.nftmarket.GenesisState) - + - [GenesisState](#ununifi.nftmarket.GenesisState) - [nftmarket/query.proto](#nftmarket/query.proto) - - [NftListingDetail](#ununifi.nftmarket.NftListingDetail) - - [QueryBidderBidsRequest](#ununifi.nftmarket.QueryBidderBidsRequest) - - [QueryBidderBidsResponse](#ununifi.nftmarket.QueryBidderBidsResponse) - - [QueryCDPsListRequest](#ununifi.nftmarket.QueryCDPsListRequest) - - [QueryCDPsListResponse](#ununifi.nftmarket.QueryCDPsListResponse) - - [QueryLiquidationRequest](#ununifi.nftmarket.QueryLiquidationRequest) - - [QueryLiquidationResponse](#ununifi.nftmarket.QueryLiquidationResponse) - - [QueryListedClassRequest](#ununifi.nftmarket.QueryListedClassRequest) - - [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) - - [QueryListedClassesRequest](#ununifi.nftmarket.QueryListedClassesRequest) - - [QueryListedClassesResponse](#ununifi.nftmarket.QueryListedClassesResponse) - - [QueryListedNftsRequest](#ununifi.nftmarket.QueryListedNftsRequest) - - [QueryListedNftsResponse](#ununifi.nftmarket.QueryListedNftsResponse) - - [QueryLoanRequest](#ununifi.nftmarket.QueryLoanRequest) - - [QueryLoanResponse](#ununifi.nftmarket.QueryLoanResponse) - - [QueryLoansRequest](#ununifi.nftmarket.QueryLoansRequest) - - [QueryLoansResponse](#ununifi.nftmarket.QueryLoansResponse) - - [QueryNftBidsRequest](#ununifi.nftmarket.QueryNftBidsRequest) - - [QueryNftBidsResponse](#ununifi.nftmarket.QueryNftBidsResponse) - - [QueryNftListingRequest](#ununifi.nftmarket.QueryNftListingRequest) - - [QueryNftListingResponse](#ununifi.nftmarket.QueryNftListingResponse) - - [QueryParamsRequest](#ununifi.nftmarket.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.nftmarket.QueryParamsResponse) - - [QueryPaymentStatusRequest](#ununifi.nftmarket.QueryPaymentStatusRequest) - - [QueryPaymentStatusResponse](#ununifi.nftmarket.QueryPaymentStatusResponse) - - [QueryRewardsRequest](#ununifi.nftmarket.QueryRewardsRequest) - - [QueryRewardsResponse](#ununifi.nftmarket.QueryRewardsResponse) - - - [Query](#ununifi.nftmarket.Query) - + + - [NftListingDetail](#ununifi.nftmarket.NftListingDetail) + - [QueryBidderBidsRequest](#ununifi.nftmarket.QueryBidderBidsRequest) + - [QueryBidderBidsResponse](#ununifi.nftmarket.QueryBidderBidsResponse) + - [QueryCDPsListRequest](#ununifi.nftmarket.QueryCDPsListRequest) + - [QueryCDPsListResponse](#ununifi.nftmarket.QueryCDPsListResponse) + - [QueryLiquidationRequest](#ununifi.nftmarket.QueryLiquidationRequest) + - [QueryLiquidationResponse](#ununifi.nftmarket.QueryLiquidationResponse) + - [QueryListedClassRequest](#ununifi.nftmarket.QueryListedClassRequest) + - [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) + - [QueryListedClassesRequest](#ununifi.nftmarket.QueryListedClassesRequest) + - [QueryListedClassesResponse](#ununifi.nftmarket.QueryListedClassesResponse) + - [QueryListedNftsRequest](#ununifi.nftmarket.QueryListedNftsRequest) + - [QueryListedNftsResponse](#ununifi.nftmarket.QueryListedNftsResponse) + - [QueryLoanRequest](#ununifi.nftmarket.QueryLoanRequest) + - [QueryLoanResponse](#ununifi.nftmarket.QueryLoanResponse) + - [QueryLoansRequest](#ununifi.nftmarket.QueryLoansRequest) + - [QueryLoansResponse](#ununifi.nftmarket.QueryLoansResponse) + - [QueryNftBidsRequest](#ununifi.nftmarket.QueryNftBidsRequest) + - [QueryNftBidsResponse](#ununifi.nftmarket.QueryNftBidsResponse) + - [QueryNftListingRequest](#ununifi.nftmarket.QueryNftListingRequest) + - [QueryNftListingResponse](#ununifi.nftmarket.QueryNftListingResponse) + - [QueryParamsRequest](#ununifi.nftmarket.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.nftmarket.QueryParamsResponse) + - [QueryPaymentStatusRequest](#ununifi.nftmarket.QueryPaymentStatusRequest) + - [QueryPaymentStatusResponse](#ununifi.nftmarket.QueryPaymentStatusResponse) + - [QueryRewardsRequest](#ununifi.nftmarket.QueryRewardsRequest) + - [QueryRewardsResponse](#ununifi.nftmarket.QueryRewardsResponse) + + - [Query](#ununifi.nftmarket.Query) + - [nftmarket/tx.proto](#nftmarket/tx.proto) - - [MsgBorrow](#ununifi.nftmarket.MsgBorrow) - - [MsgBorrowResponse](#ununifi.nftmarket.MsgBorrowResponse) - - [MsgCancelBid](#ununifi.nftmarket.MsgCancelBid) - - [MsgCancelBidResponse](#ununifi.nftmarket.MsgCancelBidResponse) - - [MsgCancelNftListing](#ununifi.nftmarket.MsgCancelNftListing) - - [MsgCancelNftListingResponse](#ununifi.nftmarket.MsgCancelNftListingResponse) - - [MsgEndNftListing](#ununifi.nftmarket.MsgEndNftListing) - - [MsgEndNftListingResponse](#ununifi.nftmarket.MsgEndNftListingResponse) - - [MsgListNft](#ununifi.nftmarket.MsgListNft) - - [MsgListNftResponse](#ununifi.nftmarket.MsgListNftResponse) - - [MsgMintNft](#ununifi.nftmarket.MsgMintNft) - - [MsgMintNftResponse](#ununifi.nftmarket.MsgMintNftResponse) - - [MsgPayFullBid](#ununifi.nftmarket.MsgPayFullBid) - - [MsgPayFullBidResponse](#ununifi.nftmarket.MsgPayFullBidResponse) - - [MsgPlaceBid](#ununifi.nftmarket.MsgPlaceBid) - - [MsgPlaceBidResponse](#ununifi.nftmarket.MsgPlaceBidResponse) - - [MsgRepay](#ununifi.nftmarket.MsgRepay) - - [MsgRepayResponse](#ununifi.nftmarket.MsgRepayResponse) - - [MsgSellingDecision](#ununifi.nftmarket.MsgSellingDecision) - - [MsgSellingDecisionResponse](#ununifi.nftmarket.MsgSellingDecisionResponse) - - - [Msg](#ununifi.nftmarket.Msg) - + + - [MsgBorrow](#ununifi.nftmarket.MsgBorrow) + - [MsgBorrowResponse](#ununifi.nftmarket.MsgBorrowResponse) + - [MsgCancelBid](#ununifi.nftmarket.MsgCancelBid) + - [MsgCancelBidResponse](#ununifi.nftmarket.MsgCancelBidResponse) + - [MsgCancelNftListing](#ununifi.nftmarket.MsgCancelNftListing) + - [MsgCancelNftListingResponse](#ununifi.nftmarket.MsgCancelNftListingResponse) + - [MsgEndNftListing](#ununifi.nftmarket.MsgEndNftListing) + - [MsgEndNftListingResponse](#ununifi.nftmarket.MsgEndNftListingResponse) + - [MsgListNft](#ununifi.nftmarket.MsgListNft) + - [MsgListNftResponse](#ununifi.nftmarket.MsgListNftResponse) + - [MsgMintNft](#ununifi.nftmarket.MsgMintNft) + - [MsgMintNftResponse](#ununifi.nftmarket.MsgMintNftResponse) + - [MsgPayFullBid](#ununifi.nftmarket.MsgPayFullBid) + - [MsgPayFullBidResponse](#ununifi.nftmarket.MsgPayFullBidResponse) + - [MsgPlaceBid](#ununifi.nftmarket.MsgPlaceBid) + - [MsgPlaceBidResponse](#ununifi.nftmarket.MsgPlaceBidResponse) + - [MsgRepay](#ununifi.nftmarket.MsgRepay) + - [MsgRepayResponse](#ununifi.nftmarket.MsgRepayResponse) + - [MsgSellingDecision](#ununifi.nftmarket.MsgSellingDecision) + - [MsgSellingDecisionResponse](#ununifi.nftmarket.MsgSellingDecisionResponse) + + - [Msg](#ununifi.nftmarket.Msg) + - [nftmarketv1/nftmarket.proto](#nftmarketv1/nftmarket.proto) - - [EventBorrow](#ununifi.nftmarketv1.EventBorrow) - - [EventCancelBid](#ununifi.nftmarketv1.EventCancelBid) - - [EventCancelListNfting](#ununifi.nftmarketv1.EventCancelListNfting) - - [EventEndListNfting](#ununifi.nftmarketv1.EventEndListNfting) - - [EventExpandListingPeriod](#ununifi.nftmarketv1.EventExpandListingPeriod) - - [EventLiquidate](#ununifi.nftmarketv1.EventLiquidate) - - [EventListNft](#ununifi.nftmarketv1.EventListNft) - - [EventPayFullBid](#ununifi.nftmarketv1.EventPayFullBid) - - [EventPlaceBid](#ununifi.nftmarketv1.EventPlaceBid) - - [EventRepay](#ununifi.nftmarketv1.EventRepay) - - [EventSellingDecision](#ununifi.nftmarketv1.EventSellingDecision) - - [ListedClass](#ununifi.nftmarketv1.ListedClass) - - [ListedNft](#ununifi.nftmarketv1.ListedNft) - - [Loan](#ununifi.nftmarketv1.Loan) - - [NftBid](#ununifi.nftmarketv1.NftBid) - - [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) - - [NftListing](#ununifi.nftmarketv1.NftListing) - - [Params](#ununifi.nftmarketv1.Params) - - [PaymentStatus](#ununifi.nftmarketv1.PaymentStatus) - - - [ListingState](#ununifi.nftmarketv1.ListingState) - - [ListingType](#ununifi.nftmarketv1.ListingType) - + + - [EventBorrow](#ununifi.nftmarketv1.EventBorrow) + - [EventCancelBid](#ununifi.nftmarketv1.EventCancelBid) + - [EventCancelListNfting](#ununifi.nftmarketv1.EventCancelListNfting) + - [EventEndListNfting](#ununifi.nftmarketv1.EventEndListNfting) + - [EventExpandListingPeriod](#ununifi.nftmarketv1.EventExpandListingPeriod) + - [EventLiquidate](#ununifi.nftmarketv1.EventLiquidate) + - [EventListNft](#ununifi.nftmarketv1.EventListNft) + - [EventPayFullBid](#ununifi.nftmarketv1.EventPayFullBid) + - [EventPlaceBid](#ununifi.nftmarketv1.EventPlaceBid) + - [EventRepay](#ununifi.nftmarketv1.EventRepay) + - [EventSellingDecision](#ununifi.nftmarketv1.EventSellingDecision) + - [ListedClass](#ununifi.nftmarketv1.ListedClass) + - [ListedNft](#ununifi.nftmarketv1.ListedNft) + - [Loan](#ununifi.nftmarketv1.Loan) + - [NftBid](#ununifi.nftmarketv1.NftBid) + - [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) + - [NftListing](#ununifi.nftmarketv1.NftListing) + - [Params](#ununifi.nftmarketv1.Params) + - [PaymentStatus](#ununifi.nftmarketv1.PaymentStatus) + + - [ListingState](#ununifi.nftmarketv1.ListingState) + - [ListingType](#ununifi.nftmarketv1.ListingType) + - [nftmarketv1/genesis.proto](#nftmarketv1/genesis.proto) - - [GenesisState](#ununifi.nftmarketv1.GenesisState) - + - [GenesisState](#ununifi.nftmarketv1.GenesisState) - [nftmarketv1/query.proto](#nftmarketv1/query.proto) - - [QueryBidderBidsRequest](#ununifi.nftmarketv1.QueryBidderBidsRequest) - - [QueryBidderBidsResponse](#ununifi.nftmarketv1.QueryBidderBidsResponse) - - [QueryCDPsListRequest](#ununifi.nftmarketv1.QueryCDPsListRequest) - - [QueryCDPsListResponse](#ununifi.nftmarketv1.QueryCDPsListResponse) - - [QueryListedClassRequest](#ununifi.nftmarketv1.QueryListedClassRequest) - - [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) - - [QueryListedClassesRequest](#ununifi.nftmarketv1.QueryListedClassesRequest) - - [QueryListedClassesResponse](#ununifi.nftmarketv1.QueryListedClassesResponse) - - [QueryListedNftsRequest](#ununifi.nftmarketv1.QueryListedNftsRequest) - - [QueryListedNftsResponse](#ununifi.nftmarketv1.QueryListedNftsResponse) - - [QueryLoanRequest](#ununifi.nftmarketv1.QueryLoanRequest) - - [QueryLoanResponse](#ununifi.nftmarketv1.QueryLoanResponse) - - [QueryLoansRequest](#ununifi.nftmarketv1.QueryLoansRequest) - - [QueryLoansResponse](#ununifi.nftmarketv1.QueryLoansResponse) - - [QueryNftBidsRequest](#ununifi.nftmarketv1.QueryNftBidsRequest) - - [QueryNftBidsResponse](#ununifi.nftmarketv1.QueryNftBidsResponse) - - [QueryNftListingRequest](#ununifi.nftmarketv1.QueryNftListingRequest) - - [QueryNftListingResponse](#ununifi.nftmarketv1.QueryNftListingResponse) - - [QueryParamsRequest](#ununifi.nftmarketv1.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.nftmarketv1.QueryParamsResponse) - - [QueryPaymentStatusRequest](#ununifi.nftmarketv1.QueryPaymentStatusRequest) - - [QueryPaymentStatusResponse](#ununifi.nftmarketv1.QueryPaymentStatusResponse) - - [QueryRewardsRequest](#ununifi.nftmarketv1.QueryRewardsRequest) - - [QueryRewardsResponse](#ununifi.nftmarketv1.QueryRewardsResponse) - - - [Query](#ununifi.nftmarketv1.Query) - + + - [QueryBidderBidsRequest](#ununifi.nftmarketv1.QueryBidderBidsRequest) + - [QueryBidderBidsResponse](#ununifi.nftmarketv1.QueryBidderBidsResponse) + - [QueryCDPsListRequest](#ununifi.nftmarketv1.QueryCDPsListRequest) + - [QueryCDPsListResponse](#ununifi.nftmarketv1.QueryCDPsListResponse) + - [QueryListedClassRequest](#ununifi.nftmarketv1.QueryListedClassRequest) + - [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) + - [QueryListedClassesRequest](#ununifi.nftmarketv1.QueryListedClassesRequest) + - [QueryListedClassesResponse](#ununifi.nftmarketv1.QueryListedClassesResponse) + - [QueryListedNftsRequest](#ununifi.nftmarketv1.QueryListedNftsRequest) + - [QueryListedNftsResponse](#ununifi.nftmarketv1.QueryListedNftsResponse) + - [QueryLoanRequest](#ununifi.nftmarketv1.QueryLoanRequest) + - [QueryLoanResponse](#ununifi.nftmarketv1.QueryLoanResponse) + - [QueryLoansRequest](#ununifi.nftmarketv1.QueryLoansRequest) + - [QueryLoansResponse](#ununifi.nftmarketv1.QueryLoansResponse) + - [QueryNftBidsRequest](#ununifi.nftmarketv1.QueryNftBidsRequest) + - [QueryNftBidsResponse](#ununifi.nftmarketv1.QueryNftBidsResponse) + - [QueryNftListingRequest](#ununifi.nftmarketv1.QueryNftListingRequest) + - [QueryNftListingResponse](#ununifi.nftmarketv1.QueryNftListingResponse) + - [QueryParamsRequest](#ununifi.nftmarketv1.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.nftmarketv1.QueryParamsResponse) + - [QueryPaymentStatusRequest](#ununifi.nftmarketv1.QueryPaymentStatusRequest) + - [QueryPaymentStatusResponse](#ununifi.nftmarketv1.QueryPaymentStatusResponse) + - [QueryRewardsRequest](#ununifi.nftmarketv1.QueryRewardsRequest) + - [QueryRewardsResponse](#ununifi.nftmarketv1.QueryRewardsResponse) + + - [Query](#ununifi.nftmarketv1.Query) + - [nftmarketv1/tx.proto](#nftmarketv1/tx.proto) - - [MsgBorrow](#ununifi.nftmarketv1.MsgBorrow) - - [MsgBorrowResponse](#ununifi.nftmarketv1.MsgBorrowResponse) - - [MsgBurnStableCoin](#ununifi.nftmarketv1.MsgBurnStableCoin) - - [MsgBurnStableCoinResponse](#ununifi.nftmarketv1.MsgBurnStableCoinResponse) - - [MsgCancelBid](#ununifi.nftmarketv1.MsgCancelBid) - - [MsgCancelBidResponse](#ununifi.nftmarketv1.MsgCancelBidResponse) - - [MsgCancelNftListing](#ununifi.nftmarketv1.MsgCancelNftListing) - - [MsgCancelNftListingResponse](#ununifi.nftmarketv1.MsgCancelNftListingResponse) - - [MsgEndNftListing](#ununifi.nftmarketv1.MsgEndNftListing) - - [MsgEndNftListingResponse](#ununifi.nftmarketv1.MsgEndNftListingResponse) - - [MsgExpandListingPeriod](#ununifi.nftmarketv1.MsgExpandListingPeriod) - - [MsgExpandListingPeriodResponse](#ununifi.nftmarketv1.MsgExpandListingPeriodResponse) - - [MsgLiquidate](#ununifi.nftmarketv1.MsgLiquidate) - - [MsgLiquidateResponse](#ununifi.nftmarketv1.MsgLiquidateResponse) - - [MsgListNft](#ununifi.nftmarketv1.MsgListNft) - - [MsgListNftResponse](#ununifi.nftmarketv1.MsgListNftResponse) - - [MsgMintNft](#ununifi.nftmarketv1.MsgMintNft) - - [MsgMintNftResponse](#ununifi.nftmarketv1.MsgMintNftResponse) - - [MsgMintStableCoin](#ununifi.nftmarketv1.MsgMintStableCoin) - - [MsgMintStableCoinResponse](#ununifi.nftmarketv1.MsgMintStableCoinResponse) - - [MsgPayFullBid](#ununifi.nftmarketv1.MsgPayFullBid) - - [MsgPayFullBidResponse](#ununifi.nftmarketv1.MsgPayFullBidResponse) - - [MsgPlaceBid](#ununifi.nftmarketv1.MsgPlaceBid) - - [MsgPlaceBidResponse](#ununifi.nftmarketv1.MsgPlaceBidResponse) - - [MsgRepay](#ununifi.nftmarketv1.MsgRepay) - - [MsgRepayResponse](#ununifi.nftmarketv1.MsgRepayResponse) - - [MsgSellingDecision](#ununifi.nftmarketv1.MsgSellingDecision) - - [MsgSellingDecisionResponse](#ununifi.nftmarketv1.MsgSellingDecisionResponse) - - - [Msg](#ununifi.nftmarketv1.Msg) - + + - [MsgBorrow](#ununifi.nftmarketv1.MsgBorrow) + - [MsgBorrowResponse](#ununifi.nftmarketv1.MsgBorrowResponse) + - [MsgBurnStableCoin](#ununifi.nftmarketv1.MsgBurnStableCoin) + - [MsgBurnStableCoinResponse](#ununifi.nftmarketv1.MsgBurnStableCoinResponse) + - [MsgCancelBid](#ununifi.nftmarketv1.MsgCancelBid) + - [MsgCancelBidResponse](#ununifi.nftmarketv1.MsgCancelBidResponse) + - [MsgCancelNftListing](#ununifi.nftmarketv1.MsgCancelNftListing) + - [MsgCancelNftListingResponse](#ununifi.nftmarketv1.MsgCancelNftListingResponse) + - [MsgEndNftListing](#ununifi.nftmarketv1.MsgEndNftListing) + - [MsgEndNftListingResponse](#ununifi.nftmarketv1.MsgEndNftListingResponse) + - [MsgExpandListingPeriod](#ununifi.nftmarketv1.MsgExpandListingPeriod) + - [MsgExpandListingPeriodResponse](#ununifi.nftmarketv1.MsgExpandListingPeriodResponse) + - [MsgLiquidate](#ununifi.nftmarketv1.MsgLiquidate) + - [MsgLiquidateResponse](#ununifi.nftmarketv1.MsgLiquidateResponse) + - [MsgListNft](#ununifi.nftmarketv1.MsgListNft) + - [MsgListNftResponse](#ununifi.nftmarketv1.MsgListNftResponse) + - [MsgMintNft](#ununifi.nftmarketv1.MsgMintNft) + - [MsgMintNftResponse](#ununifi.nftmarketv1.MsgMintNftResponse) + - [MsgMintStableCoin](#ununifi.nftmarketv1.MsgMintStableCoin) + - [MsgMintStableCoinResponse](#ununifi.nftmarketv1.MsgMintStableCoinResponse) + - [MsgPayFullBid](#ununifi.nftmarketv1.MsgPayFullBid) + - [MsgPayFullBidResponse](#ununifi.nftmarketv1.MsgPayFullBidResponse) + - [MsgPlaceBid](#ununifi.nftmarketv1.MsgPlaceBid) + - [MsgPlaceBidResponse](#ununifi.nftmarketv1.MsgPlaceBidResponse) + - [MsgRepay](#ununifi.nftmarketv1.MsgRepay) + - [MsgRepayResponse](#ununifi.nftmarketv1.MsgRepayResponse) + - [MsgSellingDecision](#ununifi.nftmarketv1.MsgSellingDecision) + - [MsgSellingDecisionResponse](#ununifi.nftmarketv1.MsgSellingDecisionResponse) + + - [Msg](#ununifi.nftmarketv1.Msg) + - [nftmint/nftmint.proto](#nftmint/nftmint.proto) - - [ClassAttributes](#ununifi.nftmint.ClassAttributes) - - [ClassNameIdList](#ununifi.nftmint.ClassNameIdList) - - [OwningClassIdList](#ununifi.nftmint.OwningClassIdList) - - [Params](#ununifi.nftmint.Params) - - - [MintingPermission](#ununifi.nftmint.MintingPermission) - + + - [ClassAttributes](#ununifi.nftmint.ClassAttributes) + - [ClassNameIdList](#ununifi.nftmint.ClassNameIdList) + - [OwningClassIdList](#ununifi.nftmint.OwningClassIdList) + - [Params](#ununifi.nftmint.Params) + + - [MintingPermission](#ununifi.nftmint.MintingPermission) + - [nftmint/event.proto](#nftmint/event.proto) - - [EventBurnNFT](#ununifi.nftmint.EventBurnNFT) - - [EventCreateClass](#ununifi.nftmint.EventCreateClass) - - [EventMintNFT](#ununifi.nftmint.EventMintNFT) - - [EventSendClassOwnership](#ununifi.nftmint.EventSendClassOwnership) - - [EventUpdateBaseTokenUri](#ununifi.nftmint.EventUpdateBaseTokenUri) - - [EventUpdateTokenSupplyCap](#ununifi.nftmint.EventUpdateTokenSupplyCap) - + - [EventBurnNFT](#ununifi.nftmint.EventBurnNFT) + - [EventCreateClass](#ununifi.nftmint.EventCreateClass) + - [EventMintNFT](#ununifi.nftmint.EventMintNFT) + - [EventSendClassOwnership](#ununifi.nftmint.EventSendClassOwnership) + - [EventUpdateBaseTokenUri](#ununifi.nftmint.EventUpdateBaseTokenUri) + - [EventUpdateTokenSupplyCap](#ununifi.nftmint.EventUpdateTokenSupplyCap) - [nftmint/genesis.proto](#nftmint/genesis.proto) - - [GenesisState](#ununifi.nftmint.GenesisState) - + - [GenesisState](#ununifi.nftmint.GenesisState) - [nftmint/query.proto](#nftmint/query.proto) - - [QueryClassAttributesRequest](#ununifi.nftmint.QueryClassAttributesRequest) - - [QueryClassAttributesResponse](#ununifi.nftmint.QueryClassAttributesResponse) - - [QueryClassIdsByNameRequest](#ununifi.nftmint.QueryClassIdsByNameRequest) - - [QueryClassIdsByNameResponse](#ununifi.nftmint.QueryClassIdsByNameResponse) - - [QueryClassIdsByOwnerRequest](#ununifi.nftmint.QueryClassIdsByOwnerRequest) - - [QueryClassIdsByOwnerResponse](#ununifi.nftmint.QueryClassIdsByOwnerResponse) - - [QueryNFTMinterRequest](#ununifi.nftmint.QueryNFTMinterRequest) - - [QueryNFTMinterResponse](#ununifi.nftmint.QueryNFTMinterResponse) - - [QueryParamsRequest](#ununifi.nftmint.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.nftmint.QueryParamsResponse) - - - [Query](#ununifi.nftmint.Query) - + + - [QueryClassAttributesRequest](#ununifi.nftmint.QueryClassAttributesRequest) + - [QueryClassAttributesResponse](#ununifi.nftmint.QueryClassAttributesResponse) + - [QueryClassIdsByNameRequest](#ununifi.nftmint.QueryClassIdsByNameRequest) + - [QueryClassIdsByNameResponse](#ununifi.nftmint.QueryClassIdsByNameResponse) + - [QueryClassIdsByOwnerRequest](#ununifi.nftmint.QueryClassIdsByOwnerRequest) + - [QueryClassIdsByOwnerResponse](#ununifi.nftmint.QueryClassIdsByOwnerResponse) + - [QueryNFTMinterRequest](#ununifi.nftmint.QueryNFTMinterRequest) + - [QueryNFTMinterResponse](#ununifi.nftmint.QueryNFTMinterResponse) + - [QueryParamsRequest](#ununifi.nftmint.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.nftmint.QueryParamsResponse) + + - [Query](#ununifi.nftmint.Query) + - [nftmint/tx.proto](#nftmint/tx.proto) - - [MsgBurnNFT](#ununifi.nftmint.MsgBurnNFT) - - [MsgBurnNFTResponse](#ununifi.nftmint.MsgBurnNFTResponse) - - [MsgCreateClass](#ununifi.nftmint.MsgCreateClass) - - [MsgCreateClassResponse](#ununifi.nftmint.MsgCreateClassResponse) - - [MsgMintNFT](#ununifi.nftmint.MsgMintNFT) - - [MsgMintNFTResponse](#ununifi.nftmint.MsgMintNFTResponse) - - [MsgSendClassOwnership](#ununifi.nftmint.MsgSendClassOwnership) - - [MsgSendClassOwnershipResponse](#ununifi.nftmint.MsgSendClassOwnershipResponse) - - [MsgUpdateBaseTokenUri](#ununifi.nftmint.MsgUpdateBaseTokenUri) - - [MsgUpdateBaseTokenUriResponse](#ununifi.nftmint.MsgUpdateBaseTokenUriResponse) - - [MsgUpdateTokenSupplyCap](#ununifi.nftmint.MsgUpdateTokenSupplyCap) - - [MsgUpdateTokenSupplyCapResponse](#ununifi.nftmint.MsgUpdateTokenSupplyCapResponse) - - - [Msg](#ununifi.nftmint.Msg) - + + - [MsgBurnNFT](#ununifi.nftmint.MsgBurnNFT) + - [MsgBurnNFTResponse](#ununifi.nftmint.MsgBurnNFTResponse) + - [MsgCreateClass](#ununifi.nftmint.MsgCreateClass) + - [MsgCreateClassResponse](#ununifi.nftmint.MsgCreateClassResponse) + - [MsgMintNFT](#ununifi.nftmint.MsgMintNFT) + - [MsgMintNFTResponse](#ununifi.nftmint.MsgMintNFTResponse) + - [MsgSendClassOwnership](#ununifi.nftmint.MsgSendClassOwnership) + - [MsgSendClassOwnershipResponse](#ununifi.nftmint.MsgSendClassOwnershipResponse) + - [MsgUpdateBaseTokenUri](#ununifi.nftmint.MsgUpdateBaseTokenUri) + - [MsgUpdateBaseTokenUriResponse](#ununifi.nftmint.MsgUpdateBaseTokenUriResponse) + - [MsgUpdateTokenSupplyCap](#ununifi.nftmint.MsgUpdateTokenSupplyCap) + - [MsgUpdateTokenSupplyCapResponse](#ununifi.nftmint.MsgUpdateTokenSupplyCapResponse) + + - [Msg](#ununifi.nftmint.Msg) + - [pricefeed/pricefeed.proto](#pricefeed/pricefeed.proto) - - [CurrentPrice](#ununifi.pricefeed.CurrentPrice) - - [Market](#ununifi.pricefeed.Market) - - [Params](#ununifi.pricefeed.Params) - - [PostedPrice](#ununifi.pricefeed.PostedPrice) - + - [CurrentPrice](#ununifi.pricefeed.CurrentPrice) + - [Market](#ununifi.pricefeed.Market) + - [Params](#ununifi.pricefeed.Params) + - [PostedPrice](#ununifi.pricefeed.PostedPrice) - [pricefeed/genesis.proto](#pricefeed/genesis.proto) - - [GenesisState](#ununifi.pricefeed.GenesisState) - + - [GenesisState](#ununifi.pricefeed.GenesisState) - [pricefeed/query.proto](#pricefeed/query.proto) - - [QueryAllMarketRequest](#ununifi.pricefeed.QueryAllMarketRequest) - - [QueryAllMarketResponse](#ununifi.pricefeed.QueryAllMarketResponse) - - [QueryAllOracleRequest](#ununifi.pricefeed.QueryAllOracleRequest) - - [QueryAllOracleResponse](#ununifi.pricefeed.QueryAllOracleResponse) - - [QueryAllPriceRequest](#ununifi.pricefeed.QueryAllPriceRequest) - - [QueryAllPriceResponse](#ununifi.pricefeed.QueryAllPriceResponse) - - [QueryAllRawPriceRequest](#ununifi.pricefeed.QueryAllRawPriceRequest) - - [QueryAllRawPriceResponse](#ununifi.pricefeed.QueryAllRawPriceResponse) - - [QueryGetPriceRequest](#ununifi.pricefeed.QueryGetPriceRequest) - - [QueryGetPriceResponse](#ununifi.pricefeed.QueryGetPriceResponse) - - [QueryParamsRequest](#ununifi.pricefeed.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.pricefeed.QueryParamsResponse) - - - [Query](#ununifi.pricefeed.Query) - + + - [QueryAllMarketRequest](#ununifi.pricefeed.QueryAllMarketRequest) + - [QueryAllMarketResponse](#ununifi.pricefeed.QueryAllMarketResponse) + - [QueryAllOracleRequest](#ununifi.pricefeed.QueryAllOracleRequest) + - [QueryAllOracleResponse](#ununifi.pricefeed.QueryAllOracleResponse) + - [QueryAllPriceRequest](#ununifi.pricefeed.QueryAllPriceRequest) + - [QueryAllPriceResponse](#ununifi.pricefeed.QueryAllPriceResponse) + - [QueryAllRawPriceRequest](#ununifi.pricefeed.QueryAllRawPriceRequest) + - [QueryAllRawPriceResponse](#ununifi.pricefeed.QueryAllRawPriceResponse) + - [QueryGetPriceRequest](#ununifi.pricefeed.QueryGetPriceRequest) + - [QueryGetPriceResponse](#ununifi.pricefeed.QueryGetPriceResponse) + - [QueryParamsRequest](#ununifi.pricefeed.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.pricefeed.QueryParamsResponse) + + - [Query](#ununifi.pricefeed.Query) + - [pricefeed/tx.proto](#pricefeed/tx.proto) - - [MsgPostPrice](#ununifi.pricefeed.MsgPostPrice) - - [MsgPostPriceResponse](#ununifi.pricefeed.MsgPostPriceResponse) - - - [Msg](#ununifi.pricefeed.Msg) - + + - [MsgPostPrice](#ununifi.pricefeed.MsgPostPrice) + - [MsgPostPriceResponse](#ununifi.pricefeed.MsgPostPriceResponse) + + - [Msg](#ununifi.pricefeed.Msg) + - [ununifidist/ununifidist.proto](#ununifidist/ununifidist.proto) - - [Params](#ununifi.ununifidist.Params) - - [Period](#ununifi.ununifidist.Period) - + - [Params](#ununifi.ununifidist.Params) + - [Period](#ununifi.ununifidist.Period) - [ununifidist/genesis.proto](#ununifidist/genesis.proto) - - [GenesisState](#ununifi.ununifidist.GenesisState) - + - [GenesisState](#ununifi.ununifidist.GenesisState) - [ununifidist/query.proto](#ununifidist/query.proto) - - [QueryGetBalancesRequest](#ununifi.ununifidist.QueryGetBalancesRequest) - - [QueryGetBalancesResponse](#ununifi.ununifidist.QueryGetBalancesResponse) - - [QueryParamsRequest](#ununifi.ununifidist.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.ununifidist.QueryParamsResponse) - - - [Query](#ununifi.ununifidist.Query) - + + - [QueryGetBalancesRequest](#ununifi.ununifidist.QueryGetBalancesRequest) + - [QueryGetBalancesResponse](#ununifi.ununifidist.QueryGetBalancesResponse) + - [QueryParamsRequest](#ununifi.ununifidist.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.ununifidist.QueryParamsResponse) + + - [Query](#ununifi.ununifidist.Query) + - [yield-aggregator/params.proto](#yield-aggregator/params.proto) - - [Params](#ununifi.yieldaggregator.Params) - + - [Params](#ununifi.yieldaggregator.Params) - [yield-aggregator/yield-aggregator.proto](#yield-aggregator/yield-aggregator.proto) - - [Strategy](#ununifi.yieldaggregator.Strategy) - - [StrategyMetrics](#ununifi.yieldaggregator.StrategyMetrics) - - [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) - - [Vault](#ununifi.yieldaggregator.Vault) - - [VaultMetrics](#ununifi.yieldaggregator.VaultMetrics) - + - [Strategy](#ununifi.yieldaggregator.Strategy) + - [StrategyMetrics](#ununifi.yieldaggregator.StrategyMetrics) + - [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) + - [Vault](#ununifi.yieldaggregator.Vault) + - [VaultMetrics](#ununifi.yieldaggregator.VaultMetrics) - [yield-aggregator/genesis.proto](#yield-aggregator/genesis.proto) - - [GenesisState](#ununifi.yieldaggregator.GenesisState) - + - [GenesisState](#ununifi.yieldaggregator.GenesisState) - [yield-aggregator/proposal.proto](#yield-aggregator/proposal.proto) - - [ProposalAddStrategy](#ununifi.yieldaggregator.ProposalAddStrategy) - + - [ProposalAddStrategy](#ununifi.yieldaggregator.ProposalAddStrategy) - [yield-aggregator/query.proto](#yield-aggregator/query.proto) - - [QueryAllStrategyRequest](#ununifi.yieldaggregator.QueryAllStrategyRequest) - - [QueryAllStrategyResponse](#ununifi.yieldaggregator.QueryAllStrategyResponse) - - [QueryAllVaultRequest](#ununifi.yieldaggregator.QueryAllVaultRequest) - - [QueryAllVaultResponse](#ununifi.yieldaggregator.QueryAllVaultResponse) - - [QueryEstimateMintAmountRequest](#ununifi.yieldaggregator.QueryEstimateMintAmountRequest) - - [QueryEstimateMintAmountResponse](#ununifi.yieldaggregator.QueryEstimateMintAmountResponse) - - [QueryEstimateRedeemAmountRequest](#ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest) - - [QueryEstimateRedeemAmountResponse](#ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse) - - [QueryGetStrategyRequest](#ununifi.yieldaggregator.QueryGetStrategyRequest) - - [QueryGetStrategyResponse](#ununifi.yieldaggregator.QueryGetStrategyResponse) - - [QueryGetVaultRequest](#ununifi.yieldaggregator.QueryGetVaultRequest) - - [QueryGetVaultResponse](#ununifi.yieldaggregator.QueryGetVaultResponse) - - [QueryParamsRequest](#ununifi.yieldaggregator.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.yieldaggregator.QueryParamsResponse) - - - [Query](#ununifi.yieldaggregator.Query) - + + - [QueryAllStrategyRequest](#ununifi.yieldaggregator.QueryAllStrategyRequest) + - [QueryAllStrategyResponse](#ununifi.yieldaggregator.QueryAllStrategyResponse) + - [QueryAllVaultRequest](#ununifi.yieldaggregator.QueryAllVaultRequest) + - [QueryAllVaultResponse](#ununifi.yieldaggregator.QueryAllVaultResponse) + - [QueryEstimateMintAmountRequest](#ununifi.yieldaggregator.QueryEstimateMintAmountRequest) + - [QueryEstimateMintAmountResponse](#ununifi.yieldaggregator.QueryEstimateMintAmountResponse) + - [QueryEstimateRedeemAmountRequest](#ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest) + - [QueryEstimateRedeemAmountResponse](#ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse) + - [QueryGetStrategyRequest](#ununifi.yieldaggregator.QueryGetStrategyRequest) + - [QueryGetStrategyResponse](#ununifi.yieldaggregator.QueryGetStrategyResponse) + - [QueryGetVaultRequest](#ununifi.yieldaggregator.QueryGetVaultRequest) + - [QueryGetVaultResponse](#ununifi.yieldaggregator.QueryGetVaultResponse) + - [QueryParamsRequest](#ununifi.yieldaggregator.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.yieldaggregator.QueryParamsResponse) + + - [Query](#ununifi.yieldaggregator.Query) + - [yield-aggregator/tx.proto](#yield-aggregator/tx.proto) - - [MsgCreateVault](#ununifi.yieldaggregator.MsgCreateVault) - - [MsgCreateVaultResponse](#ununifi.yieldaggregator.MsgCreateVaultResponse) - - [MsgDeleteVault](#ununifi.yieldaggregator.MsgDeleteVault) - - [MsgDeleteVaultResponse](#ununifi.yieldaggregator.MsgDeleteVaultResponse) - - [MsgDepositToVault](#ununifi.yieldaggregator.MsgDepositToVault) - - [MsgDepositToVaultResponse](#ununifi.yieldaggregator.MsgDepositToVaultResponse) - - [MsgTransferVaultOwnership](#ununifi.yieldaggregator.MsgTransferVaultOwnership) - - [MsgTransferVaultOwnershipResponse](#ununifi.yieldaggregator.MsgTransferVaultOwnershipResponse) - - [MsgWithdrawFromVault](#ununifi.yieldaggregator.MsgWithdrawFromVault) - - [MsgWithdrawFromVaultResponse](#ununifi.yieldaggregator.MsgWithdrawFromVaultResponse) - - - [Msg](#ununifi.yieldaggregator.Msg) - + + - [MsgCreateVault](#ununifi.yieldaggregator.MsgCreateVault) + - [MsgCreateVaultResponse](#ununifi.yieldaggregator.MsgCreateVaultResponse) + - [MsgDeleteVault](#ununifi.yieldaggregator.MsgDeleteVault) + - [MsgDeleteVaultResponse](#ununifi.yieldaggregator.MsgDeleteVaultResponse) + - [MsgDepositToVault](#ununifi.yieldaggregator.MsgDepositToVault) + - [MsgDepositToVaultResponse](#ununifi.yieldaggregator.MsgDepositToVaultResponse) + - [MsgTransferVaultOwnership](#ununifi.yieldaggregator.MsgTransferVaultOwnership) + - [MsgTransferVaultOwnershipResponse](#ununifi.yieldaggregator.MsgTransferVaultOwnershipResponse) + - [MsgWithdrawFromVault](#ununifi.yieldaggregator.MsgWithdrawFromVault) + - [MsgWithdrawFromVaultResponse](#ununifi.yieldaggregator.MsgWithdrawFromVaultResponse) + + - [Msg](#ununifi.yieldaggregator.Msg) + - [yieldaggregatorv1/params.proto](#yieldaggregatorv1/params.proto) - - [Params](#ununifi.chain.yieldaggregator.Params) - + - [Params](#ununifi.chain.yieldaggregator.Params) - [yieldaggregatorv1/asset.proto](#yieldaggregatorv1/asset.proto) - - [AssetCondition](#ununifi.chain.yieldaggregator.AssetCondition) - - [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) - - [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) - - [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) - - [DepositAllocation](#ununifi.chain.yieldaggregator.DepositAllocation) - - [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) - - [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) - - [IntegrateInfo](#ununifi.chain.yieldaggregator.IntegrateInfo) - - [Strategy](#ununifi.chain.yieldaggregator.Strategy) - - [UserDeposit](#ununifi.chain.yieldaggregator.UserDeposit) - - [UserInfo](#ununifi.chain.yieldaggregator.UserInfo) - - - [IntegrateType](#ununifi.chain.yieldaggregator.IntegrateType) - + + - [AssetCondition](#ununifi.chain.yieldaggregator.AssetCondition) + - [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) + - [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) + - [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) + - [DepositAllocation](#ununifi.chain.yieldaggregator.DepositAllocation) + - [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) + - [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) + - [IntegrateInfo](#ununifi.chain.yieldaggregator.IntegrateInfo) + - [Strategy](#ununifi.chain.yieldaggregator.Strategy) + - [UserDeposit](#ununifi.chain.yieldaggregator.UserDeposit) + - [UserInfo](#ununifi.chain.yieldaggregator.UserInfo) + + - [IntegrateType](#ununifi.chain.yieldaggregator.IntegrateType) + - [yieldaggregatorv1/genesis.proto](#yieldaggregatorv1/genesis.proto) - - [GenesisState](#ununifi.chain.yieldaggregator.GenesisState) - + - [GenesisState](#ununifi.chain.yieldaggregator.GenesisState) - [yieldaggregatorv1/proposal.proto](#yieldaggregatorv1/proposal.proto) - - [ProposalAddYieldFarm](#ununifi.chain.yieldaggregator.ProposalAddYieldFarm) - - [ProposalAddYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalAddYieldFarmTarget) - - [ProposalRemoveYieldFarm](#ununifi.chain.yieldaggregator.ProposalRemoveYieldFarm) - - [ProposalRemoveYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalRemoveYieldFarmTarget) - - [ProposalStopYieldFarm](#ununifi.chain.yieldaggregator.ProposalStopYieldFarm) - - [ProposalStopYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalStopYieldFarmTarget) - - [ProposalUpdateYieldFarm](#ununifi.chain.yieldaggregator.ProposalUpdateYieldFarm) - - [ProposalUpdateYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalUpdateYieldFarmTarget) - + - [ProposalAddYieldFarm](#ununifi.chain.yieldaggregator.ProposalAddYieldFarm) + - [ProposalAddYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalAddYieldFarmTarget) + - [ProposalRemoveYieldFarm](#ununifi.chain.yieldaggregator.ProposalRemoveYieldFarm) + - [ProposalRemoveYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalRemoveYieldFarmTarget) + - [ProposalStopYieldFarm](#ununifi.chain.yieldaggregator.ProposalStopYieldFarm) + - [ProposalStopYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalStopYieldFarmTarget) + - [ProposalUpdateYieldFarm](#ununifi.chain.yieldaggregator.ProposalUpdateYieldFarm) + - [ProposalUpdateYieldFarmTarget](#ununifi.chain.yieldaggregator.ProposalUpdateYieldFarmTarget) - [yieldaggregatorv1/query.proto](#yieldaggregatorv1/query.proto) - - [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) - - [QueryAllAssetManagementAccountsRequest](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsRequest) - - [QueryAllAssetManagementAccountsResponse](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsResponse) - - [QueryAllFarmingUnitsRequest](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsRequest) - - [QueryAllFarmingUnitsResponse](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsResponse) - - [QueryAssetManagementAccountRequest](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountRequest) - - [QueryAssetManagementAccountResponse](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountResponse) - - [QueryDailyRewardPercentsRequest](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsRequest) - - [QueryDailyRewardPercentsResponse](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsResponse) - - [QueryParamsRequest](#ununifi.chain.yieldaggregator.QueryParamsRequest) - - [QueryParamsResponse](#ununifi.chain.yieldaggregator.QueryParamsResponse) - - [QueryUserInfo](#ununifi.chain.yieldaggregator.QueryUserInfo) - - [QueryUserInfoRequest](#ununifi.chain.yieldaggregator.QueryUserInfoRequest) - - [QueryUserInfoResponse](#ununifi.chain.yieldaggregator.QueryUserInfoResponse) - - - [Query](#ununifi.chain.yieldaggregator.Query) - + + - [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) + - [QueryAllAssetManagementAccountsRequest](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsRequest) + - [QueryAllAssetManagementAccountsResponse](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsResponse) + - [QueryAllFarmingUnitsRequest](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsRequest) + - [QueryAllFarmingUnitsResponse](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsResponse) + - [QueryAssetManagementAccountRequest](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountRequest) + - [QueryAssetManagementAccountResponse](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountResponse) + - [QueryDailyRewardPercentsRequest](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsRequest) + - [QueryDailyRewardPercentsResponse](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsResponse) + - [QueryParamsRequest](#ununifi.chain.yieldaggregator.QueryParamsRequest) + - [QueryParamsResponse](#ununifi.chain.yieldaggregator.QueryParamsResponse) + - [QueryUserInfo](#ununifi.chain.yieldaggregator.QueryUserInfo) + - [QueryUserInfoRequest](#ununifi.chain.yieldaggregator.QueryUserInfoRequest) + - [QueryUserInfoResponse](#ununifi.chain.yieldaggregator.QueryUserInfoResponse) + + - [Query](#ununifi.chain.yieldaggregator.Query) + - [yieldaggregatorv1/tx.proto](#yieldaggregatorv1/tx.proto) - - [MsgActivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrder) - - [MsgActivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrderResponse) - - [MsgAddFarmingOrder](#ununifi.chain.yieldaggregator.MsgAddFarmingOrder) - - [MsgAddFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgAddFarmingOrderResponse) - - [MsgBeginWithdrawAll](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAll) - - [MsgBeginWithdrawAllResponse](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAllResponse) - - [MsgDeleteFarmingOrder](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrder) - - [MsgDeleteFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrderResponse) - - [MsgDeposit](#ununifi.chain.yieldaggregator.MsgDeposit) - - [MsgDepositResponse](#ununifi.chain.yieldaggregator.MsgDepositResponse) - - [MsgExecuteFarmingOrders](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrders) - - [MsgExecuteFarmingOrdersResponse](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrdersResponse) - - [MsgInactivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrder) - - [MsgInactivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrderResponse) - - [MsgSetDailyRewardPercent](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercent) - - [MsgSetDailyRewardPercentResponse](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercentResponse) - - [MsgWithdraw](#ununifi.chain.yieldaggregator.MsgWithdraw) - - [MsgWithdrawResponse](#ununifi.chain.yieldaggregator.MsgWithdrawResponse) - - - [Msg](#ununifi.chain.yieldaggregator.Msg) - + + - [MsgActivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrder) + - [MsgActivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrderResponse) + - [MsgAddFarmingOrder](#ununifi.chain.yieldaggregator.MsgAddFarmingOrder) + - [MsgAddFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgAddFarmingOrderResponse) + - [MsgBeginWithdrawAll](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAll) + - [MsgBeginWithdrawAllResponse](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAllResponse) + - [MsgDeleteFarmingOrder](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrder) + - [MsgDeleteFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrderResponse) + - [MsgDeposit](#ununifi.chain.yieldaggregator.MsgDeposit) + - [MsgDepositResponse](#ununifi.chain.yieldaggregator.MsgDepositResponse) + - [MsgExecuteFarmingOrders](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrders) + - [MsgExecuteFarmingOrdersResponse](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrdersResponse) + - [MsgInactivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrder) + - [MsgInactivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrderResponse) + - [MsgSetDailyRewardPercent](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercent) + - [MsgSetDailyRewardPercentResponse](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercentResponse) + - [MsgWithdraw](#ununifi.chain.yieldaggregator.MsgWithdraw) + - [MsgWithdrawResponse](#ununifi.chain.yieldaggregator.MsgWithdrawResponse) + + - [Msg](#ununifi.chain.yieldaggregator.Msg) + - [yieldfarm/params.proto](#yieldfarm/params.proto) - - [Params](#ununifi.chain.yieldfarm.Params) - + - [Params](#ununifi.chain.yieldfarm.Params) - [yieldfarm/yieldfarm.proto](#yieldfarm/yieldfarm.proto) - - [FarmerInfo](#ununifi.chain.yieldfarm.FarmerInfo) - + - [FarmerInfo](#ununifi.chain.yieldfarm.FarmerInfo) - [yieldfarm/genesis.proto](#yieldfarm/genesis.proto) - - [GenesisState](#ununifi.chain.yieldfarm.GenesisState) - + - [GenesisState](#ununifi.chain.yieldfarm.GenesisState) - [Scalar Value Types](#scalar-value-types) - - +
## auction/auction.proto - - ### BaseAuction - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `initiator` | [string](#string) | | | -| `lot` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `bidder` | [string](#string) | | | -| `bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `has_received_bids` | [bool](#bool) | | | -| `end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `max_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - +| Field | Type | Label | Description | +| ------------------- | ------------------------------------------------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `initiator` | [string](#string) | | | +| `lot` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `bidder` | [string](#string) | | | +| `bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `has_received_bids` | [bool](#bool) | | | +| `end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `max_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | ### CollateralAuction - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | -| `corresponding_debt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `max_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `lot_returns` | [WeightedAddress](#ununifi.auction.WeightedAddress) | repeated | | - - - - - +| Field | Type | Label | Description | +| -------------------- | ----------------------------------------------------- | -------- | ----------- | +| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | +| `corresponding_debt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `max_bid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `lot_returns` | [WeightedAddress](#ununifi.auction.WeightedAddress) | repeated | | ### DebtAuction - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | -| `corresponding_debt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - +| Field | Type | Label | Description | +| -------------------- | ----------------------------------------------------- | ----- | ----------- | +| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | +| `corresponding_debt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | ### Params - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `max_auction_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `bid_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `increment_surplus` | [string](#string) | | | -| `increment_debt` | [string](#string) | | | -| `increment_collateral` | [string](#string) | | | - - - - - +| Field | Type | Label | Description | +| ---------------------- | ----------------------------------------------------- | ----- | ----------- | +| `max_auction_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `bid_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `increment_surplus` | [string](#string) | | | +| `increment_debt` | [string](#string) | | | +| `increment_collateral` | [string](#string) | | | ### SurplusAuction - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | - - - - - +| Field | Type | Label | Description | +| -------------- | ------------------------------------------- | ----- | ----------- | +| `base_auction` | [BaseAuction](#ununifi.auction.BaseAuction) | | | ### WeightedAddress - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `weight` | [string](#string) | | | - - - - +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `address` | [string](#string) | | | +| `weight` | [string](#string) | | | @@ -769,30 +725,23 @@ - - + ## auction/genesis.proto - - ### GenesisState -GenesisState defines the auction module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `next_auction_id` | [uint64](#uint64) | | | -| `params` | [Params](#ununifi.auction.Params) | | | -| `auctions` | [google.protobuf.Any](#google.protobuf.Any) | repeated | this line is used by starport scaffolding # genesis/proto/state | - - +GenesisState defines the auction module's genesis state. +| Field | Type | Label | Description | +| ----------------- | ------------------------------------------- | -------- | --------------------------------------------------------------- | +| `next_auction_id` | [uint64](#uint64) | | | +| `params` | [Params](#ununifi.auction.Params) | | | +| `auctions` | [google.protobuf.Any](#google.protobuf.Any) | repeated | this line is used by starport scaffolding # genesis/proto/state | @@ -802,99 +751,58 @@ GenesisState defines the auction module's genesis state. - - + ## auction/query.proto - - ### QueryAllAuctionRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | ### QueryAllAuctionResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auctions` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `auctions` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | ### QueryGetAuctionRequest -this line is used by starport scaffolding # 3 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | - - - +this line is used by starport scaffolding # 3 +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | ### QueryGetAuctionResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction` | [google.protobuf.Any](#google.protobuf.Any) | | | - - - - - +| Field | Type | Label | Description | +| --------- | ------------------------------------------- | ----- | ----------- | +| `auction` | [google.protobuf.Any](#google.protobuf.Any) | | | ### QueryParamsRequest - - - - - - ### QueryParamsResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.auction.Params) | | | - - - - +| Field | Type | Label | Description | +| -------- | --------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.auction.Params) | | | @@ -902,1066 +810,1653 @@ this line is used by starport scaffolding # 3 - ### Query + Query defines the gRPC querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.auction.QueryParamsRequest) | [QueryParamsResponse](#ununifi.auction.QueryParamsResponse) | | GET|/ununifi/auction/params| -| `Auction` | [QueryGetAuctionRequest](#ununifi.auction.QueryGetAuctionRequest) | [QueryGetAuctionResponse](#ununifi.auction.QueryGetAuctionResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/auction/auctions/{id}| -| `AuctionAll` | [QueryAllAuctionRequest](#ununifi.auction.QueryAllAuctionRequest) | [QueryAllAuctionResponse](#ununifi.auction.QueryAllAuctionResponse) | | GET|/ununifi/auction/auctions| +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------- | --------- | ------------------------------ | +| `Params` | [QueryParamsRequest](#ununifi.auction.QueryParamsRequest) | [QueryParamsResponse](#ununifi.auction.QueryParamsResponse) | | GET | /ununifi/auction/params | +| `Auction` | [QueryGetAuctionRequest](#ununifi.auction.QueryGetAuctionRequest) | [QueryGetAuctionResponse](#ununifi.auction.QueryGetAuctionResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/auction/auctions/{id} | +| `AuctionAll` | [QueryAllAuctionRequest](#ununifi.auction.QueryAllAuctionRequest) | [QueryAllAuctionResponse](#ununifi.auction.QueryAllAuctionResponse) | | GET | /ununifi/auction/auctions | - - + ## auction/tx.proto - - ### MsgPlaceBid - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction_id` | [uint64](#uint64) | | | -| `bidder` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - +| Field | Type | Label | Description | +| ------------ | ----------------------------------------------------- | ----- | ----------- | +| `auction_id` | [uint64](#uint64) | | | +| `bidder` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | ### MsgPlaceBidResponse - - - - - - ### Msg - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `PlaceBid` | [MsgPlaceBid](#ununifi.auction.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.auction.MsgPlaceBidResponse) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------------------------------------- | ----------------------------------------------------------- | ----------- | --------- | -------- | +| `PlaceBid` | [MsgPlaceBid](#ununifi.auction.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.auction.MsgPlaceBidResponse) | | | - - + ## cdp/cdp.proto - - ### AugmentedCdp +| Field | Type | Label | Description | +| ------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `cdp` | [Cdp](#ununifi.cdp.Cdp) | | | +| `collateral_value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `collateralization_ratio` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cdp` | [Cdp](#ununifi.cdp.Cdp) | | | -| `collateral_value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `collateralization_ratio` | [string](#string) | | | +### Cdp +| Field | Type | Label | Description | +| ------------------ | ------------------------------------------------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `owner` | [string](#string) | | | +| `type` | [string](#string) | | | +| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `accumulated_fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `fees_updated` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `interest_factor` | [string](#string) | | | + +### CollateralParam +| Field | Type | Label | Description | +| ------------------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `type` | [string](#string) | | | +| `liquidation_ratio` | [string](#string) | | | +| `debt_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `stability_fee` | [string](#string) | | | +| `auction_size` | [string](#string) | | | +| `liquidation_penalty` | [string](#string) | | | +| `prefix` | [uint32](#uint32) | | | +| `spot_market_id` | [string](#string) | | | +| `liquidation_market_id` | [string](#string) | | | +| `keeper_reward_percentage` | [string](#string) | | | +| `check_collateralization_index_count` | [string](#string) | | | +| `conversion_factor` | [string](#string) | | | + - +### DebtParam -### Cdp +| Field | Type | Label | Description | +| --------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `reference_asset` | [string](#string) | | | +| `conversion_factor` | [string](#string) | | | +| `debt_floor` | [string](#string) | | | +| `global_debt_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `debt_denom` | [string](#string) | | | +| `surplus_auction_threshold` | [string](#string) | | | +| `surplus_auction_lot` | [string](#string) | | | +| `debt_auction_threshold` | [string](#string) | | | +| `debt_auction_lot` | [string](#string) | | | +| `circuit_breaker` | [bool](#bool) | | | + +### Deposit -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `owner` | [string](#string) | | | -| `type` | [string](#string) | | | -| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `accumulated_fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fees_updated` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `interest_factor` | [string](#string) | | | +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------- | ----- | ----------- | +| `cdp_id` | [uint64](#uint64) | | | +| `depositor` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### Params +| Field | Type | Label | Description | +| ------------------- | ----------------------------------------------- | -------- | ----------- | +| `collateral_params` | [CollateralParam](#ununifi.cdp.CollateralParam) | repeated | | +| `debt_params` | [DebtParam](#ununifi.cdp.DebtParam) | repeated | | + + - + -### CollateralParam + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `type` | [string](#string) | | | -| `liquidation_ratio` | [string](#string) | | | -| `debt_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `stability_fee` | [string](#string) | | | -| `auction_size` | [string](#string) | | | -| `liquidation_penalty` | [string](#string) | | | -| `prefix` | [uint32](#uint32) | | | -| `spot_market_id` | [string](#string) | | | -| `liquidation_market_id` | [string](#string) | | | -| `keeper_reward_percentage` | [string](#string) | | | -| `check_collateralization_index_count` | [string](#string) | | | -| `conversion_factor` | [string](#string) | | | +## cdp/genesis.proto + +### GenesisAccumulationTime +| Field | Type | Label | Description | +| ---------------------------- | ------------------------------------------------------- | ----- | ----------- | +| `collateral_type` | [string](#string) | | | +| `previous_accumulation_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `interest_factor` | [string](#string) | | | + +### GenesisState - +GenesisState defines the cdp module's genesis state. -### DebtParam +| Field | Type | Label | Description | +| ----------------------------- | --------------------------------------------------------------- | -------- | --------------------------------------------------------------- | +| `params` | [Params](#ununifi.cdp.Params) | | | +| `cdps` | [Cdp](#ununifi.cdp.Cdp) | repeated | | +| `deposits` | [Deposit](#ununifi.cdp.Deposit) | repeated | | +| `starting_cdp_id` | [uint64](#uint64) | | | +| `gov_denom` | [string](#string) | | | +| `previous_accumulation_times` | [GenesisAccumulationTime](#ununifi.cdp.GenesisAccumulationTime) | repeated | | +| `total_principals` | [GenesisTotalPrincipal](#ununifi.cdp.GenesisTotalPrincipal) | repeated | this line is used by starport scaffolding # genesis/proto/state | + +### GenesisTotalPrincipal -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `reference_asset` | [string](#string) | | | -| `conversion_factor` | [string](#string) | | | -| `debt_floor` | [string](#string) | | | -| `global_debt_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `debt_denom` | [string](#string) | | | -| `surplus_auction_threshold` | [string](#string) | | | -| `surplus_auction_lot` | [string](#string) | | | -| `debt_auction_threshold` | [string](#string) | | | -| `debt_auction_lot` | [string](#string) | | | -| `circuit_breaker` | [bool](#bool) | | | +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `collateral_type` | [string](#string) | | | +| `total_principal` | [string](#string) | | | + + + + + - + -### Deposit +## cdp/query.proto + +### QueryAllAccountRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cdp_id` | [uint64](#uint64) | | | -| `depositor` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryAllAccountResponse +| Field | Type | Label | Description | +| ---------- | ------------------------------------------- | -------- | ----------- | +| `accounts` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | + +### QueryAllCdpRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### Params +### QueryAllCdpResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `cdp` | [AugmentedCdp](#ununifi.cdp.AugmentedCdp) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `collateral_params` | [CollateralParam](#ununifi.cdp.CollateralParam) | repeated | | -| `debt_params` | [DebtParam](#ununifi.cdp.DebtParam) | repeated | | - - +### QueryAllDepositRequest +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `collateral_type` | [string](#string) | | | + - +### QueryAllDepositResponse - +| Field | Type | Label | Description | +| ---------- | ------------------------------- | -------- | ----------- | +| `deposits` | [Deposit](#ununifi.cdp.Deposit) | repeated | | - + - +### QueryGetCdpRequest +this line is used by starport scaffolding # 3 +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `collateral_type` | [string](#string) | | | - - + -## cdp/genesis.proto +### QueryGetCdpResponse +| Field | Type | Label | Description | +| ----- | ----------------------------------------- | ----- | ----------- | +| `cdp` | [AugmentedCdp](#ununifi.cdp.AugmentedCdp) | | | + - +### QueryParamsRequest -### GenesisAccumulationTime + +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | ----------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.cdp.Params) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `collateral_type` | [string](#string) | | | -| `previous_accumulation_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `interest_factor` | [string](#string) | | | + + + + +### Query +Query defines the gRPC querier service. - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------ | ------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.cdp.QueryParamsRequest) | [QueryParamsResponse](#ununifi.cdp.QueryParamsResponse) | | GET | /ununifi/cdp/params | +| `Cdp` | [QueryGetCdpRequest](#ununifi.cdp.QueryGetCdpRequest) | [QueryGetCdpResponse](#ununifi.cdp.QueryGetCdpResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/cdp/cdps/owners/{owner}/collateral-types/{collateral_type}/cdp | +| `CdpAll` | [QueryAllCdpRequest](#ununifi.cdp.QueryAllCdpRequest) | [QueryAllCdpResponse](#ununifi.cdp.QueryAllCdpResponse) | | GET | /ununifi/cdp/cdps | +| `AccountAll` | [QueryAllAccountRequest](#ununifi.cdp.QueryAllAccountRequest) | [QueryAllAccountResponse](#ununifi.cdp.QueryAllAccountResponse) | | GET | /ununifi/cdp/accounts | +| `DepositAll` | [QueryAllDepositRequest](#ununifi.cdp.QueryAllDepositRequest) | [QueryAllDepositResponse](#ununifi.cdp.QueryAllDepositResponse) | | GET | /ununifi/cdp/deposits/owners/{owner}/collateral-types/{collateral_type} | -### GenesisState -GenesisState defines the cdp module's genesis state. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.cdp.Params) | | | -| `cdps` | [Cdp](#ununifi.cdp.Cdp) | repeated | | -| `deposits` | [Deposit](#ununifi.cdp.Deposit) | repeated | | -| `starting_cdp_id` | [uint64](#uint64) | | | -| `gov_denom` | [string](#string) | | | -| `previous_accumulation_times` | [GenesisAccumulationTime](#ununifi.cdp.GenesisAccumulationTime) | repeated | | -| `total_principals` | [GenesisTotalPrincipal](#ununifi.cdp.GenesisTotalPrincipal) | repeated | this line is used by starport scaffolding # genesis/proto/state | + +## cdp/tx.proto + +### MsgCreateCdp +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `collateral_type` | [string](#string) | | | + - +### MsgCreateCdpResponse -### GenesisTotalPrincipal + +### MsgDeposit +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `depositor` | [string](#string) | | | +| `owner` | [string](#string) | | | +| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `collateral_type` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `collateral_type` | [string](#string) | | | -| `total_principal` | [string](#string) | | | + +### MsgDepositResponse + +### MsgDrawDebt +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `collateral_type` | [string](#string) | | | +| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + - +### MsgDrawDebtResponse - + - +### MsgLiquidate +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `keeper` | [string](#string) | | | +| `borrower` | [string](#string) | | | +| `collateral_type` | [string](#string) | | | + - - +### MsgLiquidateResponse -## cdp/query.proto + +### MsgRepayDebt +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `collateral_type` | [string](#string) | | | +| `payment` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### QueryAllAccountRequest +### MsgRepayDebtResponse + +### MsgWithdraw +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `depositor` | [string](#string) | | | +| `owner` | [string](#string) | | | +| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `collateral_type` | [string](#string) | | | + +### MsgWithdrawResponse + - + -### QueryAllAccountResponse + + +### Msg -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `accounts` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ----------------------------------------- | --------------------------------------------------------- | ----------- | --------- | -------- | +| `CreateCdp` | [MsgCreateCdp](#ununifi.cdp.MsgCreateCdp) | [MsgCreateCdpResponse](#ununifi.cdp.MsgCreateCdpResponse) | | | +| `Deposit` | [MsgDeposit](#ununifi.cdp.MsgDeposit) | [MsgDepositResponse](#ununifi.cdp.MsgDepositResponse) | | | +| `Withdraw` | [MsgWithdraw](#ununifi.cdp.MsgWithdraw) | [MsgWithdrawResponse](#ununifi.cdp.MsgWithdrawResponse) | | | +| `DrawDebt` | [MsgDrawDebt](#ununifi.cdp.MsgDrawDebt) | [MsgDrawDebtResponse](#ununifi.cdp.MsgDrawDebtResponse) | | | +| `RepayDebt` | [MsgRepayDebt](#ununifi.cdp.MsgRepayDebt) | [MsgRepayDebtResponse](#ununifi.cdp.MsgRepayDebtResponse) | | | +| `Liquidate` | [MsgLiquidate](#ununifi.cdp.MsgLiquidate) | [MsgLiquidateResponse](#ununifi.cdp.MsgLiquidateResponse) | | | + + + +## derivatives/derivatives.proto + - +### EventPriceIsNotFeeded -### QueryAllCdpRequest +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `asset` | [string](#string) | | | + +### Market -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `base_denom` | [string](#string) | | | +| `quote_denom` | [string](#string) | | | + +### PoolAssetConf +| Field | Type | Label | Description | +| --------------- | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `target_weight` | [string](#string) | | | + +### PoolMarketCap - +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------------- | -------- | ----------- | +| `quote_ticker` | [string](#string) | | | +| `total` | [string](#string) | | | +| `asset_info` | [PoolMarketCap.AssetInfo](#ununifi.derivatives.PoolMarketCap.AssetInfo) | repeated | | -### QueryAllCdpResponse + +### PoolMarketCap.AssetInfo +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | +| `price` | [string](#string) | | | +| `reserved` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cdp` | [AugmentedCdp](#ununifi.cdp.AugmentedCdp) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### PoolParams +| Field | Type | Label | Description | +| -------------------------------- | --------------------------------------------------- | -------- | ----------- | +| `quote_ticker` | [string](#string) | | | +| `base_lpt_mint_fee` | [string](#string) | | | +| `base_lpt_redeem_fee` | [string](#string) | | | +| `borrowing_fee_rate_per_hour` | [string](#string) | | | +| `report_liquidation_reward_rate` | [string](#string) | | | +| `report_levy_period_reward_rate` | [string](#string) | | | +| `accepted_assets_conf` | [PoolAssetConf](#ununifi.derivatives.PoolAssetConf) | repeated | | + +### Position +| Field | Type | Label | Description | +| ------------------------ | ------------------------------------------------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `market` | [Market](#ununifi.derivatives.Market) | | | +| `address` | [string](#string) | | | +| `opened_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `opened_height` | [uint64](#uint64) | | | +| `opened_base_rate` | [string](#string) | | | +| `opened_quote_rate` | [string](#string) | | | +| `remaining_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `levied_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `levied_amount_negative` | [bool](#bool) | | | +| `last_levied_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `position_instance` | [google.protobuf.Any](#google.protobuf.Any) | | | - + -### QueryAllDepositRequest +### QueriedPosition +| Field | Type | Label | Description | +| ------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `position` | [Position](#ununifi.derivatives.Position) | | | +| `valuation_profit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `remaining_margin_value` | [string](#string) | | | +| `effective_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `margin_maintenance_rate` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `collateral_type` | [string](#string) | | | + +### PositionType +| Name | Number | Description | +| ---------------- | ------ | ----------- | +| POSITION_UNKNOWN | 0 | | +| LONG | 1 | | +| SHORT | 2 | | + + + - + -### QueryAllDepositResponse + +## derivatives/perpetual_futures.proto + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `deposits` | [Deposit](#ununifi.cdp.Deposit) | repeated | | +### EventLossToLP +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `position_id` | [string](#string) | | | +| `loss_amount` | [string](#string) | | | + +### EventPerpetualFuturesPositionClosed +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `position_id` | [string](#string) | | | +| `position_size` | [string](#string) | | | +| `pnl_amount` | [string](#string) | | | +| `returning_amount` | [string](#string) | | | + - +### EventPerpetualFuturesPositionLevied -### QueryGetCdpRequest -this line is used by starport scaffolding # 3 +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `reward_recipient` | [string](#string) | | | +| `position_id` | [string](#string) | | | +| `remaining_margin` | [string](#string) | | | +| `reward_amount` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `collateral_type` | [string](#string) | | | +### EventPerpetualFuturesPositionLiquidated +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `reward_recipient` | [string](#string) | | | +| `position_id` | [string](#string) | | | +| `remaining_margin` | [string](#string) | | | +| `reward_amount` | [string](#string) | | | + +### EventPerpetualFuturesPositionOpened +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `position_id` | [string](#string) | | | + - +### PerpetualFuturesGrossPositionOfMarket -### QueryGetCdpResponse +| Field | Type | Label | Description | +| --------------------------------- | ------------------------------------------------- | ----- | ----------- | +| `market` | [Market](#ununifi.derivatives.Market) | | | +| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | +| `position_size_in_denom_exponent` | [string](#string) | | | + +### PerpetualFuturesParams -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cdp` | [AugmentedCdp](#ununifi.cdp.AugmentedCdp) | | | +| Field | Type | Label | Description | +| ------------------------------------------------- | ------------------------------------- | -------- | ----------- | +| `commission_rate` | [string](#string) | | | +| `margin_maintenance_rate` | [string](#string) | | | +| `imaginary_funding_rate_proportional_coefficient` | [string](#string) | | | +| `markets` | [Market](#ununifi.derivatives.Market) | repeated | | +| `max_leverage` | [uint32](#uint32) | | | + +### PerpetualFuturesPosition +| Field | Type | Label | Description | +| ------------------------ | ----------------------------------------------------------------------------------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `market` | [Market](#ununifi.derivatives.Market) | | | +| `address` | [string](#string) | | | +| `opened_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `opened_height` | [uint64](#uint64) | | | +| `opened_base_rate` | [string](#string) | | | +| `opened_quote_rate` | [string](#string) | | | +| `remaining_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `levied_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `levied_amount_negative` | [bool](#bool) | | | +| `last_levied_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `position_instance` | [PerpetualFuturesPositionInstance](#ununifi.derivatives.PerpetualFuturesPositionInstance) | | | + +### PerpetualFuturesPositionInstance - +| Field | Type | Label | Description | +| --------------- | ------------------------------------------------- | ----- | ----------- | +| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | +| `size` | [string](#string) | | | +| `leverage` | [uint32](#uint32) | | | -### QueryParamsRequest + + + + + + +## derivatives/perpetual_options.proto - + -### QueryParamsResponse +### PerpetualOptionsParams +| Field | Type | Label | Description | +| ------------------------------------------------- | ------------------------------------- | -------- | ----------- | +| `premium_commission_rate` | [string](#string) | | | +| `strike_commission_rate` | [string](#string) | | | +| `margin_maintenance_rate` | [string](#string) | | | +| `imaginary_funding_rate_proportional_coefficient` | [string](#string) | | | +| `markets` | [Market](#ununifi.derivatives.Market) | repeated | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.cdp.Params) | | | +### PerpetualOptionsPositionInstance +| Field | Type | Label | Description | +| --------------- | ------------------------------------------------- | ----- | ----------- | +| `option_type` | [OptionType](#ununifi.derivatives.OptionType) | | | +| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | +| `strike_price` | [string](#string) | | | +| `premium` | [string](#string) | | | + + +### OptionType - +| Name | Number | Description | +| -------------- | ------ | ----------- | +| OPTION_UNKNOWN | 0 | | +| CALL | 1 | | +| PUT | 2 | | - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.cdp.QueryParamsRequest) | [QueryParamsResponse](#ununifi.cdp.QueryParamsResponse) | | GET|/ununifi/cdp/params| -| `Cdp` | [QueryGetCdpRequest](#ununifi.cdp.QueryGetCdpRequest) | [QueryGetCdpResponse](#ununifi.cdp.QueryGetCdpResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/cdp/cdps/owners/{owner}/collateral-types/{collateral_type}/cdp| -| `CdpAll` | [QueryAllCdpRequest](#ununifi.cdp.QueryAllCdpRequest) | [QueryAllCdpResponse](#ununifi.cdp.QueryAllCdpResponse) | | GET|/ununifi/cdp/cdps| -| `AccountAll` | [QueryAllAccountRequest](#ununifi.cdp.QueryAllAccountRequest) | [QueryAllAccountResponse](#ununifi.cdp.QueryAllAccountResponse) | | GET|/ununifi/cdp/accounts| -| `DepositAll` | [QueryAllDepositRequest](#ununifi.cdp.QueryAllDepositRequest) | [QueryAllDepositResponse](#ununifi.cdp.QueryAllDepositResponse) | | GET|/ununifi/cdp/deposits/owners/{owner}/collateral-types/{collateral_type}| - + - - -## cdp/tx.proto +## derivatives/params.proto + +### Params - +| Field | Type | Label | Description | +| ------------------- | --------------------------------------------------------------------- | ----- | ----------- | +| `pool_params` | [PoolParams](#ununifi.derivatives.PoolParams) | | | +| `perpetual_futures` | [PerpetualFuturesParams](#ununifi.derivatives.PerpetualFuturesParams) | | | +| `perpetual_options` | [PerpetualOptionsParams](#ununifi.derivatives.PerpetualOptionsParams) | | | -### MsgCreateCdp + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `collateral_type` | [string](#string) | | | + + + +## derivatives/genesis.proto + +### GenesisState - +GenesisState defines the derivatives module's genesis state. -### MsgCreateCdpResponse +| Field | Type | Label | Description | +| -------------------------------------------- | --------------------------------------------------------------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.derivatives.Params) | | | +| `positions` | [Position](#ununifi.derivatives.Position) | repeated | | +| `pool_market_cap` | [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) | | | +| `perpetual_futures_gross_position_of_market` | [PerpetualFuturesGrossPositionOfMarket](#ununifi.derivatives.PerpetualFuturesGrossPositionOfMarket) | repeated | | + + + + + + - +## derivatives/query.proto -### MsgDeposit + +### QueryAddressPositionsRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `address` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `depositor` | [string](#string) | | | -| `owner` | [string](#string) | | | -| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `collateral_type` | [string](#string) | | | + +### QueryAddressPositionsResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `positions` | [QueriedPosition](#ununifi.derivatives.QueriedPosition) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### QueryAllPositionsRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### MsgDepositResponse +### QueryAllPositionsResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `positions` | [QueriedPosition](#ununifi.derivatives.QueriedPosition) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### QueryAvailableAssetInPoolByDenomRequest +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | + +### QueryAvailableAssetInPoolByDenomResponse - +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------- | ----- | ----------- | +| `available_asset` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -### MsgDrawDebt + +### QueryAvailableAssetsInPoolRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `collateral_type` | [string](#string) | | | -| `principal` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +### QueryAvailableAssetsInPoolResponse +| Field | Type | Label | Description | +| ------------------ | ----------------------------------------------------- | -------- | ----------- | +| `available_assets` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + +### QueryDLPTokenRateRequest + +### QueryDLPTokenRateResponse - +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | -------- | ----------- | +| `symbol` | [string](#string) | | | +| `rates` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -### MsgDrawDebtResponse + +### QueryEstimateDLPTokenAmountRequest +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `mint_denom` | [string](#string) | | | +| `amount` | [string](#string) | | | + +### QueryEstimateDLPTokenAmountResponse +| Field | Type | Label | Description | +| ---------------------- | ----------------------------------------------------- | ----- | ----------- | +| `estimated_dlp_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `deposit_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + - +### QueryEstimateRedeemAmountRequest -### MsgLiquidate +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `redeem_denom` | [string](#string) | | | +| `lpt_amount` | [string](#string) | | | + +### QueryEstimateRedeemAmountResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `keeper` | [string](#string) | | | -| `borrower` | [string](#string) | | | -| `collateral_type` | [string](#string) | | | +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryLiquidityProviderTokenNominalAPYRequest +| Field | Type | Label | Description | +| --------------- | --------------- | ----- | ----------- | +| `before_height` | [int64](#int64) | | | +| `after_height` | [int64](#int64) | | | + +### QueryLiquidityProviderTokenNominalAPYResponse - +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| `apy` | [string](#string) | | | -### MsgLiquidateResponse + +### QueryLiquidityProviderTokenRealAPYRequest +| Field | Type | Label | Description | +| --------------- | --------------- | ----- | ----------- | +| `before_height` | [int64](#int64) | | | +| `after_height` | [int64](#int64) | | | + +### QueryLiquidityProviderTokenRealAPYResponse +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| `apy` | [string](#string) | | | + - +### QueryParamsRequest -### MsgRepayDebt +QueryParamsRequest is request type for the Query/Params RPC method. + +### QueryParamsResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `collateral_type` | [string](#string) | | | -| `payment` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +QueryParamsResponse is response type for the Query/Params RPC method. +| Field | Type | Label | Description | +| -------- | ------------------------------------- | ----- | ----------------------------------------------- | +| `params` | [Params](#ununifi.derivatives.Params) | | params holds all the parameters of this module. | + +### QueryPerpetualFuturesMarketRequest +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `base_denom` | [string](#string) | | | +| `quote_denom` | [string](#string) | | | + - +### QueryPerpetualFuturesMarketResponse -### MsgRepayDebtResponse +| Field | Type | Label | Description | +| ---------------------- | ----------------- | ----- | ----------- | +| `price` | [string](#string) | | | +| `metrics_quote_ticker` | [string](#string) | | | +| `volume_24hours` | [string](#string) | | | +| `fees_24hours` | [string](#string) | | | +| `long_positions` | [string](#string) | | | +| `short_positions` | [string](#string) | | | + +### QueryPerpetualFuturesPositionSizeRequest +| Field | Type | Label | Description | +| --------------- | ------------------------------------------------- | ----- | ----------- | +| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | +| `address` | [string](#string) | | | + +### QueryPerpetualFuturesPositionSizeResponse +| Field | Type | Label | Description | +| ------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `total_position_size_usd` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### MsgWithdraw +### QueryPerpetualFuturesRequest + +### QueryPerpetualFuturesResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `depositor` | [string](#string) | | | -| `owner` | [string](#string) | | | -| `collateral` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `collateral_type` | [string](#string) | | | +| Field | Type | Label | Description | +| ---------------------- | ----------------------------------------------------- | ----- | ----------- | +| `metrics_quote_ticker` | [string](#string) | | | +| `volume_24hours` | [string](#string) | | | +| `fees_24hours` | [string](#string) | | | +| `long_positions` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `short_positions` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryPerpetualOptionsMarketRequest +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `base_denom` | [string](#string) | | | +| `quote_denom` | [string](#string) | | | + +### QueryPerpetualOptionsMarketResponse - + -### MsgWithdrawResponse +### QueryPerpetualOptionsRequest + +### QueryPerpetualOptionsResponse + +### QueryPoolRequest +this line is used by starport scaffolding # 3 - + - +### QueryPoolResponse - +| Field | Type | Label | Description | +| ---------------------- | --------------------------------------------------- | ----- | ----------- | +| `metrics_quote_ticker` | [string](#string) | | | +| `pool_market_cap` | [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) | | | +| `volume_24hours` | [string](#string) | | | +| `fees_24hours` | [string](#string) | | | + - +### QueryPositionRequest -### Msg +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `position_id` | [string](#string) | | | + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateCdp` | [MsgCreateCdp](#ununifi.cdp.MsgCreateCdp) | [MsgCreateCdpResponse](#ununifi.cdp.MsgCreateCdpResponse) | | | -| `Deposit` | [MsgDeposit](#ununifi.cdp.MsgDeposit) | [MsgDepositResponse](#ununifi.cdp.MsgDepositResponse) | | | -| `Withdraw` | [MsgWithdraw](#ununifi.cdp.MsgWithdraw) | [MsgWithdrawResponse](#ununifi.cdp.MsgWithdrawResponse) | | | -| `DrawDebt` | [MsgDrawDebt](#ununifi.cdp.MsgDrawDebt) | [MsgDrawDebtResponse](#ununifi.cdp.MsgDrawDebtResponse) | | | -| `RepayDebt` | [MsgRepayDebt](#ununifi.cdp.MsgRepayDebt) | [MsgRepayDebtResponse](#ununifi.cdp.MsgRepayDebtResponse) | | | -| `Liquidate` | [MsgLiquidate](#ununifi.cdp.MsgLiquidate) | [MsgLiquidateResponse](#ununifi.cdp.MsgLiquidateResponse) | | | +### QueryPositionResponse - +| Field | Type | Label | Description | +| ------------------------- | ----------------------------------------------------- | ----- | ----------- | +| `position` | [Position](#ununifi.derivatives.Position) | | | +| `valuation_profit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `margin_maintenance_rate` | [string](#string) | | | +| `effective_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + - - + -## derivatives/derivatives.proto + +### Query +Query defines the gRPC querier service. - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------- | -------------------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.derivatives.QueryParamsRequest) | [QueryParamsResponse](#ununifi.derivatives.QueryParamsResponse) | Parameters queries the parameters of the module. | GET | /ununifi/derivatives/params | +| `Pool` | [QueryPoolRequest](#ununifi.derivatives.QueryPoolRequest) | [QueryPoolResponse](#ununifi.derivatives.QueryPoolResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/derivatives/pool | +| `LiquidityProviderTokenRealAPY` | [QueryLiquidityProviderTokenRealAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYRequest) | [QueryLiquidityProviderTokenRealAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYResponse) | | GET | /ununifi/derivatives/liquidity-providers/real-apy | +| `LiquidityProviderTokenNominalAPY` | [QueryLiquidityProviderTokenNominalAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYRequest) | [QueryLiquidityProviderTokenNominalAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYResponse) | | GET | /ununifi/derivatives/liquidity-providers/nominal-apy | +| `PerpetualFutures` | [QueryPerpetualFuturesRequest](#ununifi.derivatives.QueryPerpetualFuturesRequest) | [QueryPerpetualFuturesResponse](#ununifi.derivatives.QueryPerpetualFuturesResponse) | | GET | /ununifi/derivatives/perpetual-futures | +| `PerpetualFuturesMarket` | [QueryPerpetualFuturesMarketRequest](#ununifi.derivatives.QueryPerpetualFuturesMarketRequest) | [QueryPerpetualFuturesMarketResponse](#ununifi.derivatives.QueryPerpetualFuturesMarketResponse) | | GET | /ununifi/derivatives/perpetual-futures/{base_denom}/{quote_denom} | +| `PerpetualOptions` | [QueryPerpetualOptionsRequest](#ununifi.derivatives.QueryPerpetualOptionsRequest) | [QueryPerpetualOptionsResponse](#ununifi.derivatives.QueryPerpetualOptionsResponse) | | GET | /ununifi/derivatives/perpetual-options | +| `PerpetualOptionsMarket` | [QueryPerpetualOptionsMarketRequest](#ununifi.derivatives.QueryPerpetualOptionsMarketRequest) | [QueryPerpetualOptionsMarketResponse](#ununifi.derivatives.QueryPerpetualOptionsMarketResponse) | | GET | /ununifi/derivatives/perpetual-options/{base_denom}/{quote_denom} | +| `AllPositions` | [QueryAllPositionsRequest](#ununifi.derivatives.QueryAllPositionsRequest) | [QueryAllPositionsResponse](#ununifi.derivatives.QueryAllPositionsResponse) | | GET | /ununifi/derivatives/positions | +| `Position` | [QueryPositionRequest](#ununifi.derivatives.QueryPositionRequest) | [QueryPositionResponse](#ununifi.derivatives.QueryPositionResponse) | | GET | /ununifi/derivatives/positions/{position_id} | +| `PerpetualFuturesPositionSize` | [QueryPerpetualFuturesPositionSizeRequest](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeRequest) | [QueryPerpetualFuturesPositionSizeResponse](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeResponse) | | GET | /ununifi/derivatives/positions/perpetual-futures/{position_type}/{address} | +| `AddressPositions` | [QueryAddressPositionsRequest](#ununifi.derivatives.QueryAddressPositionsRequest) | [QueryAddressPositionsResponse](#ununifi.derivatives.QueryAddressPositionsResponse) | | GET | /ununifi/derivatives/{address}/positions | +| `DLPTokenRates` | [QueryDLPTokenRateRequest](#ununifi.derivatives.QueryDLPTokenRateRequest) | [QueryDLPTokenRateResponse](#ununifi.derivatives.QueryDLPTokenRateResponse) | | GET | /ununifi/derivatives/pools/dlp | +| `EstimateDLPTokenAmount` | [QueryEstimateDLPTokenAmountRequest](#ununifi.derivatives.QueryEstimateDLPTokenAmountRequest) | [QueryEstimateDLPTokenAmountResponse](#ununifi.derivatives.QueryEstimateDLPTokenAmountResponse) | | GET | /ununifi/derivatives/estimate-dlp-token-amount/{mint_denom}/{amount} | +| `EstimateRedeemAmount` | [QueryEstimateRedeemAmountRequest](#ununifi.derivatives.QueryEstimateRedeemAmountRequest) | [QueryEstimateRedeemAmountResponse](#ununifi.derivatives.QueryEstimateRedeemAmountResponse) | | GET | /ununifi/derivatives/estimate-redeem-amount/{redeem_denom}/{lpt_amount} | +| `AvailableAssetInPoolByDenom` | [QueryAvailableAssetInPoolByDenomRequest](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomRequest) | [QueryAvailableAssetInPoolByDenomResponse](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomResponse) | | GET | /ununifi/derivatives/pools/available-asset/{denom} | +| `AvailableAssetsInPool` | [QueryAvailableAssetsInPoolRequest](#ununifi.derivatives.QueryAvailableAssetsInPoolRequest) | [QueryAvailableAssetsInPoolResponse](#ununifi.derivatives.QueryAvailableAssetsInPoolResponse) | | GET | /ununifi/derivatives/pools/available-assets | -### EventPriceIsNotFeeded + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `asset` | [string](#string) | | | +## derivatives/tx.proto + +### MsgClosePosition +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `position_id` | [string](#string) | | | + +### MsgClosePositionResponse - + -### Market +### MsgDepositToPool +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_denom` | [string](#string) | | | -| `quote_denom` | [string](#string) | | | +### MsgDepositToPoolResponse + +### MsgOpenPosition +| Field | Type | Label | Description | +| ------------------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `market` | [Market](#ununifi.derivatives.Market) | | | +| `position_instance` | [google.protobuf.Any](#google.protobuf.Any) | | | + +### MsgOpenPositionResponse - + -### PoolAssetConf +### MsgReportLevyPeriod +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `position_id` | [string](#string) | | | +| `reward_recipient` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `target_weight` | [string](#string) | | | +### MsgReportLevyPeriodResponse + +### MsgReportLiquidation +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `position_id` | [string](#string) | | | +| `reward_recipient` | [string](#string) | | | + +### MsgReportLiquidationResponse - + -### PoolMarketCap +### MsgWithdrawFromPool +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `lpt_amount` | [string](#string) | | | +| `redeem_denom` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `quote_ticker` | [string](#string) | | | -| `total` | [string](#string) | | | -| `asset_info` | [PoolMarketCap.AssetInfo](#ununifi.derivatives.PoolMarketCap.AssetInfo) | repeated | | +### MsgWithdrawFromPoolResponse + + + + +### Msg - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `DepositToPool` | [MsgDepositToPool](#ununifi.derivatives.MsgDepositToPool) | [MsgDepositToPoolResponse](#ununifi.derivatives.MsgDepositToPoolResponse) | | | +| `WithdrawFromPool` | [MsgWithdrawFromPool](#ununifi.derivatives.MsgWithdrawFromPool) | [MsgWithdrawFromPoolResponse](#ununifi.derivatives.MsgWithdrawFromPoolResponse) | | | +| `OpenPosition` | [MsgOpenPosition](#ununifi.derivatives.MsgOpenPosition) | [MsgOpenPositionResponse](#ununifi.derivatives.MsgOpenPositionResponse) | | | +| `ClosePosition` | [MsgClosePosition](#ununifi.derivatives.MsgClosePosition) | [MsgClosePositionResponse](#ununifi.derivatives.MsgClosePositionResponse) | | | +| `ReportLiquidation` | [MsgReportLiquidation](#ununifi.derivatives.MsgReportLiquidation) | [MsgReportLiquidationResponse](#ununifi.derivatives.MsgReportLiquidationResponse) | | | +| `ReportLevyPeriod` | [MsgReportLevyPeriod](#ununifi.derivatives.MsgReportLevyPeriod) | [MsgReportLevyPeriodResponse](#ununifi.derivatives.MsgReportLevyPeriodResponse) | | | -### PoolMarketCap.AssetInfo + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | -| `price` | [string](#string) | | | -| `reserved` | [string](#string) | | | +## ecosystem-incentive/ecosystem_incentive.proto + +### IncentiveUnit +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------ | -------- | ----------- | +| `id` | [string](#string) | | | +| `subject_info_lists` | [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) | repeated | | + +### IncentiveUnitIdsByAddr - +| Field | Type | Label | Description | +| -------------------- | ----------------- | -------- | ----------- | +| `address` | [string](#string) | | | +| `incentive_unit_ids` | [string](#string) | repeated | | -### PoolParams + +### RewardStore +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------- | -------- | ----------- | +| `subject_addr` | [string](#string) | | | +| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `quote_ticker` | [string](#string) | | | -| `base_lpt_mint_fee` | [string](#string) | | | -| `base_lpt_redeem_fee` | [string](#string) | | | -| `borrowing_fee_rate_per_hour` | [string](#string) | | | -| `report_liquidation_reward_rate` | [string](#string) | | | -| `report_levy_period_reward_rate` | [string](#string) | | | -| `accepted_assets_conf` | [PoolAssetConf](#ununifi.derivatives.PoolAssetConf) | repeated | | + +### SubjectInfo +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `subject_addr` | [string](#string) | | | +| `weight` | [string](#string) | | | + + + - + -### Position + + +## ecosystem-incentive/event.proto -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `market` | [Market](#ununifi.derivatives.Market) | | | -| `address` | [string](#string) | | | -| `opened_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `opened_height` | [uint64](#uint64) | | | -| `opened_base_rate` | [string](#string) | | | -| `opened_quote_rate` | [string](#string) | | | -| `remaining_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `last_levied_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `position_instance` | [google.protobuf.Any](#google.protobuf.Any) | | | + +### EventDeletedNftIdRecordedForFrontendReward +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventFailedParsingMemoInputs +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `memo` | [string](#string) | | | - + -### QueriedPosition +### EventNotRecordedNftId +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position` | [Position](#ununifi.derivatives.Position) | | | -| `valuation_profit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `remaining_margin_value` | [string](#string) | | | -| `effective_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `margin_maintenance_rate` | [string](#string) | | | +### EventNotRegisteredIncentiveUnitId +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventRecordedIncentiveUnitId +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | - + +### EventRegister - +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------ | -------- | ----------- | +| `incentive_unit_id` | [string](#string) | | | +| `subject_info_lists` | [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) | repeated | | -### PositionType + +### EventUpdatedReward -| Name | Number | Description | -| ---- | ------ | ----------- | -| POSITION_UNKNOWN | 0 | | -| LONG | 1 | | -| SHORT | 2 | | +| Field | Type | Label | Description | +| ------------------- | ----------------------------------------------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | +| `earned_reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + - +### EventVersionUnmatched - +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `unmatched_version` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | - + +### EventWithdrawAllRewards +| Field | Type | Label | Description | +| ----------------------- | ----------------------------------------------------- | -------- | ----------- | +| `sender` | [string](#string) | | | +| `all_withdrawn_rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - + -## derivatives/perpetual_futures.proto +### EventWithdrawReward +| Field | Type | Label | Description | +| ------------------ | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `withdrawn_reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + - + -### EventLossToLP + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position_id` | [string](#string) | | | -| `loss_amount` | [string](#string) | | | + +## ecosystem-incentive/params.proto + +### Params +Params defines the parameters for the module. +| Field | Type | Label | Description | +| ------------------------------ | -------------------------------------------------------- | -------- | ----------- | +| `reward_params` | [RewardParams](#ununifi.ecosystemincentive.RewardParams) | repeated | | +| `max_incentive_unit_id_len` | [uint64](#uint64) | | | +| `max_subject_info_num_in_unit` | [uint64](#uint64) | | | - + -### EventPerpetualFuturesPositionClosed +### RewardParams +RewardParams defines which module have which rewards type and rate +to maintain the correctness of the fee rate in a module +e.g. if nftmarket module have "Frontend" and "Collection" incentive, +the combined those rates for the incentive cannot be exceed 1 +| Field | Type | Label | Description | +| ------------- | ---------------------------------------------------- | -------- | ----------- | +| `module_name` | [string](#string) | | | +| `reward_rate` | [RewardRate](#ununifi.ecosystemincentive.RewardRate) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `position_id` | [string](#string) | | | -| `fee_amount` | [string](#string) | | | -| `trade_amount` | [string](#string) | | | -| `returning_amount` | [string](#string) | | | + +### RewardRate +RewardRate defines the ratio to take reward for a specific reward_type. +The total sum of reward_rate in a module cannot be exceed 1 +| Field | Type | Label | Description | +| ------------- | ---------------------------------------------------- | ----- | ----------- | +| `reward_type` | [RewardType](#ununifi.ecosystemincentive.RewardType) | | | +| `rate` | [string](#string) | | | + + - +### RewardType -### EventPerpetualFuturesPositionLevied +At first, we go with this one type. +NFTMARKET_FRONTEND type reward will be disributed for the creators of frontend of UnUniFi's services. +| Name | Number | Description | +| ------------------ | ------ | ----------- | +| NFTMARKET_FRONTEND | 0 | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward_recipient` | [string](#string) | | | -| `position_id` | [string](#string) | | | -| `remaining_margin` | [string](#string) | | | -| `reward_amount` | [string](#string) | | | + + + + +## ecosystem-incentive/genesis.proto + - +### GenesisState -### EventPerpetualFuturesPositionLiquidated +GenesisState defines the ecosystemincentive module's genesis state. +| Field | Type | Label | Description | +| ----------------- | ---------------------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.ecosystemincentive.Params) | | | +| `incentive_units` | [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) | repeated | | +| `reward_stores` | [RewardStore](#ununifi.ecosystemincentive.RewardStore) | repeated | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward_recipient` | [string](#string) | | | -| `position_id` | [string](#string) | | | -| `remaining_margin` | [string](#string) | | | -| `reward_amount` | [string](#string) | | | + + + + + +## ecosystem-incentive/memo.proto - + -### EventPerpetualFuturesPositionOpened +### MemoInputs +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `version` | [string](#string) | | | +| `incentive_unit_id` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `position_id` | [string](#string) | | | + + + + + +## ecosystem-incentive/query.proto - + -### PerpetualFuturesGrossPositionOfMarket +### QueryAllRewardsRequest +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `subject_addr` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market` | [Market](#ununifi.derivatives.Market) | | | -| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | -| `position_size_in_denom_exponent` | [string](#string) | | | +### QueryAllRewardsResponse +| Field | Type | Label | Description | +| --------- | ------------------------------------------------------ | ----- | ----------- | +| `rewards` | [RewardStore](#ununifi.ecosystemincentive.RewardStore) | | | + +### QueryIncentiveUnitIdsByAddrRequest +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `address` | [string](#string) | | | + - +### QueryIncentiveUnitIdsByAddrResponse -### PerpetualFuturesParams +| Field | Type | Label | Description | +| ---------------------------- | ---------------------------------------------------------------------------- | ----- | ----------- | +| `incentive_unit_ids_by_addr` | [IncentiveUnitIdsByAddr](#ununifi.ecosystemincentive.IncentiveUnitIdsByAddr) | | | + +### QueryIncentiveUnitRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `commission_rate` | [string](#string) | | | -| `margin_maintenance_rate` | [string](#string) | | | -| `imaginary_funding_rate_proportional_coefficient` | [string](#string) | | | -| `markets` | [Market](#ununifi.derivatives.Market) | repeated | | -| `max_leverage` | [uint32](#uint32) | | | +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | + +### QueryIncentiveUnitResponse +| Field | Type | Label | Description | +| ---------------- | ---------------------------------------------------------- | ----- | ----------- | +| `incentive_unit` | [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) | | | + +### QueryParamsRequest - + -### PerpetualFuturesPosition +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | -------------------------------------------- | ----- | ----------------------------------------------- | +| `params` | [Params](#ununifi.ecosystemincentive.Params) | | params holds all the parameters of this module. | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `market` | [Market](#ununifi.derivatives.Market) | | | -| `address` | [string](#string) | | | -| `opened_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `opened_height` | [uint64](#uint64) | | | -| `opened_base_rate` | [string](#string) | | | -| `opened_quote_rate` | [string](#string) | | | -| `remaining_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `last_levied_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `position_instance` | [PerpetualFuturesPositionInstance](#ununifi.derivatives.PerpetualFuturesPositionInstance) | | | +### QueryRecordedIncentiveUnitIdRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### QueryRecordedIncentiveUnitIdResponse +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `incentive_unit_id` | [string](#string) | | | + - +### QueryRewardRequest -### PerpetualFuturesPositionInstance +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `subject_addr` | [string](#string) | | | +| `denom` | [string](#string) | | | + +### QueryRewardResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | -| `size` | [string](#string) | | | -| `leverage` | [uint32](#uint32) | | | +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + - +### Query - +Query defines the gRPC querier service. - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------- | --------------------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.ecosystemincentive.QueryParamsRequest) | [QueryParamsResponse](#ununifi.ecosystemincentive.QueryParamsResponse) | Parameters queries the parameters of the module. | GET | /ununifi/ecosystem_incentive/params | +| `IncentiveUnit` | [QueryIncentiveUnitRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitRequest) | [QueryIncentiveUnitResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitResponse) | | GET | /ununifi/ecosystem_incentive/incentive_unit/{incentive_unit_id} | +| `AllRewards` | [QueryAllRewardsRequest](#ununifi.ecosystemincentive.QueryAllRewardsRequest) | [QueryAllRewardsResponse](#ununifi.ecosystemincentive.QueryAllRewardsResponse) | | GET | /ununifi/ecosystem_incentive/all_rewards/{subject_addr} | +| `Reward` | [QueryRewardRequest](#ununifi.ecosystemincentive.QueryRewardRequest) | [QueryRewardResponse](#ununifi.ecosystemincentive.QueryRewardResponse) | | GET | /ununifi/ecosystem_incentive/reward/{subject_addr}/{denom} | +| `RecordedIncentiveUnitId` | [QueryRecordedIncentiveUnitIdRequest](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdRequest) | [QueryRecordedIncentiveUnitIdResponse](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdResponse) | | GET | /ununifi/ecosystem_incentive/recorded_incentive_unit_id/{class_id}/{nft_id} | +| `IncentiveUnitIdsByAddr` | [QueryIncentiveUnitIdsByAddrRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrRequest) | [QueryIncentiveUnitIdsByAddrResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrResponse) | | GET | /ununifi/ecosystem_incentive/incentive_unit_ids_by_addr/{address} | + - - -## derivatives/perpetual_options.proto +## ecosystem-incentive/tx.proto + +### MsgRegister - +| Field | Type | Label | Description | +| ------------------- | ----------------- | -------- | ----------- | +| `sender` | [string](#string) | | | +| `incentive_unit_id` | [string](#string) | | | +| `subject_addrs` | [string](#string) | repeated | | +| `weights` | [string](#string) | repeated | | -### PerpetualOptionsParams + +### MsgRegisterResponse + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `premium_commission_rate` | [string](#string) | | | -| `strike_commission_rate` | [string](#string) | | | -| `margin_maintenance_rate` | [string](#string) | | | -| `imaginary_funding_rate_proportional_coefficient` | [string](#string) | | | -| `markets` | [Market](#ununifi.derivatives.Market) | repeated | | +### MsgWithdrawAllRewards +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | + +### MsgWithdrawAllRewardsResponse + +### MsgWithdrawReward - +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `denom` | [string](#string) | | | -### PerpetualOptionsPositionInstance + + +### MsgWithdrawRewardResponse + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `option_type` | [OptionType](#ununifi.derivatives.OptionType) | | | -| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | -| `strike_price` | [string](#string) | | | -| `premium` | [string](#string) | | | + + +### Msg +Msg defines the Msg service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| -------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | --------- | -------- | +| `Register` | [MsgRegister](#ununifi.ecosystemincentive.MsgRegister) | [MsgRegisterResponse](#ununifi.ecosystemincentive.MsgRegisterResponse) | | | +| `WithdrawAllRewards` | [MsgWithdrawAllRewards](#ununifi.ecosystemincentive.MsgWithdrawAllRewards) | [MsgWithdrawAllRewardsResponse](#ununifi.ecosystemincentive.MsgWithdrawAllRewardsResponse) | | | +| `WithdrawReward` | [MsgWithdrawReward](#ununifi.ecosystemincentive.MsgWithdrawReward) | [MsgWithdrawRewardResponse](#ununifi.ecosystemincentive.MsgWithdrawRewardResponse) | | | - + + - + -### OptionType +## ethereum/signdoc.proto + + +### SignDocForMetamask -| Name | Number | Description | -| ---- | ------ | ----------- | -| OPTION_UNKNOWN | 0 | | -| CALL | 1 | | -| PUT | 2 | | +| Field | Type | Label | Description | +| ---------------- | --------------------------------------------------------- | ----- | ----------- | +| `body` | [cosmos.tx.v1beta1.TxBody](#cosmos.tx.v1beta1.TxBody) | | | +| `auth_info` | [cosmos.tx.v1beta1.AuthInfo](#cosmos.tx.v1beta1.AuthInfo) | | | +| `chain_id` | [string](#string) | | | +| `account_number` | [uint64](#uint64) | | | + @@ -1969,30 +2464,79 @@ Query defines the gRPC querier service. + - - -## derivatives/params.proto +## incentive/incentive.proto + +### BaseClaim - +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + +### BaseMultiClaim + +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | -------- | ----------- | +| `owner` | [string](#string) | | | +| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + +### CdpMintingClaim + +| Field | Type | Label | Description | +| ---------------- | --------------------------------------------- | -------- | ----------- | +| `base_claim` | [BaseClaim](#ununifi.incentive.BaseClaim) | | | +| `reward_indexes` | [RewardIndex](#ununifi.incentive.RewardIndex) | repeated | | + + + +### Multiplier + +| Field | Type | Label | Description | +| --------------- | ----------------- | ----- | ----------- | +| `name` | [string](#string) | | | +| `months_lockup` | [int64](#int64) | | | +| `factor` | [string](#string) | | | + + ### Params +| Field | Type | Label | Description | +| ---------------------------- | ------------------------------------------------------- | -------- | ----------- | +| `cdp_minting_reward_periods` | [RewardPeriod](#ununifi.incentive.RewardPeriod) | repeated | | +| `claim_multipliers` | [Multiplier](#ununifi.incentive.Multiplier) | repeated | | +| `claim_end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pool_params` | [PoolParams](#ununifi.derivatives.PoolParams) | | | -| `perpetual_futures` | [PerpetualFuturesParams](#ununifi.derivatives.PerpetualFuturesParams) | | | -| `perpetual_options` | [PerpetualOptionsParams](#ununifi.derivatives.PerpetualOptionsParams) | | | +### RewardIndex +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `collateral_type` | [string](#string) | | | +| `reward_factor` | [string](#string) | | | + +### RewardPeriod +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------- | ----- | ----------- | +| `active` | [bool](#bool) | | | +| `collateral_type` | [string](#string) | | | +| `start` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `rewards_per_second` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | @@ -2002,31 +2546,42 @@ Query defines the gRPC querier service. + - - -## derivatives/genesis.proto +## incentive/genesis.proto + +### GenesisAccumulationTime - +| Field | Type | Label | Description | +| ---------------------------- | ------------------------------------------------------- | ----- | ----------- | +| `collateral_type` | [string](#string) | | | +| `previous_accumulation_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -### GenesisState -GenesisState defines the derivatives module's genesis state. + +### GenesisDenoms -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.derivatives.Params) | | | -| `positions` | [Position](#ununifi.derivatives.Position) | repeated | | -| `pool_market_cap` | [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) | | | -| `perpetual_futures_gross_position_of_market` | [PerpetualFuturesGrossPositionOfMarket](#ununifi.derivatives.PerpetualFuturesGrossPositionOfMarket) | repeated | | +| Field | Type | Label | Description | +| -------------------------- | ----------------- | ----- | ----------- | +| `principal_denom` | [string](#string) | | | +| `cdp_minting_reward_denom` | [string](#string) | | | + +### GenesisState +GenesisState defines the incentive module's genesis state. +| Field | Type | Label | Description | +| ------------------------ | --------------------------------------------------------------------- | -------- | --------------------------------------------------------------- | +| `params` | [Params](#ununifi.incentive.Params) | | | +| `cdp_accumulation_times` | [GenesisAccumulationTime](#ununifi.incentive.GenesisAccumulationTime) | repeated | | +| `cdp_minting_claims` | [CdpMintingClaim](#ununifi.incentive.CdpMintingClaim) | repeated | | +| `denoms` | [GenesisDenoms](#ununifi.incentive.GenesisDenoms) | | this line is used by starport scaffolding # genesis/proto/state | @@ -2036,809 +2591,1544 @@ GenesisState defines the derivatives module's genesis state. + - - -## derivatives/query.proto +## incentive/query.proto + +### QueryParamsRequest - + -### QueryAddressPositionsRequest +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | ----------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.incentive.Params) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + + + +### Query +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ----------------------------------------------------------- | ------------------------------------------------------------- | --------------------------------------------- | --------- | ------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.incentive.QueryParamsRequest) | [QueryParamsResponse](#ununifi.incentive.QueryParamsResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/incentive/params | - + -### QueryAddressPositionsResponse + + +## incentive/tx.proto -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `positions` | [QueriedPosition](#ununifi.derivatives.QueriedPosition) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### MsgClaimCdpMintingReward +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `multiplier_name` | [string](#string) | | | + +### MsgClaimCdpMintingRewardResponse + - + -### QueryAllPositionsRequest + + +### Msg -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `ClaimCdpMintingReward` | [MsgClaimCdpMintingReward](#ununifi.incentive.MsgClaimCdpMintingReward) | [MsgClaimCdpMintingRewardResponse](#ununifi.incentive.MsgClaimCdpMintingRewardResponse) | | | + + + +## nftmarket/nftmarket.proto + - +### BidId -### QueryAllPositionsResponse +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `bidder` | [string](#string) | | | + + +### EventBorrow +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `borrower` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `positions` | [QueriedPosition](#ununifi.derivatives.QueriedPosition) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### EventCancelBid +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventCancelListNfting +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | - + -### QueryAvailableAssetInPoolByDenomRequest +### EventEndListNfting +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | +### EventExpandListingPeriod +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventLiquidate +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `liquidator` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + - +### EventListNft -### QueryAvailableAssetInPoolByDenomResponse +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventPayFullBid -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `available_asset` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventPlaceBid +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | + +### EventRepay - +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `repayer` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | -### QueryAvailableAssetsInPoolRequest + +### EventSellingDecision +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### Liquidation +| Field | Type | Label | Description | +| ------------------ | ------------------------------------------------------- | ----- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `liquidation_date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + - +### Liquidations -### QueryAvailableAssetsInPoolResponse +| Field | Type | Label | Description | +| ------------------ | --------------------------------------------- | -------- | ----------- | +| `liquidation` | [Liquidation](#ununifi.nftmarket.Liquidation) | | | +| `next_liquidation` | [Liquidation](#ununifi.nftmarket.Liquidation) | repeated | | + +### ListedClass -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `available_assets` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_ids` | [string](#string) | repeated | | + +### Loan +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `loan` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### NftBid - +| Field | Type | Label | Description | +| ---------------------- | ------------------------------------------------------- | -------- | ------------------------------------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `bidder` | [string](#string) | | | +| `bid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `deposit_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `paid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `bidding_period` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `deposit_lending_rate` | [string](#string) | | | +| `automatic_payment` | [bool](#bool) | | | +| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `interest_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `borrowings` | [borrowing](#ununifi.nftmarket.borrowing) | repeated | lister borrowing bidder info | +| `id` | [BidId](#ununifi.nftmarket.BidId) | | todo remove nft_id,bidder then use it | -### QueryDLPTokenRateRequest + +### NftIdentifier +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### NftInfo +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | + - +### NftListing -### QueryDLPTokenRateResponse +| Field | Type | Label | Description | +| ------------------------ | ------------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `owner` | [string](#string) | | | +| `listing_type` | [ListingType](#ununifi.nftmarket.ListingType) | | | +| `state` | [ListingState](#ununifi.nftmarket.ListingState) | | | +| `bid_token` | [string](#string) | | | +| `minimum_deposit_rate` | [string](#string) | | | +| `automatic_refinancing` | [bool](#bool) | | | +| `started_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `full_payment_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `successful_bid_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `auto_relisted_count` | [uint64](#uint64) | | | +| `collected_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `minimum_bidding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | | + +### Params -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `symbol` | [string](#string) | | | -| `rates` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| Field | Type | Label | Description | +| ----------------------------------------- | ----------------------------------------------------- | -------- | ----------- | +| `min_staking_for_listing` | [string](#string) | | | +| `default_bid_active_rank` | [uint64](#uint64) | | | +| `bid_tokens` | [string](#string) | repeated | | +| `auto_relisting_count_if_no_bid` | [uint64](#uint64) | | | +| `nft_listing_delay_seconds` | [uint64](#uint64) | | | +| `nft_listing_period_initial` | [uint64](#uint64) | | | +| `nft_listing_cancel_required_seconds` | [uint64](#uint64) | | | +| `nft_listing_cancel_fee_percentage` | [uint64](#uint64) | | | +| `nft_listing_gap_time` | [uint64](#uint64) | | | +| `bid_cancel_required_seconds` | [uint64](#uint64) | | | +| `bid_token_disburse_seconds_after_cancel` | [uint64](#uint64) | | | +| `nft_listing_full_payment_period` | [uint64](#uint64) | | | +| `nft_listing_nft_delivery_period` | [uint64](#uint64) | | | +| `nft_creator_share_percentage` | [uint64](#uint64) | | | +| `market_administrator` | [string](#string) | | | +| `nft_listing_commission_fee` | [uint64](#uint64) | | | +| `nft_listing_extend_seconds` | [uint64](#uint64) | | | +| `nft_listing_period_extend_fee_per_hour` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### PaymentStatus +| Field | Type | Label | Description | +| ------------------- | ------------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `bidder` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `automatic_payment` | [bool](#bool) | | | +| `paid_amount` | [string](#string) | | | +| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `state` | [ListingState](#ununifi.nftmarket.ListingState) | | | +| `all_paid` | [bool](#bool) | | | + +### borrowing - +| Field | Type | Label | Description | +| ---------------------- | ------------------------------------------------------- | ----- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `paid_interest_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `start_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -### QueryEstimateDLPTokenAmountRequest + + +### ListingState -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `mint_denom` | [string](#string) | | | -| `amount` | [string](#string) | | | +| Name | Number | Description | +| ---------------- | ------ | ----------- | +| LISTING | 0 | | +| BIDDING | 1 | | +| SELLING_DECISION | 2 | | +| END_LISTING | 3 | | +| SUCCESSFUL_BID | 4 | | + +### ListingType +| Name | Number | Description | +| ------------------------ | ------ | ----------- | +| DIRECT_ASSET_BORROW | 0 | | +| SYNTHETIC_ASSET_CREATION | 1 | | +| LATE_SHIPPING | 2 | | + + - + -### QueryEstimateDLPTokenAmountResponse + + +## nftmarket/genesis.proto -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `estimated_dlp_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `deposit_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### GenesisState +GenesisState defines the nftmarket module's genesis state. +| Field | Type | Label | Description | +| ---------------- | ------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.nftmarket.Params) | | | +| `listings` | [NftListing](#ununifi.nftmarket.NftListing) | repeated | | +| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | +| `cancelled_bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | +| `loans` | [Loan](#ununifi.nftmarket.Loan) | repeated | | + + - + -### QueryEstimateRedeemAmountRequest + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `redeem_denom` | [string](#string) | | | -| `lpt_amount` | [string](#string) | | | +## nftmarket/query.proto + +### NftListingDetail +| Field | Type | Label | Description | +| ---------- | ------------------------------------------- | ----- | ----------- | +| `listing` | [NftListing](#ununifi.nftmarket.NftListing) | | | +| `nft_info` | [NftInfo](#ununifi.nftmarket.NftInfo) | | | + +### QueryBidderBidsRequest - +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | -### QueryEstimateRedeemAmountResponse + +### QueryBidderBidsResponse +| Field | Type | Label | Description | +| ------ | ----------------------------------- | -------- | ----------- | +| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryCDPsListRequest + +### QueryCDPsListResponse + +### QueryLiquidationRequest - +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | -### QueryLiquidityProviderTokenNominalAPYRequest + +### QueryLiquidationResponse +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------- | ----- | ----------- | +| `liquidations` | [Liquidations](#ununifi.nftmarket.Liquidations) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `before_height` | [int64](#int64) | | | -| `after_height` | [int64](#int64) | | | + +### QueryListedClassRequest +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_limit` | [int32](#int32) | | | + +### QueryListedClassResponse +| Field | Type | Label | Description | +| ------------- | ------------------------------------- | -------- | ----------- | +| `class_id` | [string](#string) | | | +| `name` | [string](#string) | | | +| `description` | [string](#string) | | | +| `symbol` | [string](#string) | | | +| `uri` | [string](#string) | | | +| `urihash` | [string](#string) | | | +| `nfts` | [NftInfo](#ununifi.nftmarket.NftInfo) | repeated | | +| `nft_count` | [uint64](#uint64) | | | - + -### QueryLiquidityProviderTokenNominalAPYResponse +### QueryListedClassesRequest +| Field | Type | Label | Description | +| ----------- | --------------- | ----- | ----------- | +| `nft_limit` | [int32](#int32) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `apy` | [string](#string) | | | +### QueryListedClassesResponse +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------------------------- | -------- | ----------- | +| `classes` | [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) | repeated | | + +### QueryListedNftsRequest +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | + - +### QueryListedNftsResponse -### QueryLiquidityProviderTokenRealAPYRequest +| Field | Type | Label | Description | +| ---------- | ------------------------------------------------------- | -------- | ----------- | +| `listings` | [NftListingDetail](#ununifi.nftmarket.NftListingDetail) | repeated | | + +### QueryLoanRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `before_height` | [int64](#int64) | | | -| `after_height` | [int64](#int64) | | | +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### QueryLoanResponse +| Field | Type | Label | Description | +| ----------------- | ------------------------------- | ----- | ----------- | +| `loan` | [Loan](#ununifi.nftmarket.Loan) | | | +| `borrowing_limit` | [string](#string) | | | + +### QueryLoansRequest - + -### QueryLiquidityProviderTokenRealAPYResponse +### QueryLoansResponse +| Field | Type | Label | Description | +| ------- | ------------------------------- | -------- | ----------- | +| `loans` | [Loan](#ununifi.nftmarket.Loan) | repeated | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `apy` | [string](#string) | | | +### QueryNftBidsRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### QueryNftBidsResponse +| Field | Type | Label | Description | +| ------ | ----------------------------------- | -------- | ----------- | +| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | + - +### QueryNftListingRequest -### QueryParamsRequest -QueryParamsRequest is request type for the Query/Params RPC method. +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### QueryNftListingResponse +| Field | Type | Label | Description | +| --------- | ------------------------------------------- | ----- | ----------- | +| `listing` | [NftListing](#ununifi.nftmarket.NftListing) | | | + +### QueryParamsRequest - + ### QueryParamsResponse -QueryParamsResponse is response type for the Query/Params RPC method. +| Field | Type | Label | Description | +| -------- | ----------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.nftmarket.Params) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.derivatives.Params) | | params holds all the parameters of this module. | + +### QueryPaymentStatusRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `bidder` | [string](#string) | | | + +### QueryPaymentStatusResponse +| Field | Type | Label | Description | +| --------------- | ------------------------------------------------- | ----- | ----------- | +| `paymentStatus` | [PaymentStatus](#ununifi.nftmarket.PaymentStatus) | | | - + -### QueryPerpetualFuturesMarketRequest +### QueryRewardsRequest +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `address` | [uint64](#uint64) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_denom` | [string](#string) | | | -| `quote_denom` | [string](#string) | | | +### QueryRewardsResponse +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ----------- | +| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + - +### Query -### QueryPerpetualFuturesMarketResponse +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| --------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------- | --------- | -------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.nftmarket.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmarket.QueryParamsResponse) | | GET | /ununifi/nftmarket/params | +| `NftListing` | [QueryNftListingRequest](#ununifi.nftmarket.QueryNftListingRequest) | [QueryNftListingResponse](#ununifi.nftmarket.QueryNftListingResponse) | | GET | /ununifi/nftmarket/nft_listing/{class_id}/{nft_id} | +| `ListedNfts` | [QueryListedNftsRequest](#ununifi.nftmarket.QueryListedNftsRequest) | [QueryListedNftsResponse](#ununifi.nftmarket.QueryListedNftsResponse) | | GET | /ununifi/nftmarket/listed_nfts | +| `ListedClasses` | [QueryListedClassesRequest](#ununifi.nftmarket.QueryListedClassesRequest) | [QueryListedClassesResponse](#ununifi.nftmarket.QueryListedClassesResponse) | | GET | /ununifi/nftmarket/listed_classes | +| `ListedClass` | [QueryListedClassRequest](#ununifi.nftmarket.QueryListedClassRequest) | [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) | | GET | /ununifi/nftmarket/listed_class/{class_id}/{nft_limit} | +| `Loans` | [QueryLoansRequest](#ununifi.nftmarket.QueryLoansRequest) | [QueryLoansResponse](#ununifi.nftmarket.QueryLoansResponse) | | GET | /ununifi/nftmarket/loans | +| `Loan` | [QueryLoanRequest](#ununifi.nftmarket.QueryLoanRequest) | [QueryLoanResponse](#ununifi.nftmarket.QueryLoanResponse) | | GET | /ununifi/nftmarket/loans/{class_id}/{nft_id} | +| `CDPsList` | [QueryCDPsListRequest](#ununifi.nftmarket.QueryCDPsListRequest) | [QueryCDPsListResponse](#ununifi.nftmarket.QueryCDPsListResponse) | | GET | /ununifi/nftmarket/cdps_list | +| `NftBids` | [QueryNftBidsRequest](#ununifi.nftmarket.QueryNftBidsRequest) | [QueryNftBidsResponse](#ununifi.nftmarket.QueryNftBidsResponse) | | GET | /ununifi/nftmarket/nft_bids/{class_id}/{nft_id} | +| `BidderBids` | [QueryBidderBidsRequest](#ununifi.nftmarket.QueryBidderBidsRequest) | [QueryBidderBidsResponse](#ununifi.nftmarket.QueryBidderBidsResponse) | | GET | /ununifi/nftmarket/bidder_bids/{bidder} | +| `PaymentStatus` | [QueryPaymentStatusRequest](#ununifi.nftmarket.QueryPaymentStatusRequest) | [QueryPaymentStatusResponse](#ununifi.nftmarket.QueryPaymentStatusResponse) | | GET | /ununifi/nftmarket/payment_status/{class_id}/{nft_id}/{bidder} | +| `Rewards` | [QueryRewardsRequest](#ununifi.nftmarket.QueryRewardsRequest) | [QueryRewardsResponse](#ununifi.nftmarket.QueryRewardsResponse) | | GET | /ununifi/nftmarket/rewards/{address} | +| `Liquidation` | [QueryLiquidationRequest](#ununifi.nftmarket.QueryLiquidationRequest) | [QueryLiquidationResponse](#ununifi.nftmarket.QueryLiquidationResponse) | | GET | /ununifi/nftmarket/liquidation/{class_id}/{nft_id} | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `price` | [string](#string) | | | -| `metrics_quote_ticker` | [string](#string) | | | -| `volume_24hours` | [string](#string) | | | -| `fees_24hours` | [string](#string) | | | -| `long_positions` | [string](#string) | | | -| `short_positions` | [string](#string) | | | + + +## nftmarket/tx.proto + +### MsgBorrow +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### QueryPerpetualFuturesPositionSizeRequest +### MsgBorrowResponse + +### MsgCancelBid -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position_type` | [PositionType](#ununifi.derivatives.PositionType) | | | -| `address` | [string](#string) | | | +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | + +### MsgCancelBidResponse + +### MsgCancelNftListing +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - + -### QueryPerpetualFuturesPositionSizeResponse +### MsgCancelNftListingResponse + +### MsgEndNftListing -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `total_position_size_usd` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | + +### MsgEndNftListingResponse + +### MsgListNft +| Field | Type | Label | Description | +| ------------------------ | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `listing_type` | [ListingType](#ununifi.nftmarket.ListingType) | | | +| `bid_token` | [string](#string) | | | +| `minimum_deposit_rate` | [string](#string) | | 1% = 0.01 | +| `automatic_refinancing` | [bool](#bool) | | | +| `minimum_bidding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | | - + -### QueryPerpetualFuturesRequest +### MsgListNftResponse + +### MsgMintNft +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `classId` | [string](#string) | | | +| `nftId` | [string](#string) | | | +| `nftUri` | [string](#string) | | | +| `nftUriHash` | [string](#string) | | | + +### MsgMintNftResponse + - +### MsgPayFullBid -### QueryPerpetualFuturesResponse +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | + +### MsgPayFullBidResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `metrics_quote_ticker` | [string](#string) | | | -| `volume_24hours` | [string](#string) | | | -| `fees_24hours` | [string](#string) | | | -| `long_positions` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `short_positions` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgPlaceBid +| Field | Type | Label | Description | +| ---------------------- | ------------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `bid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `bidding_period` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `deposit_lending_rate` | [string](#string) | | | +| `automatic_payment` | [bool](#bool) | | | +| `deposit_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgPlaceBidResponse + - +### MsgRepay -### QueryPerpetualOptionsMarketRequest +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgRepayResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_denom` | [string](#string) | | | -| `quote_denom` | [string](#string) | | | + +### MsgSellingDecision +| Field | Type | Label | Description | +| -------- | ------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | + +### MsgSellingDecisionResponse + - + -### QueryPerpetualOptionsMarketResponse + + +### Msg +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `MintNft` | [MsgMintNft](#ununifi.nftmarket.MsgMintNft) | [MsgMintNftResponse](#ununifi.nftmarket.MsgMintNftResponse) | | | +| `ListNft` | [MsgListNft](#ununifi.nftmarket.MsgListNft) | [MsgListNftResponse](#ununifi.nftmarket.MsgListNftResponse) | | | +| `CancelNftListing` | [MsgCancelNftListing](#ununifi.nftmarket.MsgCancelNftListing) | [MsgCancelNftListingResponse](#ununifi.nftmarket.MsgCancelNftListingResponse) | | | +| `PlaceBid` | [MsgPlaceBid](#ununifi.nftmarket.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.nftmarket.MsgPlaceBidResponse) | | | +| `CancelBid` | [MsgCancelBid](#ununifi.nftmarket.MsgCancelBid) | [MsgCancelBidResponse](#ununifi.nftmarket.MsgCancelBidResponse) | | | +| `SellingDecision` | [MsgSellingDecision](#ununifi.nftmarket.MsgSellingDecision) | [MsgSellingDecisionResponse](#ununifi.nftmarket.MsgSellingDecisionResponse) | | | +| `EndNftListing` | [MsgEndNftListing](#ununifi.nftmarket.MsgEndNftListing) | [MsgEndNftListingResponse](#ununifi.nftmarket.MsgEndNftListingResponse) | | | +| `PayFullBid` | [MsgPayFullBid](#ununifi.nftmarket.MsgPayFullBid) | [MsgPayFullBidResponse](#ununifi.nftmarket.MsgPayFullBidResponse) | | | +| `Borrow` | [MsgBorrow](#ununifi.nftmarket.MsgBorrow) | [MsgBorrowResponse](#ununifi.nftmarket.MsgBorrowResponse) | | | +| `Repay` | [MsgRepay](#ununifi.nftmarket.MsgRepay) | [MsgRepayResponse](#ununifi.nftmarket.MsgRepayResponse) | | | + + + - +## nftmarketv1/nftmarket.proto -### QueryPerpetualOptionsRequest + +### EventBorrow +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `borrower` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | + +### EventCancelBid +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + - +### EventCancelListNfting -### QueryPerpetualOptionsResponse +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventEndListNfting +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventExpandListingPeriod +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | - + -### QueryPoolRequest -this line is used by starport scaffolding # 3 +### EventLiquidate +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `liquidator` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventListNft +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + - +### EventPayFullBid -### QueryPoolResponse +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### EventPlaceBid -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `metrics_quote_ticker` | [string](#string) | | | -| `pool_market_cap` | [PoolMarketCap](#ununifi.derivatives.PoolMarketCap) | | | -| `volume_24hours` | [string](#string) | | | -| `fees_24hours` | [string](#string) | | | +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | + +### EventRepay +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `repayer` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `amount` | [string](#string) | | | + +### EventSellingDecision - +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | -### QueryPositionRequest + +### ListedClass +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_ids` | [string](#string) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position_id` | [string](#string) | | | + +### ListedNft +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `uri` | [string](#string) | | | +| `uri_hash` | [string](#string) | | | + +### Loan +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `loan` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### QueryPositionResponse +### NftBid +| Field | Type | Label | Description | +| ------------------- | ------------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `bidder` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `automatic_payment` | [bool](#bool) | | | +| `paid_amount` | [string](#string) | | | +| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `position` | [Position](#ununifi.derivatives.Position) | | | -| `valuation_profit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `margin_maintenance_rate` | [string](#string) | | | -| `effective_margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +### NftIdentifier +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### NftListing +| Field | Type | Label | Description | +| ----------------------- | ------------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `owner` | [string](#string) | | | +| `listing_type` | [ListingType](#ununifi.nftmarketv1.ListingType) | | | +| `state` | [ListingState](#ununifi.nftmarketv1.ListingState) | | | +| `bid_token` | [string](#string) | | | +| `min_bid` | [string](#string) | | | +| `bid_active_rank` | [uint64](#uint64) | | | +| `started_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `full_payment_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `successful_bid_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `auto_relisted_count` | [uint64](#uint64) | | | - + - +### Params - +| Field | Type | Label | Description | +| ----------------------------------------- | ----------------------------------------------------- | -------- | ----------- | +| `min_staking_for_listing` | [string](#string) | | | +| `default_bid_active_rank` | [uint64](#uint64) | | | +| `bid_tokens` | [string](#string) | repeated | | +| `auto_relisting_count_if_no_bid` | [uint64](#uint64) | | | +| `nft_listing_delay_seconds` | [uint64](#uint64) | | | +| `nft_listing_period_initial` | [uint64](#uint64) | | | +| `nft_listing_cancel_required_seconds` | [uint64](#uint64) | | | +| `nft_listing_cancel_fee_percentage` | [uint64](#uint64) | | | +| `nft_listing_gap_time` | [uint64](#uint64) | | | +| `bid_cancel_required_seconds` | [uint64](#uint64) | | | +| `bid_token_disburse_seconds_after_cancel` | [uint64](#uint64) | | | +| `nft_listing_full_payment_period` | [uint64](#uint64) | | | +| `nft_listing_nft_delivery_period` | [uint64](#uint64) | | | +| `nft_creator_share_percentage` | [uint64](#uint64) | | | +| `market_administrator` | [string](#string) | | | +| `nft_listing_commission_fee` | [uint64](#uint64) | | | +| `nft_listing_extend_seconds` | [uint64](#uint64) | | | +| `nft_listing_period_extend_fee_per_hour` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + - +### PaymentStatus -### Query -Query defines the gRPC querier service. +| Field | Type | Label | Description | +| ------------------- | ------------------------------------------------------- | ----- | ----------- | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `bidder` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `automatic_payment` | [bool](#bool) | | | +| `paid_amount` | [string](#string) | | | +| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `state` | [ListingState](#ununifi.nftmarketv1.ListingState) | | | +| `all_paid` | [bool](#bool) | | | -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.derivatives.QueryParamsRequest) | [QueryParamsResponse](#ununifi.derivatives.QueryParamsResponse) | Parameters queries the parameters of the module. | GET|/ununifi/derivatives/params| -| `Pool` | [QueryPoolRequest](#ununifi.derivatives.QueryPoolRequest) | [QueryPoolResponse](#ununifi.derivatives.QueryPoolResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/derivatives/pool| -| `LiquidityProviderTokenRealAPY` | [QueryLiquidityProviderTokenRealAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYRequest) | [QueryLiquidityProviderTokenRealAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenRealAPYResponse) | | GET|/ununifi/derivatives/liquidity-providers/real-apy| -| `LiquidityProviderTokenNominalAPY` | [QueryLiquidityProviderTokenNominalAPYRequest](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYRequest) | [QueryLiquidityProviderTokenNominalAPYResponse](#ununifi.derivatives.QueryLiquidityProviderTokenNominalAPYResponse) | | GET|/ununifi/derivatives/liquidity-providers/nominal-apy| -| `PerpetualFutures` | [QueryPerpetualFuturesRequest](#ununifi.derivatives.QueryPerpetualFuturesRequest) | [QueryPerpetualFuturesResponse](#ununifi.derivatives.QueryPerpetualFuturesResponse) | | GET|/ununifi/derivatives/perpetual-futures| -| `PerpetualFuturesMarket` | [QueryPerpetualFuturesMarketRequest](#ununifi.derivatives.QueryPerpetualFuturesMarketRequest) | [QueryPerpetualFuturesMarketResponse](#ununifi.derivatives.QueryPerpetualFuturesMarketResponse) | | GET|/ununifi/derivatives/perpetual-futures/{base_denom}/{quote_denom}| -| `PerpetualOptions` | [QueryPerpetualOptionsRequest](#ununifi.derivatives.QueryPerpetualOptionsRequest) | [QueryPerpetualOptionsResponse](#ununifi.derivatives.QueryPerpetualOptionsResponse) | | GET|/ununifi/derivatives/perpetual-options| -| `PerpetualOptionsMarket` | [QueryPerpetualOptionsMarketRequest](#ununifi.derivatives.QueryPerpetualOptionsMarketRequest) | [QueryPerpetualOptionsMarketResponse](#ununifi.derivatives.QueryPerpetualOptionsMarketResponse) | | GET|/ununifi/derivatives/perpetual-options/{base_denom}/{quote_denom}| -| `AllPositions` | [QueryAllPositionsRequest](#ununifi.derivatives.QueryAllPositionsRequest) | [QueryAllPositionsResponse](#ununifi.derivatives.QueryAllPositionsResponse) | | GET|/ununifi/derivatives/positions| -| `Position` | [QueryPositionRequest](#ununifi.derivatives.QueryPositionRequest) | [QueryPositionResponse](#ununifi.derivatives.QueryPositionResponse) | | GET|/ununifi/derivatives/positions/{position_id}| -| `PerpetualFuturesPositionSize` | [QueryPerpetualFuturesPositionSizeRequest](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeRequest) | [QueryPerpetualFuturesPositionSizeResponse](#ununifi.derivatives.QueryPerpetualFuturesPositionSizeResponse) | | GET|/ununifi/derivatives/positions/perpetual-futures/{position_type}/{address}| -| `AddressPositions` | [QueryAddressPositionsRequest](#ununifi.derivatives.QueryAddressPositionsRequest) | [QueryAddressPositionsResponse](#ununifi.derivatives.QueryAddressPositionsResponse) | | GET|/ununifi/derivatives/{address}/positions| -| `DLPTokenRates` | [QueryDLPTokenRateRequest](#ununifi.derivatives.QueryDLPTokenRateRequest) | [QueryDLPTokenRateResponse](#ununifi.derivatives.QueryDLPTokenRateResponse) | | GET|/ununifi/derivatives/pools/dlp| -| `EstimateDLPTokenAmount` | [QueryEstimateDLPTokenAmountRequest](#ununifi.derivatives.QueryEstimateDLPTokenAmountRequest) | [QueryEstimateDLPTokenAmountResponse](#ununifi.derivatives.QueryEstimateDLPTokenAmountResponse) | | GET|/ununifi/derivatives/estimate-dlp-token-amount/{mint_denom}/{amount}| -| `EstimateRedeemAmount` | [QueryEstimateRedeemAmountRequest](#ununifi.derivatives.QueryEstimateRedeemAmountRequest) | [QueryEstimateRedeemAmountResponse](#ununifi.derivatives.QueryEstimateRedeemAmountResponse) | | GET|/ununifi/derivatives/estimate-redeem-amount/{redeem_denom}/{lpt_amount}| -| `AvailableAssetInPoolByDenom` | [QueryAvailableAssetInPoolByDenomRequest](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomRequest) | [QueryAvailableAssetInPoolByDenomResponse](#ununifi.derivatives.QueryAvailableAssetInPoolByDenomResponse) | | GET|/ununifi/derivatives/pools/available-asset/{denom}| -| `AvailableAssetsInPool` | [QueryAvailableAssetsInPoolRequest](#ununifi.derivatives.QueryAvailableAssetsInPoolRequest) | [QueryAvailableAssetsInPoolResponse](#ununifi.derivatives.QueryAvailableAssetsInPoolResponse) | | GET|/ununifi/derivatives/pools/available-assets| + - + +### ListingState +| Name | Number | Description | +| ---------------- | ------ | ----------- | +| LISTING | 0 | | +| BIDDING | 1 | | +| SELLING_DECISION | 2 | | +| LIQUIDATION | 3 | | +| END_LISTING | 4 | | +| SUCCESSFUL_BID | 5 | | - - + -## derivatives/tx.proto +### ListingType +| Name | Number | Description | +| ------------------------ | ------ | ----------- | +| DIRECT_ASSET_BORROW | 0 | | +| SYNTHETIC_ASSET_CREATION | 1 | | +| LATE_SHIPPING | 2 | | + - + -### MsgClosePosition + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `position_id` | [string](#string) | | | +## nftmarketv1/genesis.proto + +### GenesisState +GenesisState defines the nftmarket module's genesis state. +| Field | Type | Label | Description | +| ---------------- | --------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.nftmarketv1.Params) | | | +| `listings` | [NftListing](#ununifi.nftmarketv1.NftListing) | repeated | | +| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | +| `cancelled_bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | +| `loans` | [Loan](#ununifi.nftmarketv1.Loan) | repeated | | + - + -### MsgClosePositionResponse + + + + +## nftmarketv1/query.proto + +### QueryBidderBidsRequest - +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `bidder` | [string](#string) | | | -### MsgDepositToPool + +### QueryBidderBidsResponse +| Field | Type | Label | Description | +| ------ | ------------------------------------- | -------- | ----------- | +| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryCDPsListRequest + +### QueryCDPsListResponse + +### QueryListedClassRequest - +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_limit` | [int32](#int32) | | | -### MsgDepositToPoolResponse + +### QueryListedClassResponse +| Field | Type | Label | Description | +| ------------- | ------------------------------------------- | -------- | ----------- | +| `class_id` | [string](#string) | | | +| `name` | [string](#string) | | | +| `description` | [string](#string) | | | +| `symbol` | [string](#string) | | | +| `uri` | [string](#string) | | | +| `urihash` | [string](#string) | | | +| `nfts` | [ListedNft](#ununifi.nftmarketv1.ListedNft) | repeated | | +| `nft_count` | [uint64](#uint64) | | | + +### QueryListedClassesRequest +| Field | Type | Label | Description | +| ----------- | --------------- | ----- | ----------- | +| `nft_limit` | [int32](#int32) | | | + - +### QueryListedClassesResponse -### MsgOpenPosition +| Field | Type | Label | Description | +| --------- | ------------------------------------------------------------------------- | -------- | ----------- | +| `classes` | [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) | repeated | | + +### QueryListedNftsRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `margin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `market` | [Market](#ununifi.derivatives.Market) | | | -| `position_instance` | [google.protobuf.Any](#google.protobuf.Any) | | | +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | + +### QueryListedNftsResponse +| Field | Type | Label | Description | +| ---------- | --------------------------------------------- | -------- | ----------- | +| `listings` | [NftListing](#ununifi.nftmarketv1.NftListing) | repeated | | + +### QueryLoanRequest - +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | -### MsgOpenPositionResponse + +### QueryLoanResponse +| Field | Type | Label | Description | +| ----------------- | --------------------------------- | ----- | ----------- | +| `loan` | [Loan](#ununifi.nftmarketv1.Loan) | | | +| `borrowing_limit` | [string](#string) | | | + +### QueryLoansRequest + +### QueryLoansResponse - +| Field | Type | Label | Description | +| ------- | --------------------------------- | -------- | ----------- | +| `loans` | [Loan](#ununifi.nftmarketv1.Loan) | repeated | | -### MsgReportLevyPeriod + +### QueryNftBidsRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `position_id` | [string](#string) | | | -| `reward_recipient` | [string](#string) | | | + +### QueryNftBidsResponse +| Field | Type | Label | Description | +| ------ | ------------------------------------- | -------- | ----------- | +| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | + +### QueryNftListingRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | - + -### MsgReportLevyPeriodResponse +### QueryNftListingResponse +| Field | Type | Label | Description | +| --------- | --------------------------------------------- | ----- | ----------- | +| `listing` | [NftListing](#ununifi.nftmarketv1.NftListing) | | | + +### QueryParamsRequest + +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | ------------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.nftmarketv1.Params) | | | - + -### MsgReportLiquidation +### QueryPaymentStatusRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `bidder` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `position_id` | [string](#string) | | | -| `reward_recipient` | [string](#string) | | | +### QueryPaymentStatusResponse +| Field | Type | Label | Description | +| --------------- | --------------------------------------------------- | ----- | ----------- | +| `paymentStatus` | [PaymentStatus](#ununifi.nftmarketv1.PaymentStatus) | | | + +### QueryRewardsRequest +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `address` | [uint64](#uint64) | | | + - +### QueryRewardsResponse -### MsgReportLiquidationResponse +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ----------- | +| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + +### Query +Query defines the gRPC querier service. - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| --------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------- | --------- | -------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.nftmarketv1.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmarketv1.QueryParamsResponse) | | GET | /ununifi/nftmarket/params | +| `NftListing` | [QueryNftListingRequest](#ununifi.nftmarketv1.QueryNftListingRequest) | [QueryNftListingResponse](#ununifi.nftmarketv1.QueryNftListingResponse) | | GET | /ununifi/nftmarket/nft_listing/{class_id}/{nft_id} | +| `ListedNfts` | [QueryListedNftsRequest](#ununifi.nftmarketv1.QueryListedNftsRequest) | [QueryListedNftsResponse](#ununifi.nftmarketv1.QueryListedNftsResponse) | | GET | /ununifi/nftmarket/listed_nfts | +| `ListedClasses` | [QueryListedClassesRequest](#ununifi.nftmarketv1.QueryListedClassesRequest) | [QueryListedClassesResponse](#ununifi.nftmarketv1.QueryListedClassesResponse) | | GET | /ununifi/nftmarket/listed_classes | +| `ListedClass` | [QueryListedClassRequest](#ununifi.nftmarketv1.QueryListedClassRequest) | [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) | | GET | /ununifi/nftmarket/listed_class/{class_id}/{nft_limit} | +| `Loans` | [QueryLoansRequest](#ununifi.nftmarketv1.QueryLoansRequest) | [QueryLoansResponse](#ununifi.nftmarketv1.QueryLoansResponse) | | GET | /ununifi/nftmarket/loans | +| `Loan` | [QueryLoanRequest](#ununifi.nftmarketv1.QueryLoanRequest) | [QueryLoanResponse](#ununifi.nftmarketv1.QueryLoanResponse) | | GET | /ununifi/nftmarket/loans/{class_id}/{nft_id} | +| `CDPsList` | [QueryCDPsListRequest](#ununifi.nftmarketv1.QueryCDPsListRequest) | [QueryCDPsListResponse](#ununifi.nftmarketv1.QueryCDPsListResponse) | | GET | /ununifi/nftmarket/cdps_list | +| `NftBids` | [QueryNftBidsRequest](#ununifi.nftmarketv1.QueryNftBidsRequest) | [QueryNftBidsResponse](#ununifi.nftmarketv1.QueryNftBidsResponse) | | GET | /ununifi/nftmarket/nft_bids/{class_id}/{nft_id} | +| `BidderBids` | [QueryBidderBidsRequest](#ununifi.nftmarketv1.QueryBidderBidsRequest) | [QueryBidderBidsResponse](#ununifi.nftmarketv1.QueryBidderBidsResponse) | | GET | /ununifi/nftmarket/bidder_bids/{bidder} | +| `PaymentStatus` | [QueryPaymentStatusRequest](#ununifi.nftmarketv1.QueryPaymentStatusRequest) | [QueryPaymentStatusResponse](#ununifi.nftmarketv1.QueryPaymentStatusResponse) | | GET | /ununifi/nftmarket/payment_status/{class_id}/{nft_id}/{bidder} | +| `Rewards` | [QueryRewardsRequest](#ununifi.nftmarketv1.QueryRewardsRequest) | [QueryRewardsResponse](#ununifi.nftmarketv1.QueryRewardsResponse) | | GET | /ununifi/nftmarket/rewards/{address} | -### MsgWithdrawFromPool + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `lpt_amount` | [string](#string) | | | -| `redeem_denom` | [string](#string) | | | +## nftmarketv1/tx.proto + +### MsgBorrow +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgBorrowResponse - + -### MsgWithdrawFromPoolResponse +### MsgBurnStableCoin +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | + +### MsgBurnStableCoinResponse + +### MsgCancelBid - +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - + - +### MsgCancelBidResponse + - +### MsgCancelNftListing -### Msg +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `DepositToPool` | [MsgDepositToPool](#ununifi.derivatives.MsgDepositToPool) | [MsgDepositToPoolResponse](#ununifi.derivatives.MsgDepositToPoolResponse) | | | -| `WithdrawFromPool` | [MsgWithdrawFromPool](#ununifi.derivatives.MsgWithdrawFromPool) | [MsgWithdrawFromPoolResponse](#ununifi.derivatives.MsgWithdrawFromPoolResponse) | | | -| `OpenPosition` | [MsgOpenPosition](#ununifi.derivatives.MsgOpenPosition) | [MsgOpenPositionResponse](#ununifi.derivatives.MsgOpenPositionResponse) | | | -| `ClosePosition` | [MsgClosePosition](#ununifi.derivatives.MsgClosePosition) | [MsgClosePositionResponse](#ununifi.derivatives.MsgClosePositionResponse) | | | -| `ReportLiquidation` | [MsgReportLiquidation](#ununifi.derivatives.MsgReportLiquidation) | [MsgReportLiquidationResponse](#ununifi.derivatives.MsgReportLiquidationResponse) | | | -| `ReportLevyPeriod` | [MsgReportLevyPeriod](#ununifi.derivatives.MsgReportLevyPeriod) | [MsgReportLevyPeriodResponse](#ununifi.derivatives.MsgReportLevyPeriodResponse) | | | +### MsgCancelNftListingResponse - + +### MsgEndNftListing +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - + -## ecosystem-incentive/ecosystem_incentive.proto +### MsgEndNftListingResponse + + +### MsgExpandListingPeriod +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - + -### IncentiveUnit +### MsgExpandListingPeriodResponse + + +### MsgLiquidate +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `subject_info_lists` | [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) | repeated | | + +### MsgLiquidateResponse + +### MsgListNft +| Field | Type | Label | Description | +| ----------------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `listing_type` | [ListingType](#ununifi.nftmarketv1.ListingType) | | | +| `bid_token` | [string](#string) | | | +| `min_bid` | [string](#string) | | | +| `bid_active_rank` | [uint64](#uint64) | | | + - +### MsgListNftResponse -### IncentiveUnitIdsByAddr + +### MsgMintNft +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `classId` | [string](#string) | | | +| `nftId` | [string](#string) | | | +| `nftUri` | [string](#string) | | | +| `nftUriHash` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `incentive_unit_ids` | [string](#string) | repeated | | + +### MsgMintNftResponse + +### MsgMintStableCoin +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | + - +### MsgMintStableCoinResponse -### RewardStore + + +### MsgPayFullBid + +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | + +### MsgPayFullBidResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subject_addr` | [string](#string) | | | -| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + +### MsgPlaceBid +| Field | Type | Label | Description | +| ------------------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `automatic_payment` | [bool](#bool) | | | + +### MsgPlaceBidResponse + - +### MsgRepay -### SubjectInfo +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgRepayResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subject_addr` | [string](#string) | | | -| `weight` | [string](#string) | | | + +### MsgSellingDecision +| Field | Type | Label | Description | +| -------- | --------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | + +### MsgSellingDecisionResponse @@ -2846,294 +4136,488 @@ Query defines the gRPC querier service. - + +### Msg +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| --------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `MintNft` | [MsgMintNft](#ununifi.nftmarketv1.MsgMintNft) | [MsgMintNftResponse](#ununifi.nftmarketv1.MsgMintNftResponse) | | | +| `ListNft` | [MsgListNft](#ununifi.nftmarketv1.MsgListNft) | [MsgListNftResponse](#ununifi.nftmarketv1.MsgListNftResponse) | | | +| `CancelNftListing` | [MsgCancelNftListing](#ununifi.nftmarketv1.MsgCancelNftListing) | [MsgCancelNftListingResponse](#ununifi.nftmarketv1.MsgCancelNftListingResponse) | | | +| `ExpandListingPeriod` | [MsgExpandListingPeriod](#ununifi.nftmarketv1.MsgExpandListingPeriod) | [MsgExpandListingPeriodResponse](#ununifi.nftmarketv1.MsgExpandListingPeriodResponse) | | | +| `PlaceBid` | [MsgPlaceBid](#ununifi.nftmarketv1.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.nftmarketv1.MsgPlaceBidResponse) | | | +| `CancelBid` | [MsgCancelBid](#ununifi.nftmarketv1.MsgCancelBid) | [MsgCancelBidResponse](#ununifi.nftmarketv1.MsgCancelBidResponse) | | | +| `SellingDecision` | [MsgSellingDecision](#ununifi.nftmarketv1.MsgSellingDecision) | [MsgSellingDecisionResponse](#ununifi.nftmarketv1.MsgSellingDecisionResponse) | | | +| `EndNftListing` | [MsgEndNftListing](#ununifi.nftmarketv1.MsgEndNftListing) | [MsgEndNftListingResponse](#ununifi.nftmarketv1.MsgEndNftListingResponse) | | | +| `PayFullBid` | [MsgPayFullBid](#ununifi.nftmarketv1.MsgPayFullBid) | [MsgPayFullBidResponse](#ununifi.nftmarketv1.MsgPayFullBidResponse) | | | +| `Borrow` | [MsgBorrow](#ununifi.nftmarketv1.MsgBorrow) | [MsgBorrowResponse](#ununifi.nftmarketv1.MsgBorrowResponse) | | | +| `Repay` | [MsgRepay](#ununifi.nftmarketv1.MsgRepay) | [MsgRepayResponse](#ununifi.nftmarketv1.MsgRepayResponse) | | | +| `MintStableCoin` | [MsgMintStableCoin](#ununifi.nftmarketv1.MsgMintStableCoin) | [MsgMintStableCoinResponse](#ununifi.nftmarketv1.MsgMintStableCoinResponse) | | | +| `BurnStableCoin` | [MsgBurnStableCoin](#ununifi.nftmarketv1.MsgBurnStableCoin) | [MsgBurnStableCoinResponse](#ununifi.nftmarketv1.MsgBurnStableCoinResponse) | | | +| `Liquidate` | [MsgLiquidate](#ununifi.nftmarketv1.MsgLiquidate) | [MsgLiquidateResponse](#ununifi.nftmarketv1.MsgLiquidateResponse) | | | + + + + - -## ecosystem-incentive/event.proto +## nftmint/nftmint.proto + +### ClassAttributes - +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `owner` | [string](#string) | | | +| `base_token_uri` | [string](#string) | | | +| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | +| `token_supply_cap` | [uint64](#uint64) | | | -### EventDeletedNftIdRecordedForFrontendReward + +### ClassNameIdList +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ----------- | +| `class_name` | [string](#string) | | | +| `class_id` | [string](#string) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | + +### OwningClassIdList +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | repeated | | + +### Params +| Field | Type | Label | Description | +| ------------------- | ----------------- | ----- | ----------- | +| `MaxNFTSupplyCap` | [uint64](#uint64) | | | +| `MinClassNameLen` | [uint64](#uint64) | | | +| `MaxClassNameLen` | [uint64](#uint64) | | | +| `MinUriLen` | [uint64](#uint64) | | | +| `MaxUriLen` | [uint64](#uint64) | | | +| `MaxSymbolLen` | [uint64](#uint64) | | | +| `MaxDescriptionLen` | [uint64](#uint64) | | | - + -### EventFailedParsingMemoInputs + +### MintingPermission +| Name | Number | Description | +| --------- | ------ | -------------- | +| OnlyOwner | 0 | | +| Anyone | 1 | WhiteList = 2; | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `memo` | [string](#string) | | | + + + + + +## nftmint/event.proto - + -### EventNotRecordedNftId +### EventBurnNFT +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `burner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | +### EventCreateClass +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `base_token_uri` | [string](#string) | | | +| `token_supply_cap` | [string](#string) | | | +| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | + +### EventMintNFT +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `owner` | [string](#string) | | | +| `minter` | [string](#string) | | | + - +### EventSendClassOwnership -### EventNotRegisteredIncentiveUnitId +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `receiver` | [string](#string) | | | +| `class_id` | [string](#string) | | | + +### EventUpdateBaseTokenUri -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | +| Field | Type | Label | Description | +| ---------------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `base_token_uri` | [string](#string) | | | + +### EventUpdateTokenSupplyCap +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `token_supply_cap` | [string](#string) | | | + + - + -### EventRecordedIncentiveUnitId + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | +## nftmint/genesis.proto + +### GenesisState +GenesisState defines the nftmint module's genesis state. +| Field | Type | Label | Description | +| ----------------------- | --------------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.nftmint.Params) | | | +| `class_attributes_list` | [ClassAttributes](#ununifi.nftmint.ClassAttributes) | repeated | | + - + -### EventRegister + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | -| `subject_info_lists` | [SubjectInfo](#ununifi.ecosystemincentive.SubjectInfo) | repeated | | + +## nftmint/query.proto + +### QueryClassAttributesRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | + - +### QueryClassAttributesResponse -### EventUpdatedReward +| Field | Type | Label | Description | +| ------------------ | --------------------------------------------------- | ----- | ----------- | +| `class_attributes` | [ClassAttributes](#ununifi.nftmint.ClassAttributes) | | | + +### QueryClassIdsByNameRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | -| `earned_reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `class_name` | [string](#string) | | | + +### QueryClassIdsByNameResponse +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------- | ----- | ----------- | +| `class_name_id_list` | [ClassNameIdList](#ununifi.nftmint.ClassNameIdList) | | | + +### QueryClassIdsByOwnerRequest - +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `owner` | [string](#string) | | | -### EventVersionUnmatched + +### QueryClassIdsByOwnerResponse +| Field | Type | Label | Description | +| ---------------------- | ------------------------------------------------------- | ----- | ----------- | +| `owning_class_id_list` | [OwningClassIdList](#ununifi.nftmint.OwningClassIdList) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `unmatched_version` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | + +### QueryNFTMinterRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + +### QueryNFTMinterResponse +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | ----------- | +| `minter` | [string](#string) | | | - + -### EventWithdrawAllRewards +### QueryParamsRequest + +### QueryParamsResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `all_withdrawn_rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| Field | Type | Label | Description | +| -------- | --------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.nftmint.Params) | | | + + + + +### Query - +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------- | --------- | ----------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.nftmint.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmint.QueryParamsResponse) | | GET | /ununifi/nftmint/params | +| `ClassAttributes` | [QueryClassAttributesRequest](#ununifi.nftmint.QueryClassAttributesRequest) | [QueryClassAttributesResponse](#ununifi.nftmint.QueryClassAttributesResponse) | | GET | /ununifi/nftmint/class_owner/{class_id} | +| `NFTMinter` | [QueryNFTMinterRequest](#ununifi.nftmint.QueryNFTMinterRequest) | [QueryNFTMinterResponse](#ununifi.nftmint.QueryNFTMinterResponse) | | GET | /ununifi/nftmint/nft_minter/{class_id}/{nft_id} | +| `ClassIdsByName` | [QueryClassIdsByNameRequest](#ununifi.nftmint.QueryClassIdsByNameRequest) | [QueryClassIdsByNameResponse](#ununifi.nftmint.QueryClassIdsByNameResponse) | | GET | /ununifi/nftmint/class_ids_by_name/{class_name} | +| `ClassIdsByOwner` | [QueryClassIdsByOwnerRequest](#ununifi.nftmint.QueryClassIdsByOwnerRequest) | [QueryClassIdsByOwnerResponse](#ununifi.nftmint.QueryClassIdsByOwnerResponse) | | GET | /ununifi/nftmint/class_ids_by_owner/{owner} | -### EventWithdrawReward + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `withdrawn_reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +## nftmint/tx.proto + +### MsgBurnNFT +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | + - +### MsgBurnNFTResponse - + - +### MsgCreateClass - +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `name` | [string](#string) | | | +| `base_token_uri` | [string](#string) | | | +| `token_supply_cap` | [uint64](#uint64) | | | +| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | +| `symbol` | [string](#string) | | | +| `description` | [string](#string) | | | +| `class_uri` | [string](#string) | | | + +### MsgCreateClassResponse - - + -## ecosystem-incentive/params.proto +### MsgMintNFT +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `nft_id` | [string](#string) | | | +| `recipient` | [string](#string) | | | + - +### MsgMintNFTResponse -### Params -Params defines the parameters for the module. + +### MsgSendClassOwnership -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward_params` | [RewardParams](#ununifi.ecosystemincentive.RewardParams) | repeated | | -| `max_incentive_unit_id_len` | [uint64](#uint64) | | | -| `max_subject_info_num_in_unit` | [uint64](#uint64) | | | +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `recipient` | [string](#string) | | | + +### MsgSendClassOwnershipResponse + +### MsgUpdateBaseTokenUri +| Field | Type | Label | Description | +| ---------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `base_token_uri` | [string](#string) | | | - + -### RewardParams -RewardParams defines which module have which rewards type and rate -to maintain the correctness of the fee rate in a module -e.g. if nftmarket module have "Frontend" and "Collection" incentive, -the combined those rates for the incentive cannot be exceed 1 +### MsgUpdateBaseTokenUriResponse + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `module_name` | [string](#string) | | | -| `reward_rate` | [RewardRate](#ununifi.ecosystemincentive.RewardRate) | repeated | | +### MsgUpdateTokenSupplyCap +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `class_id` | [string](#string) | | | +| `token_supply_cap` | [uint64](#uint64) | | | + +### MsgUpdateTokenSupplyCapResponse + + - + -### RewardRate -RewardRate defines the ratio to take reward for a specific reward_type. -The total sum of reward_rate in a module cannot be exceed 1 + +### Msg -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward_type` | [RewardType](#ununifi.ecosystemincentive.RewardType) | | | -| `rate` | [string](#string) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ---------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `CreateClass` | [MsgCreateClass](#ununifi.nftmint.MsgCreateClass) | [MsgCreateClassResponse](#ununifi.nftmint.MsgCreateClassResponse) | | | +| `SendClassOwnership` | [MsgSendClassOwnership](#ununifi.nftmint.MsgSendClassOwnership) | [MsgSendClassOwnershipResponse](#ununifi.nftmint.MsgSendClassOwnershipResponse) | | | +| `UpdateBaseTokenUri` | [MsgUpdateBaseTokenUri](#ununifi.nftmint.MsgUpdateBaseTokenUri) | [MsgUpdateBaseTokenUriResponse](#ununifi.nftmint.MsgUpdateBaseTokenUriResponse) | | | +| `UpdateTokenSupplyCap` | [MsgUpdateTokenSupplyCap](#ununifi.nftmint.MsgUpdateTokenSupplyCap) | [MsgUpdateTokenSupplyCapResponse](#ununifi.nftmint.MsgUpdateTokenSupplyCapResponse) | | | +| `MintNFT` | [MsgMintNFT](#ununifi.nftmint.MsgMintNFT) | [MsgMintNFTResponse](#ununifi.nftmint.MsgMintNFTResponse) | | | +| `BurnNFT` | [MsgBurnNFT](#ununifi.nftmint.MsgBurnNFT) | [MsgBurnNFTResponse](#ununifi.nftmint.MsgBurnNFTResponse) | | | + + + +## pricefeed/pricefeed.proto - + +### CurrentPrice - +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `market_id` | [string](#string) | | | +| `price` | [string](#string) | | | -### RewardType -At first, we go with this one type. -NFTMARKET_FRONTEND type reward will be disributed for the creators of frontend of UnUniFi's services. + -| Name | Number | Description | -| ---- | ------ | ----------- | -| NFTMARKET_FRONTEND | 0 | | +### Market +| Field | Type | Label | Description | +| ------------- | ----------------- | -------- | ----------- | +| `market_id` | [string](#string) | | | +| `base_asset` | [string](#string) | | | +| `quote_asset` | [string](#string) | | | +| `oracles` | [string](#string) | repeated | | +| `active` | [bool](#bool) | | | - + - +### Params - +| Field | Type | Label | Description | +| --------- | ----------------------------------- | -------- | ----------- | +| `markets` | [Market](#ununifi.pricefeed.Market) | repeated | | + +### PostedPrice - - +| Field | Type | Label | Description | +| ---------------- | ------------------------------------------------------- | ----- | ----------- | +| `market_id` | [string](#string) | | | +| `oracle_address` | [string](#string) | | | +| `price` | [string](#string) | | | +| `expiry` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -## ecosystem-incentive/genesis.proto + + + - + -### GenesisState -GenesisState defines the ecosystemincentive module's genesis state. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.ecosystemincentive.Params) | | | -| `incentive_units` | [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) | repeated | | -| `reward_stores` | [RewardStore](#ununifi.ecosystemincentive.RewardStore) | repeated | | +## pricefeed/genesis.proto + +### GenesisState +GenesisState defines the pricefeed module's genesis state. +| Field | Type | Label | Description | +| --------------- | --------------------------------------------- | -------- | --------------------------------------------------------------- | +| `params` | [Params](#ununifi.pricefeed.Params) | | | +| `posted_prices` | [PostedPrice](#ununifi.pricefeed.PostedPrice) | repeated | this line is used by starport scaffolding # genesis/proto/state | @@ -3143,5267 +4627,196 @@ GenesisState defines the ecosystemincentive module's genesis state. + - - -## ecosystem-incentive/memo.proto +## pricefeed/query.proto + +### QueryAllMarketRequest - - -### MemoInputs - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `version` | [string](#string) | | | -| `incentive_unit_id` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## ecosystem-incentive/query.proto - - - - - -### QueryAllRewardsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subject_addr` | [string](#string) | | | - - - - - - - - -### QueryAllRewardsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `rewards` | [RewardStore](#ununifi.ecosystemincentive.RewardStore) | | | - - - - - - - - -### QueryIncentiveUnitIdsByAddrRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | - - - - - - - - -### QueryIncentiveUnitIdsByAddrResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_ids_by_addr` | [IncentiveUnitIdsByAddr](#ununifi.ecosystemincentive.IncentiveUnitIdsByAddr) | | | - - - - - - - - -### QueryIncentiveUnitRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | - - - - - - - - -### QueryIncentiveUnitResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit` | [IncentiveUnit](#ununifi.ecosystemincentive.IncentiveUnit) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.ecosystemincentive.Params) | | params holds all the parameters of this module. | - - - - - - - - -### QueryRecordedIncentiveUnitIdRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryRecordedIncentiveUnitIdResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `incentive_unit_id` | [string](#string) | | | - - - - - - - - -### QueryRewardRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subject_addr` | [string](#string) | | | -| `denom` | [string](#string) | | | - - - - - - - - -### QueryRewardResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.ecosystemincentive.QueryParamsRequest) | [QueryParamsResponse](#ununifi.ecosystemincentive.QueryParamsResponse) | Parameters queries the parameters of the module. | GET|/ununifi/ecosystem_incentive/params| -| `IncentiveUnit` | [QueryIncentiveUnitRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitRequest) | [QueryIncentiveUnitResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitResponse) | | GET|/ununifi/ecosystem_incentive/incentive_unit/{incentive_unit_id}| -| `AllRewards` | [QueryAllRewardsRequest](#ununifi.ecosystemincentive.QueryAllRewardsRequest) | [QueryAllRewardsResponse](#ununifi.ecosystemincentive.QueryAllRewardsResponse) | | GET|/ununifi/ecosystem_incentive/all_rewards/{subject_addr}| -| `Reward` | [QueryRewardRequest](#ununifi.ecosystemincentive.QueryRewardRequest) | [QueryRewardResponse](#ununifi.ecosystemincentive.QueryRewardResponse) | | GET|/ununifi/ecosystem_incentive/reward/{subject_addr}/{denom}| -| `RecordedIncentiveUnitId` | [QueryRecordedIncentiveUnitIdRequest](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdRequest) | [QueryRecordedIncentiveUnitIdResponse](#ununifi.ecosystemincentive.QueryRecordedIncentiveUnitIdResponse) | | GET|/ununifi/ecosystem_incentive/recorded_incentive_unit_id/{class_id}/{nft_id}| -| `IncentiveUnitIdsByAddr` | [QueryIncentiveUnitIdsByAddrRequest](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrRequest) | [QueryIncentiveUnitIdsByAddrResponse](#ununifi.ecosystemincentive.QueryIncentiveUnitIdsByAddrResponse) | | GET|/ununifi/ecosystem_incentive/incentive_unit_ids_by_addr/{address}| - - - - - - - - -## ecosystem-incentive/tx.proto - - - - - -### MsgRegister - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `incentive_unit_id` | [string](#string) | | | -| `subject_addrs` | [string](#string) | repeated | | -| `weights` | [string](#string) | repeated | | - - - - - - - - -### MsgRegisterResponse - - - - - - - - - -### MsgWithdrawAllRewards - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | - - - - - - - - -### MsgWithdrawAllRewardsResponse - - - - - - - - - -### MsgWithdrawReward - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `denom` | [string](#string) | | | - - - - - - - - -### MsgWithdrawRewardResponse - - - - - - - - - - - - - - - -### Msg -Msg defines the Msg service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Register` | [MsgRegister](#ununifi.ecosystemincentive.MsgRegister) | [MsgRegisterResponse](#ununifi.ecosystemincentive.MsgRegisterResponse) | | | -| `WithdrawAllRewards` | [MsgWithdrawAllRewards](#ununifi.ecosystemincentive.MsgWithdrawAllRewards) | [MsgWithdrawAllRewardsResponse](#ununifi.ecosystemincentive.MsgWithdrawAllRewardsResponse) | | | -| `WithdrawReward` | [MsgWithdrawReward](#ununifi.ecosystemincentive.MsgWithdrawReward) | [MsgWithdrawRewardResponse](#ununifi.ecosystemincentive.MsgWithdrawRewardResponse) | | | - - - - - - - - -## ethereum/signdoc.proto - - - - - -### SignDocForMetamask - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `body` | [cosmos.tx.v1beta1.TxBody](#cosmos.tx.v1beta1.TxBody) | | | -| `auth_info` | [cosmos.tx.v1beta1.AuthInfo](#cosmos.tx.v1beta1.AuthInfo) | | | -| `chain_id` | [string](#string) | | | -| `account_number` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - - - -## incentive/incentive.proto - - - - - -### BaseClaim - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### BaseMultiClaim - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `reward` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - -### CdpMintingClaim - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `base_claim` | [BaseClaim](#ununifi.incentive.BaseClaim) | | | -| `reward_indexes` | [RewardIndex](#ununifi.incentive.RewardIndex) | repeated | | - - - - - - - - -### Multiplier - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `months_lockup` | [int64](#int64) | | | -| `factor` | [string](#string) | | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cdp_minting_reward_periods` | [RewardPeriod](#ununifi.incentive.RewardPeriod) | repeated | | -| `claim_multipliers` | [Multiplier](#ununifi.incentive.Multiplier) | repeated | | -| `claim_end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### RewardIndex - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `collateral_type` | [string](#string) | | | -| `reward_factor` | [string](#string) | | | - - - - - - - - -### RewardPeriod - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `active` | [bool](#bool) | | | -| `collateral_type` | [string](#string) | | | -| `start` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `rewards_per_second` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - - - - - -## incentive/genesis.proto - - - - - -### GenesisAccumulationTime - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `collateral_type` | [string](#string) | | | -| `previous_accumulation_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### GenesisDenoms - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `principal_denom` | [string](#string) | | | -| `cdp_minting_reward_denom` | [string](#string) | | | - - - - - - - - -### GenesisState -GenesisState defines the incentive module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.incentive.Params) | | | -| `cdp_accumulation_times` | [GenesisAccumulationTime](#ununifi.incentive.GenesisAccumulationTime) | repeated | | -| `cdp_minting_claims` | [CdpMintingClaim](#ununifi.incentive.CdpMintingClaim) | repeated | | -| `denoms` | [GenesisDenoms](#ununifi.incentive.GenesisDenoms) | | this line is used by starport scaffolding # genesis/proto/state | - - - - - - - - - - - - - - - - - - -## incentive/query.proto - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.incentive.Params) | | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.incentive.QueryParamsRequest) | [QueryParamsResponse](#ununifi.incentive.QueryParamsResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/incentive/params| - - - - - - - - -## incentive/tx.proto - - - - - -### MsgClaimCdpMintingReward - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `multiplier_name` | [string](#string) | | | - - - - - - - - -### MsgClaimCdpMintingRewardResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ClaimCdpMintingReward` | [MsgClaimCdpMintingReward](#ununifi.incentive.MsgClaimCdpMintingReward) | [MsgClaimCdpMintingRewardResponse](#ununifi.incentive.MsgClaimCdpMintingRewardResponse) | | | - - - - - - - - -## nftmarket/nftmarket.proto - - - - - -### BidId - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `bidder` | [string](#string) | | | - - - - - - - - -### EventBorrow - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `borrower` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventCancelBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventCancelListNfting - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventEndListNfting - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventExpandListingPeriod - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventLiquidate - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `liquidator` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventListNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventPayFullBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventPlaceBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventRepay - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `repayer` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventSellingDecision - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### Liquidation - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `liquidation_date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### Liquidations - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `liquidation` | [Liquidation](#ununifi.nftmarket.Liquidation) | | | -| `next_liquidation` | [Liquidation](#ununifi.nftmarket.Liquidation) | repeated | | - - - - - - - - -### ListedClass - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_ids` | [string](#string) | repeated | | - - - - - - - - -### Loan - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `loan` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### NftBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `bidder` | [string](#string) | | | -| `bid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `deposit_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `paid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `bidding_period` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `deposit_lending_rate` | [string](#string) | | | -| `automatic_payment` | [bool](#bool) | | | -| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `interest_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `borrowings` | [borrowing](#ununifi.nftmarket.borrowing) | repeated | lister borrowing bidder info | -| `id` | [BidId](#ununifi.nftmarket.BidId) | | todo remove nft_id,bidder then use it | - - - - - - - - -### NftIdentifier - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### NftInfo - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `uri` | [string](#string) | | | -| `uri_hash` | [string](#string) | | | - - - - - - - - -### NftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `owner` | [string](#string) | | | -| `listing_type` | [ListingType](#ununifi.nftmarket.ListingType) | | | -| `state` | [ListingState](#ununifi.nftmarket.ListingState) | | | -| `bid_token` | [string](#string) | | | -| `minimum_deposit_rate` | [string](#string) | | | -| `automatic_refinancing` | [bool](#bool) | | | -| `started_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `full_payment_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `successful_bid_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `auto_relisted_count` | [uint64](#uint64) | | | -| `collected_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `minimum_bidding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `min_staking_for_listing` | [string](#string) | | | -| `default_bid_active_rank` | [uint64](#uint64) | | | -| `bid_tokens` | [string](#string) | repeated | | -| `auto_relisting_count_if_no_bid` | [uint64](#uint64) | | | -| `nft_listing_delay_seconds` | [uint64](#uint64) | | | -| `nft_listing_period_initial` | [uint64](#uint64) | | | -| `nft_listing_cancel_required_seconds` | [uint64](#uint64) | | | -| `nft_listing_cancel_fee_percentage` | [uint64](#uint64) | | | -| `nft_listing_gap_time` | [uint64](#uint64) | | | -| `bid_cancel_required_seconds` | [uint64](#uint64) | | | -| `bid_token_disburse_seconds_after_cancel` | [uint64](#uint64) | | | -| `nft_listing_full_payment_period` | [uint64](#uint64) | | | -| `nft_listing_nft_delivery_period` | [uint64](#uint64) | | | -| `nft_creator_share_percentage` | [uint64](#uint64) | | | -| `market_administrator` | [string](#string) | | | -| `nft_listing_commission_fee` | [uint64](#uint64) | | | -| `nft_listing_extend_seconds` | [uint64](#uint64) | | | -| `nft_listing_period_extend_fee_per_hour` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### PaymentStatus - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `bidder` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `automatic_payment` | [bool](#bool) | | | -| `paid_amount` | [string](#string) | | | -| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `state` | [ListingState](#ununifi.nftmarket.ListingState) | | | -| `all_paid` | [bool](#bool) | | | - - - - - - - - -### borrowing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `paid_interest_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `start_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - - - -### ListingState - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| LISTING | 0 | | -| BIDDING | 1 | | -| SELLING_DECISION | 2 | | -| END_LISTING | 3 | | -| SUCCESSFUL_BID | 4 | | - - - - - -### ListingType - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| DIRECT_ASSET_BORROW | 0 | | -| SYNTHETIC_ASSET_CREATION | 1 | | -| LATE_SHIPPING | 2 | | - - - - - - - - - - - - - -## nftmarket/genesis.proto - - - - - -### GenesisState -GenesisState defines the nftmarket module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmarket.Params) | | | -| `listings` | [NftListing](#ununifi.nftmarket.NftListing) | repeated | | -| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | -| `cancelled_bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | -| `loans` | [Loan](#ununifi.nftmarket.Loan) | repeated | | - - - - - - - - - - - - - - - - - - -## nftmarket/query.proto - - - - - -### NftListingDetail - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `listing` | [NftListing](#ununifi.nftmarket.NftListing) | | | -| `nft_info` | [NftInfo](#ununifi.nftmarket.NftInfo) | | | - - - - - - - - -### QueryBidderBidsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | - - - - - - - - -### QueryBidderBidsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | - - - - - - - - -### QueryCDPsListRequest - - - - - - - - - -### QueryCDPsListResponse - - - - - - - - - -### QueryLiquidationRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryLiquidationResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `liquidations` | [Liquidations](#ununifi.nftmarket.Liquidations) | | | - - - - - - - - -### QueryListedClassRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_limit` | [int32](#int32) | | | - - - - - - - - -### QueryListedClassResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `name` | [string](#string) | | | -| `description` | [string](#string) | | | -| `symbol` | [string](#string) | | | -| `uri` | [string](#string) | | | -| `urihash` | [string](#string) | | | -| `nfts` | [NftInfo](#ununifi.nftmarket.NftInfo) | repeated | | -| `nft_count` | [uint64](#uint64) | | | - - - - - - - - -### QueryListedClassesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_limit` | [int32](#int32) | | | - - - - - - - - -### QueryListedClassesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `classes` | [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) | repeated | | - - - - - - - - -### QueryListedNftsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | - - - - - - - - -### QueryListedNftsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `listings` | [NftListingDetail](#ununifi.nftmarket.NftListingDetail) | repeated | | - - - - - - - - -### QueryLoanRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryLoanResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `loan` | [Loan](#ununifi.nftmarket.Loan) | | | -| `borrowing_limit` | [string](#string) | | | - - - - - - - - -### QueryLoansRequest - - - - - - - - - -### QueryLoansResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `loans` | [Loan](#ununifi.nftmarket.Loan) | repeated | | - - - - - - - - -### QueryNftBidsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryNftBidsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bids` | [NftBid](#ununifi.nftmarket.NftBid) | repeated | | - - - - - - - - -### QueryNftListingRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryNftListingResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `listing` | [NftListing](#ununifi.nftmarket.NftListing) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmarket.Params) | | | - - - - - - - - -### QueryPaymentStatusRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `bidder` | [string](#string) | | | - - - - - - - - -### QueryPaymentStatusResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `paymentStatus` | [PaymentStatus](#ununifi.nftmarket.PaymentStatus) | | | - - - - - - - - -### QueryRewardsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [uint64](#uint64) | | | - - - - - - - - -### QueryRewardsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.nftmarket.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmarket.QueryParamsResponse) | | GET|/ununifi/nftmarket/params| -| `NftListing` | [QueryNftListingRequest](#ununifi.nftmarket.QueryNftListingRequest) | [QueryNftListingResponse](#ununifi.nftmarket.QueryNftListingResponse) | | GET|/ununifi/nftmarket/nft_listing/{class_id}/{nft_id}| -| `ListedNfts` | [QueryListedNftsRequest](#ununifi.nftmarket.QueryListedNftsRequest) | [QueryListedNftsResponse](#ununifi.nftmarket.QueryListedNftsResponse) | | GET|/ununifi/nftmarket/listed_nfts| -| `ListedClasses` | [QueryListedClassesRequest](#ununifi.nftmarket.QueryListedClassesRequest) | [QueryListedClassesResponse](#ununifi.nftmarket.QueryListedClassesResponse) | | GET|/ununifi/nftmarket/listed_classes| -| `ListedClass` | [QueryListedClassRequest](#ununifi.nftmarket.QueryListedClassRequest) | [QueryListedClassResponse](#ununifi.nftmarket.QueryListedClassResponse) | | GET|/ununifi/nftmarket/listed_class/{class_id}/{nft_limit}| -| `Loans` | [QueryLoansRequest](#ununifi.nftmarket.QueryLoansRequest) | [QueryLoansResponse](#ununifi.nftmarket.QueryLoansResponse) | | GET|/ununifi/nftmarket/loans| -| `Loan` | [QueryLoanRequest](#ununifi.nftmarket.QueryLoanRequest) | [QueryLoanResponse](#ununifi.nftmarket.QueryLoanResponse) | | GET|/ununifi/nftmarket/loans/{class_id}/{nft_id}| -| `CDPsList` | [QueryCDPsListRequest](#ununifi.nftmarket.QueryCDPsListRequest) | [QueryCDPsListResponse](#ununifi.nftmarket.QueryCDPsListResponse) | | GET|/ununifi/nftmarket/cdps_list| -| `NftBids` | [QueryNftBidsRequest](#ununifi.nftmarket.QueryNftBidsRequest) | [QueryNftBidsResponse](#ununifi.nftmarket.QueryNftBidsResponse) | | GET|/ununifi/nftmarket/nft_bids/{class_id}/{nft_id}| -| `BidderBids` | [QueryBidderBidsRequest](#ununifi.nftmarket.QueryBidderBidsRequest) | [QueryBidderBidsResponse](#ununifi.nftmarket.QueryBidderBidsResponse) | | GET|/ununifi/nftmarket/bidder_bids/{bidder}| -| `PaymentStatus` | [QueryPaymentStatusRequest](#ununifi.nftmarket.QueryPaymentStatusRequest) | [QueryPaymentStatusResponse](#ununifi.nftmarket.QueryPaymentStatusResponse) | | GET|/ununifi/nftmarket/payment_status/{class_id}/{nft_id}/{bidder}| -| `Rewards` | [QueryRewardsRequest](#ununifi.nftmarket.QueryRewardsRequest) | [QueryRewardsResponse](#ununifi.nftmarket.QueryRewardsResponse) | | GET|/ununifi/nftmarket/rewards/{address}| -| `Liquidation` | [QueryLiquidationRequest](#ununifi.nftmarket.QueryLiquidationRequest) | [QueryLiquidationResponse](#ununifi.nftmarket.QueryLiquidationResponse) | | GET|/ununifi/nftmarket/liquidation/{class_id}/{nft_id}| - - - - - - - - -## nftmarket/tx.proto - - - - - -### MsgBorrow - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgBorrowResponse - - - - - - - - - -### MsgCancelBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - - - - - - - - -### MsgCancelBidResponse - - - - - - - - - -### MsgCancelNftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - - - - - - - - -### MsgCancelNftListingResponse - - - - - - - - - -### MsgEndNftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - - - - - - - - -### MsgEndNftListingResponse - - - - - - - - - -### MsgListNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `listing_type` | [ListingType](#ununifi.nftmarket.ListingType) | | | -| `bid_token` | [string](#string) | | | -| `minimum_deposit_rate` | [string](#string) | | 1% = 0.01 | -| `automatic_refinancing` | [bool](#bool) | | | -| `minimum_bidding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | | - - - - - - - - -### MsgListNftResponse - - - - - - - - - -### MsgMintNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `classId` | [string](#string) | | | -| `nftId` | [string](#string) | | | -| `nftUri` | [string](#string) | | | -| `nftUriHash` | [string](#string) | | | - - - - - - - - -### MsgMintNftResponse - - - - - - - - - -### MsgPayFullBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - - - - - - - - -### MsgPayFullBidResponse - - - - - - - - - -### MsgPlaceBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `bid_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `bidding_period` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `deposit_lending_rate` | [string](#string) | | | -| `automatic_payment` | [bool](#bool) | | | -| `deposit_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgPlaceBidResponse - - - - - - - - - -### MsgRepay - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgRepayResponse - - - - - - - - - -### MsgSellingDecision - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarket.NftIdentifier) | | | - - - - - - - - -### MsgSellingDecisionResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `MintNft` | [MsgMintNft](#ununifi.nftmarket.MsgMintNft) | [MsgMintNftResponse](#ununifi.nftmarket.MsgMintNftResponse) | | | -| `ListNft` | [MsgListNft](#ununifi.nftmarket.MsgListNft) | [MsgListNftResponse](#ununifi.nftmarket.MsgListNftResponse) | | | -| `CancelNftListing` | [MsgCancelNftListing](#ununifi.nftmarket.MsgCancelNftListing) | [MsgCancelNftListingResponse](#ununifi.nftmarket.MsgCancelNftListingResponse) | | | -| `PlaceBid` | [MsgPlaceBid](#ununifi.nftmarket.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.nftmarket.MsgPlaceBidResponse) | | | -| `CancelBid` | [MsgCancelBid](#ununifi.nftmarket.MsgCancelBid) | [MsgCancelBidResponse](#ununifi.nftmarket.MsgCancelBidResponse) | | | -| `SellingDecision` | [MsgSellingDecision](#ununifi.nftmarket.MsgSellingDecision) | [MsgSellingDecisionResponse](#ununifi.nftmarket.MsgSellingDecisionResponse) | | | -| `EndNftListing` | [MsgEndNftListing](#ununifi.nftmarket.MsgEndNftListing) | [MsgEndNftListingResponse](#ununifi.nftmarket.MsgEndNftListingResponse) | | | -| `PayFullBid` | [MsgPayFullBid](#ununifi.nftmarket.MsgPayFullBid) | [MsgPayFullBidResponse](#ununifi.nftmarket.MsgPayFullBidResponse) | | | -| `Borrow` | [MsgBorrow](#ununifi.nftmarket.MsgBorrow) | [MsgBorrowResponse](#ununifi.nftmarket.MsgBorrowResponse) | | | -| `Repay` | [MsgRepay](#ununifi.nftmarket.MsgRepay) | [MsgRepayResponse](#ununifi.nftmarket.MsgRepayResponse) | | | - - - - - - - - -## nftmarketv1/nftmarket.proto - - - - - -### EventBorrow - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `borrower` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventCancelBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventCancelListNfting - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventEndListNfting - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventExpandListingPeriod - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventLiquidate - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `liquidator` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventListNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventPayFullBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventPlaceBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventRepay - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `repayer` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `amount` | [string](#string) | | | - - - - - - - - -### EventSellingDecision - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### ListedClass - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_ids` | [string](#string) | repeated | | - - - - - - - - -### ListedNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `uri` | [string](#string) | | | -| `uri_hash` | [string](#string) | | | - - - - - - - - -### Loan - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `loan` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### NftBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `bidder` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `automatic_payment` | [bool](#bool) | | | -| `paid_amount` | [string](#string) | | | -| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### NftIdentifier - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### NftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `owner` | [string](#string) | | | -| `listing_type` | [ListingType](#ununifi.nftmarketv1.ListingType) | | | -| `state` | [ListingState](#ununifi.nftmarketv1.ListingState) | | | -| `bid_token` | [string](#string) | | | -| `min_bid` | [string](#string) | | | -| `bid_active_rank` | [uint64](#uint64) | | | -| `started_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `full_payment_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `successful_bid_end_at` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `auto_relisted_count` | [uint64](#uint64) | | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `min_staking_for_listing` | [string](#string) | | | -| `default_bid_active_rank` | [uint64](#uint64) | | | -| `bid_tokens` | [string](#string) | repeated | | -| `auto_relisting_count_if_no_bid` | [uint64](#uint64) | | | -| `nft_listing_delay_seconds` | [uint64](#uint64) | | | -| `nft_listing_period_initial` | [uint64](#uint64) | | | -| `nft_listing_cancel_required_seconds` | [uint64](#uint64) | | | -| `nft_listing_cancel_fee_percentage` | [uint64](#uint64) | | | -| `nft_listing_gap_time` | [uint64](#uint64) | | | -| `bid_cancel_required_seconds` | [uint64](#uint64) | | | -| `bid_token_disburse_seconds_after_cancel` | [uint64](#uint64) | | | -| `nft_listing_full_payment_period` | [uint64](#uint64) | | | -| `nft_listing_nft_delivery_period` | [uint64](#uint64) | | | -| `nft_creator_share_percentage` | [uint64](#uint64) | | | -| `market_administrator` | [string](#string) | | | -| `nft_listing_commission_fee` | [uint64](#uint64) | | | -| `nft_listing_extend_seconds` | [uint64](#uint64) | | | -| `nft_listing_period_extend_fee_per_hour` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### PaymentStatus - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `bidder` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `automatic_payment` | [bool](#bool) | | | -| `paid_amount` | [string](#string) | | | -| `bid_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `state` | [ListingState](#ununifi.nftmarketv1.ListingState) | | | -| `all_paid` | [bool](#bool) | | | - - - - - - - - - - -### ListingState - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| LISTING | 0 | | -| BIDDING | 1 | | -| SELLING_DECISION | 2 | | -| LIQUIDATION | 3 | | -| END_LISTING | 4 | | -| SUCCESSFUL_BID | 5 | | - - - - - -### ListingType - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| DIRECT_ASSET_BORROW | 0 | | -| SYNTHETIC_ASSET_CREATION | 1 | | -| LATE_SHIPPING | 2 | | - - - - - - - - - - - - - -## nftmarketv1/genesis.proto - - - - - -### GenesisState -GenesisState defines the nftmarket module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmarketv1.Params) | | | -| `listings` | [NftListing](#ununifi.nftmarketv1.NftListing) | repeated | | -| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | -| `cancelled_bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | -| `loans` | [Loan](#ununifi.nftmarketv1.Loan) | repeated | | - - - - - - - - - - - - - - - - - - -## nftmarketv1/query.proto - - - - - -### QueryBidderBidsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bidder` | [string](#string) | | | - - - - - - - - -### QueryBidderBidsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | - - - - - - - - -### QueryCDPsListRequest - - - - - - - - - -### QueryCDPsListResponse - - - - - - - - - -### QueryListedClassRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_limit` | [int32](#int32) | | | - - - - - - - - -### QueryListedClassResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `name` | [string](#string) | | | -| `description` | [string](#string) | | | -| `symbol` | [string](#string) | | | -| `uri` | [string](#string) | | | -| `urihash` | [string](#string) | | | -| `nfts` | [ListedNft](#ununifi.nftmarketv1.ListedNft) | repeated | | -| `nft_count` | [uint64](#uint64) | | | - - - - - - - - -### QueryListedClassesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `nft_limit` | [int32](#int32) | | | - - - - - - - - -### QueryListedClassesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `classes` | [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) | repeated | | - - - - - - - - -### QueryListedNftsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | - - - - - - - - -### QueryListedNftsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `listings` | [NftListing](#ununifi.nftmarketv1.NftListing) | repeated | | - - - - - - - - -### QueryLoanRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryLoanResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `loan` | [Loan](#ununifi.nftmarketv1.Loan) | | | -| `borrowing_limit` | [string](#string) | | | - - - - - - - - -### QueryLoansRequest - - - - - - - - - -### QueryLoansResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `loans` | [Loan](#ununifi.nftmarketv1.Loan) | repeated | | - - - - - - - - -### QueryNftBidsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryNftBidsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bids` | [NftBid](#ununifi.nftmarketv1.NftBid) | repeated | | - - - - - - - - -### QueryNftListingRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryNftListingResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `listing` | [NftListing](#ununifi.nftmarketv1.NftListing) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmarketv1.Params) | | | - - - - - - - - -### QueryPaymentStatusRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `bidder` | [string](#string) | | | - - - - - - - - -### QueryPaymentStatusResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `paymentStatus` | [PaymentStatus](#ununifi.nftmarketv1.PaymentStatus) | | | - - - - - - - - -### QueryRewardsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [uint64](#uint64) | | | - - - - - - - - -### QueryRewardsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.nftmarketv1.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmarketv1.QueryParamsResponse) | | GET|/ununifi/nftmarket/params| -| `NftListing` | [QueryNftListingRequest](#ununifi.nftmarketv1.QueryNftListingRequest) | [QueryNftListingResponse](#ununifi.nftmarketv1.QueryNftListingResponse) | | GET|/ununifi/nftmarket/nft_listing/{class_id}/{nft_id}| -| `ListedNfts` | [QueryListedNftsRequest](#ununifi.nftmarketv1.QueryListedNftsRequest) | [QueryListedNftsResponse](#ununifi.nftmarketv1.QueryListedNftsResponse) | | GET|/ununifi/nftmarket/listed_nfts| -| `ListedClasses` | [QueryListedClassesRequest](#ununifi.nftmarketv1.QueryListedClassesRequest) | [QueryListedClassesResponse](#ununifi.nftmarketv1.QueryListedClassesResponse) | | GET|/ununifi/nftmarket/listed_classes| -| `ListedClass` | [QueryListedClassRequest](#ununifi.nftmarketv1.QueryListedClassRequest) | [QueryListedClassResponse](#ununifi.nftmarketv1.QueryListedClassResponse) | | GET|/ununifi/nftmarket/listed_class/{class_id}/{nft_limit}| -| `Loans` | [QueryLoansRequest](#ununifi.nftmarketv1.QueryLoansRequest) | [QueryLoansResponse](#ununifi.nftmarketv1.QueryLoansResponse) | | GET|/ununifi/nftmarket/loans| -| `Loan` | [QueryLoanRequest](#ununifi.nftmarketv1.QueryLoanRequest) | [QueryLoanResponse](#ununifi.nftmarketv1.QueryLoanResponse) | | GET|/ununifi/nftmarket/loans/{class_id}/{nft_id}| -| `CDPsList` | [QueryCDPsListRequest](#ununifi.nftmarketv1.QueryCDPsListRequest) | [QueryCDPsListResponse](#ununifi.nftmarketv1.QueryCDPsListResponse) | | GET|/ununifi/nftmarket/cdps_list| -| `NftBids` | [QueryNftBidsRequest](#ununifi.nftmarketv1.QueryNftBidsRequest) | [QueryNftBidsResponse](#ununifi.nftmarketv1.QueryNftBidsResponse) | | GET|/ununifi/nftmarket/nft_bids/{class_id}/{nft_id}| -| `BidderBids` | [QueryBidderBidsRequest](#ununifi.nftmarketv1.QueryBidderBidsRequest) | [QueryBidderBidsResponse](#ununifi.nftmarketv1.QueryBidderBidsResponse) | | GET|/ununifi/nftmarket/bidder_bids/{bidder}| -| `PaymentStatus` | [QueryPaymentStatusRequest](#ununifi.nftmarketv1.QueryPaymentStatusRequest) | [QueryPaymentStatusResponse](#ununifi.nftmarketv1.QueryPaymentStatusResponse) | | GET|/ununifi/nftmarket/payment_status/{class_id}/{nft_id}/{bidder}| -| `Rewards` | [QueryRewardsRequest](#ununifi.nftmarketv1.QueryRewardsRequest) | [QueryRewardsResponse](#ununifi.nftmarketv1.QueryRewardsResponse) | | GET|/ununifi/nftmarket/rewards/{address}| - - - - - - - - -## nftmarketv1/tx.proto - - - - - -### MsgBorrow - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgBorrowResponse - - - - - - - - - -### MsgBurnStableCoin - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | - - - - - - - - -### MsgBurnStableCoinResponse - - - - - - - - - -### MsgCancelBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgCancelBidResponse - - - - - - - - - -### MsgCancelNftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgCancelNftListingResponse - - - - - - - - - -### MsgEndNftListing - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgEndNftListingResponse - - - - - - - - - -### MsgExpandListingPeriod - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgExpandListingPeriodResponse - - - - - - - - - -### MsgLiquidate - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgLiquidateResponse - - - - - - - - - -### MsgListNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `listing_type` | [ListingType](#ununifi.nftmarketv1.ListingType) | | | -| `bid_token` | [string](#string) | | | -| `min_bid` | [string](#string) | | | -| `bid_active_rank` | [uint64](#uint64) | | | - - - - - - - - -### MsgListNftResponse - - - - - - - - - -### MsgMintNft - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `classId` | [string](#string) | | | -| `nftId` | [string](#string) | | | -| `nftUri` | [string](#string) | | | -| `nftUriHash` | [string](#string) | | | - - - - - - - - -### MsgMintNftResponse - - - - - - - - - -### MsgMintStableCoin - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | - - - - - - - - -### MsgMintStableCoinResponse - - - - - - - - - -### MsgPayFullBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgPayFullBidResponse - - - - - - - - - -### MsgPlaceBid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `automatic_payment` | [bool](#bool) | | | - - - - - - - - -### MsgPlaceBidResponse - - - - - - - - - -### MsgRepay - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgRepayResponse - - - - - - - - - -### MsgSellingDecision - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `nft_id` | [NftIdentifier](#ununifi.nftmarketv1.NftIdentifier) | | | - - - - - - - - -### MsgSellingDecisionResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `MintNft` | [MsgMintNft](#ununifi.nftmarketv1.MsgMintNft) | [MsgMintNftResponse](#ununifi.nftmarketv1.MsgMintNftResponse) | | | -| `ListNft` | [MsgListNft](#ununifi.nftmarketv1.MsgListNft) | [MsgListNftResponse](#ununifi.nftmarketv1.MsgListNftResponse) | | | -| `CancelNftListing` | [MsgCancelNftListing](#ununifi.nftmarketv1.MsgCancelNftListing) | [MsgCancelNftListingResponse](#ununifi.nftmarketv1.MsgCancelNftListingResponse) | | | -| `ExpandListingPeriod` | [MsgExpandListingPeriod](#ununifi.nftmarketv1.MsgExpandListingPeriod) | [MsgExpandListingPeriodResponse](#ununifi.nftmarketv1.MsgExpandListingPeriodResponse) | | | -| `PlaceBid` | [MsgPlaceBid](#ununifi.nftmarketv1.MsgPlaceBid) | [MsgPlaceBidResponse](#ununifi.nftmarketv1.MsgPlaceBidResponse) | | | -| `CancelBid` | [MsgCancelBid](#ununifi.nftmarketv1.MsgCancelBid) | [MsgCancelBidResponse](#ununifi.nftmarketv1.MsgCancelBidResponse) | | | -| `SellingDecision` | [MsgSellingDecision](#ununifi.nftmarketv1.MsgSellingDecision) | [MsgSellingDecisionResponse](#ununifi.nftmarketv1.MsgSellingDecisionResponse) | | | -| `EndNftListing` | [MsgEndNftListing](#ununifi.nftmarketv1.MsgEndNftListing) | [MsgEndNftListingResponse](#ununifi.nftmarketv1.MsgEndNftListingResponse) | | | -| `PayFullBid` | [MsgPayFullBid](#ununifi.nftmarketv1.MsgPayFullBid) | [MsgPayFullBidResponse](#ununifi.nftmarketv1.MsgPayFullBidResponse) | | | -| `Borrow` | [MsgBorrow](#ununifi.nftmarketv1.MsgBorrow) | [MsgBorrowResponse](#ununifi.nftmarketv1.MsgBorrowResponse) | | | -| `Repay` | [MsgRepay](#ununifi.nftmarketv1.MsgRepay) | [MsgRepayResponse](#ununifi.nftmarketv1.MsgRepayResponse) | | | -| `MintStableCoin` | [MsgMintStableCoin](#ununifi.nftmarketv1.MsgMintStableCoin) | [MsgMintStableCoinResponse](#ununifi.nftmarketv1.MsgMintStableCoinResponse) | | | -| `BurnStableCoin` | [MsgBurnStableCoin](#ununifi.nftmarketv1.MsgBurnStableCoin) | [MsgBurnStableCoinResponse](#ununifi.nftmarketv1.MsgBurnStableCoinResponse) | | | -| `Liquidate` | [MsgLiquidate](#ununifi.nftmarketv1.MsgLiquidate) | [MsgLiquidateResponse](#ununifi.nftmarketv1.MsgLiquidateResponse) | | | - - - - - - - - -## nftmint/nftmint.proto - - - - - -### ClassAttributes - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `owner` | [string](#string) | | | -| `base_token_uri` | [string](#string) | | | -| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | -| `token_supply_cap` | [uint64](#uint64) | | | - - - - - - - - -### ClassNameIdList - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_name` | [string](#string) | | | -| `class_id` | [string](#string) | repeated | | - - - - - - - - -### OwningClassIdList - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | repeated | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `MaxNFTSupplyCap` | [uint64](#uint64) | | | -| `MinClassNameLen` | [uint64](#uint64) | | | -| `MaxClassNameLen` | [uint64](#uint64) | | | -| `MinUriLen` | [uint64](#uint64) | | | -| `MaxUriLen` | [uint64](#uint64) | | | -| `MaxSymbolLen` | [uint64](#uint64) | | | -| `MaxDescriptionLen` | [uint64](#uint64) | | | - - - - - - - - - - -### MintingPermission - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| OnlyOwner | 0 | | -| Anyone | 1 | WhiteList = 2; | - - - - - - - - - - - - - -## nftmint/event.proto - - - - - -### EventBurnNFT - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `burner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### EventCreateClass - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `base_token_uri` | [string](#string) | | | -| `token_supply_cap` | [string](#string) | | | -| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | - - - - - - - - -### EventMintNFT - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `owner` | [string](#string) | | | -| `minter` | [string](#string) | | | - - - - - - - - -### EventSendClassOwnership - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `receiver` | [string](#string) | | | -| `class_id` | [string](#string) | | | - - - - - - - - -### EventUpdateBaseTokenUri - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `base_token_uri` | [string](#string) | | | - - - - - - - - -### EventUpdateTokenSupplyCap - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `token_supply_cap` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## nftmint/genesis.proto - - - - - -### GenesisState -GenesisState defines the nftmint module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmint.Params) | | | -| `class_attributes_list` | [ClassAttributes](#ununifi.nftmint.ClassAttributes) | repeated | | - - - - - - - - - - - - - - - - - - -## nftmint/query.proto - - - - - -### QueryClassAttributesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | - - - - - - - - -### QueryClassAttributesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_attributes` | [ClassAttributes](#ununifi.nftmint.ClassAttributes) | | | - - - - - - - - -### QueryClassIdsByNameRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_name` | [string](#string) | | | - - - - - - - - -### QueryClassIdsByNameResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_name_id_list` | [ClassNameIdList](#ununifi.nftmint.ClassNameIdList) | | | - - - - - - - - -### QueryClassIdsByOwnerRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owner` | [string](#string) | | | - - - - - - - - -### QueryClassIdsByOwnerResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owning_class_id_list` | [OwningClassIdList](#ununifi.nftmint.OwningClassIdList) | | | - - - - - - - - -### QueryNFTMinterRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### QueryNFTMinterResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `minter` | [string](#string) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.nftmint.Params) | | | - - - - - - - - - - - - - - -### Query - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.nftmint.QueryParamsRequest) | [QueryParamsResponse](#ununifi.nftmint.QueryParamsResponse) | | GET|/ununifi/nftmint/params| -| `ClassAttributes` | [QueryClassAttributesRequest](#ununifi.nftmint.QueryClassAttributesRequest) | [QueryClassAttributesResponse](#ununifi.nftmint.QueryClassAttributesResponse) | | GET|/ununifi/nftmint/class_owner/{class_id}| -| `NFTMinter` | [QueryNFTMinterRequest](#ununifi.nftmint.QueryNFTMinterRequest) | [QueryNFTMinterResponse](#ununifi.nftmint.QueryNFTMinterResponse) | | GET|/ununifi/nftmint/nft_minter/{class_id}/{nft_id}| -| `ClassIdsByName` | [QueryClassIdsByNameRequest](#ununifi.nftmint.QueryClassIdsByNameRequest) | [QueryClassIdsByNameResponse](#ununifi.nftmint.QueryClassIdsByNameResponse) | | GET|/ununifi/nftmint/class_ids_by_name/{class_name}| -| `ClassIdsByOwner` | [QueryClassIdsByOwnerRequest](#ununifi.nftmint.QueryClassIdsByOwnerRequest) | [QueryClassIdsByOwnerResponse](#ununifi.nftmint.QueryClassIdsByOwnerResponse) | | GET|/ununifi/nftmint/class_ids_by_owner/{owner}| - - - - - - - - -## nftmint/tx.proto - - - - - -### MsgBurnNFT - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | - - - - - - - - -### MsgBurnNFTResponse - - - - - - - - - -### MsgCreateClass - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `name` | [string](#string) | | | -| `base_token_uri` | [string](#string) | | | -| `token_supply_cap` | [uint64](#uint64) | | | -| `minting_permission` | [MintingPermission](#ununifi.nftmint.MintingPermission) | | | -| `symbol` | [string](#string) | | | -| `description` | [string](#string) | | | -| `class_uri` | [string](#string) | | | - - - - - - - - -### MsgCreateClassResponse - - - - - - - - - -### MsgMintNFT - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `nft_id` | [string](#string) | | | -| `recipient` | [string](#string) | | | - - - - - - - - -### MsgMintNFTResponse - - - - - - - - - -### MsgSendClassOwnership - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `recipient` | [string](#string) | | | - - - - - - - - -### MsgSendClassOwnershipResponse - - - - - - - - - -### MsgUpdateBaseTokenUri - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `base_token_uri` | [string](#string) | | | - - - - - - - - -### MsgUpdateBaseTokenUriResponse - - - - - - - - - -### MsgUpdateTokenSupplyCap - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `class_id` | [string](#string) | | | -| `token_supply_cap` | [uint64](#uint64) | | | - - - - - - - - -### MsgUpdateTokenSupplyCapResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateClass` | [MsgCreateClass](#ununifi.nftmint.MsgCreateClass) | [MsgCreateClassResponse](#ununifi.nftmint.MsgCreateClassResponse) | | | -| `SendClassOwnership` | [MsgSendClassOwnership](#ununifi.nftmint.MsgSendClassOwnership) | [MsgSendClassOwnershipResponse](#ununifi.nftmint.MsgSendClassOwnershipResponse) | | | -| `UpdateBaseTokenUri` | [MsgUpdateBaseTokenUri](#ununifi.nftmint.MsgUpdateBaseTokenUri) | [MsgUpdateBaseTokenUriResponse](#ununifi.nftmint.MsgUpdateBaseTokenUriResponse) | | | -| `UpdateTokenSupplyCap` | [MsgUpdateTokenSupplyCap](#ununifi.nftmint.MsgUpdateTokenSupplyCap) | [MsgUpdateTokenSupplyCapResponse](#ununifi.nftmint.MsgUpdateTokenSupplyCapResponse) | | | -| `MintNFT` | [MsgMintNFT](#ununifi.nftmint.MsgMintNFT) | [MsgMintNFTResponse](#ununifi.nftmint.MsgMintNFTResponse) | | | -| `BurnNFT` | [MsgBurnNFT](#ununifi.nftmint.MsgBurnNFT) | [MsgBurnNFTResponse](#ununifi.nftmint.MsgBurnNFTResponse) | | | - - - - - - - - -## pricefeed/pricefeed.proto - - - - - -### CurrentPrice - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | -| `price` | [string](#string) | | | - - - - - - - - -### Market - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | -| `base_asset` | [string](#string) | | | -| `quote_asset` | [string](#string) | | | -| `oracles` | [string](#string) | repeated | | -| `active` | [bool](#bool) | | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `markets` | [Market](#ununifi.pricefeed.Market) | repeated | | - - - - - - - - -### PostedPrice - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | -| `oracle_address` | [string](#string) | | | -| `price` | [string](#string) | | | -| `expiry` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - - - - - - - - - - - -## pricefeed/genesis.proto - - - - - -### GenesisState -GenesisState defines the pricefeed module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.pricefeed.Params) | | | -| `posted_prices` | [PostedPrice](#ununifi.pricefeed.PostedPrice) | repeated | this line is used by starport scaffolding # genesis/proto/state | - - - - - - - - - - - - - - - - - - -## pricefeed/query.proto - - - - - -### QueryAllMarketRequest -this line is used by starport scaffolding # 3 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllMarketResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `markets` | [Market](#ununifi.pricefeed.Market) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryAllOracleRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllOracleResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `oracles` | [string](#string) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryAllPriceRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllPriceResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `prices` | [CurrentPrice](#ununifi.pricefeed.CurrentPrice) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryAllRawPriceRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllRawPriceResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `prices` | [PostedPrice](#ununifi.pricefeed.PostedPrice) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryGetPriceRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `market_id` | [string](#string) | | | - - - - - - - - -### QueryGetPriceResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `price` | [CurrentPrice](#ununifi.pricefeed.CurrentPrice) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.pricefeed.Params) | | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.pricefeed.QueryParamsRequest) | [QueryParamsResponse](#ununifi.pricefeed.QueryParamsResponse) | | GET|/ununifi/pricefeed/params| -| `MarketAll` | [QueryAllMarketRequest](#ununifi.pricefeed.QueryAllMarketRequest) | [QueryAllMarketResponse](#ununifi.pricefeed.QueryAllMarketResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/pricefeed/markets| -| `OracleAll` | [QueryAllOracleRequest](#ununifi.pricefeed.QueryAllOracleRequest) | [QueryAllOracleResponse](#ununifi.pricefeed.QueryAllOracleResponse) | | GET|/ununifi/pricefeed/markets/{market_id}/oracles| -| `Price` | [QueryGetPriceRequest](#ununifi.pricefeed.QueryGetPriceRequest) | [QueryGetPriceResponse](#ununifi.pricefeed.QueryGetPriceResponse) | | GET|/ununifi/pricefeed/markets/{market_id}/price| -| `PriceAll` | [QueryAllPriceRequest](#ununifi.pricefeed.QueryAllPriceRequest) | [QueryAllPriceResponse](#ununifi.pricefeed.QueryAllPriceResponse) | | GET|/ununifi/pricefeed/prices| -| `RawPriceAll` | [QueryAllRawPriceRequest](#ununifi.pricefeed.QueryAllRawPriceRequest) | [QueryAllRawPriceResponse](#ununifi.pricefeed.QueryAllRawPriceResponse) | | GET|/ununifi/pricefeed/markets/{market_id}/raw_prices| - - - - - - - - -## pricefeed/tx.proto - - - - - -### MsgPostPrice - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from` | [string](#string) | | | -| `market_id` | [string](#string) | | | -| `price` | [string](#string) | | | -| `expiry` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### MsgPostPriceResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `PostPrice` | [MsgPostPrice](#ununifi.pricefeed.MsgPostPrice) | [MsgPostPriceResponse](#ununifi.pricefeed.MsgPostPriceResponse) | | | - - - - - - - - -## ununifidist/ununifidist.proto - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `active` | [bool](#bool) | | | -| `periods` | [Period](#ununifi.ununifidist.Period) | repeated | | - - - - - - - - -### Period - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `start` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `inflation` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## ununifidist/genesis.proto - - - - - -### GenesisState -GenesisState defines the ununifidist module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.ununifidist.Params) | | | -| `previous_block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `gov_denom` | [string](#string) | | this line is used by starport scaffolding # genesis/proto/state | - - - - - - - - - - - - - - - - - - -## ununifidist/query.proto - - - - - -### QueryGetBalancesRequest - - - - - - - - - -### QueryGetBalancesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `balances` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.ununifidist.Params) | | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.ununifidist.QueryParamsRequest) | [QueryParamsResponse](#ununifi.ununifidist.QueryParamsResponse) | | GET|/ununifi/ununifidist/params| -| `Balances` | [QueryGetBalancesRequest](#ununifi.ununifidist.QueryGetBalancesRequest) | [QueryGetBalancesResponse](#ununifi.ununifidist.QueryGetBalancesResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/ununifidist/balances| - - - - - - - - -## yield-aggregator/params.proto - - - - - -### Params -Params defines the parameters for the module. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `commission_rate` | [string](#string) | | | -| `vault_creation_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `vault_creation_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - - - - - -## yield-aggregator/yield-aggregator.proto - - - - - -### Strategy - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `id` | [uint64](#uint64) | | | -| `contract_address` | [string](#string) | | | -| `name` | [string](#string) | | | - - - - - - - - -### StrategyMetrics - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `allocation` | [string](#string) | | | -| `apr` | [string](#string) | | | - - - - - - - - -### StrategyWeight - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `strategy_id` | [uint64](#uint64) | | | -| `weight` | [string](#string) | | | - - - - - - - - -### Vault - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `denom` | [string](#string) | | | -| `owner` | [string](#string) | | | -| `owner_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `withdraw_commission_rate` | [string](#string) | | | -| `withdraw_reserve_rate` | [string](#string) | | | -| `strategy_weights` | [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) | repeated | | - - - - - - - - -### VaultMetrics - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `allocation` | [string](#string) | | | -| `apy` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## yield-aggregator/genesis.proto - - - - - -### GenesisState -GenesisState defines the yieldaggregator module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.yieldaggregator.Params) | | | -| `vaults` | [Vault](#ununifi.yieldaggregator.Vault) | repeated | this line is used by starport scaffolding # genesis/proto/state | -| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | - - - - - - - - - - - - - - - - - - -## yield-aggregator/proposal.proto - - - - - -### ProposalAddStrategy -proposal to add new strategy. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `denom` | [string](#string) | | | -| `contract_address` | [string](#string) | | | -| `name` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## yield-aggregator/query.proto - - - - - -### QueryAllStrategyRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllStrategyResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryAllVaultRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryAllVaultResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `vaults` | [Vault](#ununifi.yieldaggregator.Vault) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryEstimateMintAmountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `deposit_amount` | [string](#string) | | | - - - - - - - - -### QueryEstimateMintAmountResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `mint_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### QueryEstimateRedeemAmountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `burn_amount` | [string](#string) | | | - - - - - - - - -### QueryEstimateRedeemAmountResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `redeem_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### QueryGetStrategyRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `id` | [uint64](#uint64) | | | - - - - - - - - -### QueryGetStrategyResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `strategy` | [Strategy](#ununifi.yieldaggregator.Strategy) | | | - - - - - - - - -### QueryGetVaultRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | - - - - - - - - -### QueryGetVaultResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `vault` | [Vault](#ununifi.yieldaggregator.Vault) | | | -| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | -| `vault_address` | [string](#string) | | | -| `total_bonded_amount` | [string](#string) | | | -| `total_unbonding_amount` | [string](#string) | | | -| `total_withdrawal_balance` | [string](#string) | | | - - - - - - - - -### QueryParamsRequest -QueryParamsRequest is request type for the Query/Params RPC method. - - - - - - - - -### QueryParamsResponse -QueryParamsResponse is response type for the Query/Params RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.yieldaggregator.Params) | | params holds all the parameters of this module. | - - - - - - - - - - - - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.yieldaggregator.QueryParamsRequest) | [QueryParamsResponse](#ununifi.yieldaggregator.QueryParamsResponse) | Parameters queries the parameters of the module. | GET|/ununifi/yield-aggregator/params| -| `VaultAll` | [QueryAllVaultRequest](#ununifi.yieldaggregator.QueryAllVaultRequest) | [QueryAllVaultResponse](#ununifi.yieldaggregator.QueryAllVaultResponse) | this line is used by starport scaffolding # 2 | GET|/ununifi/yield-aggregator/vaults| -| `Vault` | [QueryGetVaultRequest](#ununifi.yieldaggregator.QueryGetVaultRequest) | [QueryGetVaultResponse](#ununifi.yieldaggregator.QueryGetVaultResponse) | | GET|/ununifi/yield-aggregator/vaults/{id}| -| `StrategyAll` | [QueryAllStrategyRequest](#ununifi.yieldaggregator.QueryAllStrategyRequest) | [QueryAllStrategyResponse](#ununifi.yieldaggregator.QueryAllStrategyResponse) | | GET|/ununifi/yield-aggregator/strategies/query-param| -| `Strategy` | [QueryGetStrategyRequest](#ununifi.yieldaggregator.QueryGetStrategyRequest) | [QueryGetStrategyResponse](#ununifi.yieldaggregator.QueryGetStrategyResponse) | | GET|/ununifi/yield-aggregator/strategies/{id}| -| `EstimateMintAmount` | [QueryEstimateMintAmountRequest](#ununifi.yieldaggregator.QueryEstimateMintAmountRequest) | [QueryEstimateMintAmountResponse](#ununifi.yieldaggregator.QueryEstimateMintAmountResponse) | | GET|/ununifi/yield-aggregator/vaults/{id}/estimate-mint-amount| -| `EstimateRedeemAmount` | [QueryEstimateRedeemAmountRequest](#ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest) | [QueryEstimateRedeemAmountResponse](#ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse) | | GET|/ununifi/yield-aggregator/vaults/{id}/estimate-redeem-amount| - - - - - - - - -## yield-aggregator/tx.proto - - - - - -### MsgCreateVault - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `denom` | [string](#string) | | | -| `commission_rate` | [string](#string) | | | -| `withdraw_reserve_rate` | [string](#string) | | | -| `strategy_weights` | [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) | repeated | | -| `fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgCreateVaultResponse - - - - - - - - - -### MsgDeleteVault - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `vault_id` | [uint64](#uint64) | | | - - - - - - - - -### MsgDeleteVaultResponse - - - - - - - - - -### MsgDepositToVault -this line is used by starport scaffolding # proto/tx/message - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `vault_id` | [uint64](#uint64) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgDepositToVaultResponse - - - - - - - - - -### MsgTransferVaultOwnership - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `vault_id` | [uint64](#uint64) | | | -| `recipient` | [string](#string) | | | - - - - - - - - -### MsgTransferVaultOwnershipResponse - - - - - - - - - -### MsgWithdrawFromVault - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `vault_id` | [uint64](#uint64) | | | -| `lp_token_amount` | [string](#string) | | | - - - - - - - - -### MsgWithdrawFromVaultResponse - - - - - - - - - - - - - - - -### Msg -Msg defines the Msg service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `DepositToVault` | [MsgDepositToVault](#ununifi.yieldaggregator.MsgDepositToVault) | [MsgDepositToVaultResponse](#ununifi.yieldaggregator.MsgDepositToVaultResponse) | this line is used by starport scaffolding # proto/tx/rpc | | -| `WithdrawFromVault` | [MsgWithdrawFromVault](#ununifi.yieldaggregator.MsgWithdrawFromVault) | [MsgWithdrawFromVaultResponse](#ununifi.yieldaggregator.MsgWithdrawFromVaultResponse) | | | -| `CreateVault` | [MsgCreateVault](#ununifi.yieldaggregator.MsgCreateVault) | [MsgCreateVaultResponse](#ununifi.yieldaggregator.MsgCreateVaultResponse) | | | -| `DeleteVault` | [MsgDeleteVault](#ununifi.yieldaggregator.MsgDeleteVault) | [MsgDeleteVaultResponse](#ununifi.yieldaggregator.MsgDeleteVaultResponse) | | | -| `TransferVaultOwnership` | [MsgTransferVaultOwnership](#ununifi.yieldaggregator.MsgTransferVaultOwnership) | [MsgTransferVaultOwnershipResponse](#ununifi.yieldaggregator.MsgTransferVaultOwnershipResponse) | | | - - - - - - - - -## yieldaggregatorv1/params.proto - - - - - -### Params -Params defines the parameters for the module. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `reward_rate_feeders` | [string](#string) | | | - - - - - - - - - - - - - - - - - - -## yieldaggregatorv1/asset.proto - - - - - -### AssetCondition - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `min` | [string](#string) | | | -| `ratio` | [uint32](#uint32) | | | - - - - - - - - -### AssetManagementAccount - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `name` | [string](#string) | | | -| `enabled` | [bool](#bool) | | | - - - - - - - - -### AssetManagementTarget - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `asset_management_account_id` | [string](#string) | | | -| `account_address` | [string](#string) | | | -| `asset_conditions` | [AssetCondition](#ununifi.chain.yieldaggregator.AssetCondition) | repeated | | -| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `integrate_info` | [IntegrateInfo](#ununifi.chain.yieldaggregator.IntegrateInfo) | | | -| `enabled` | [bool](#bool) | | | - - - - - - - - -### DailyPercent - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `account_id` | [string](#string) | | | -| `target_id` | [string](#string) | | | -| `rate` | [string](#string) | | | -| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - -### DepositAllocation - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `order_id` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### FarmingOrder - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `from_address` | [string](#string) | | | -| `strategy` | [Strategy](#ununifi.chain.yieldaggregator.Strategy) | | | -| `max_unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `overall_ratio` | [uint32](#uint32) | | | -| `min` | [string](#string) | | | -| `max` | [string](#string) | | | -| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `active` | [bool](#bool) | | | - - - - - - - - -### FarmingUnit -FarmingUnit is managing users' investment on a yield farm target -Here, amount field is the amount withdrawable instantly, staked amount on yield farms are not calculated here -since the value of staked amount could change after deposit - it's only determined at the time of withdrawal -from the farm - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `account_id` | [string](#string) | | | -| `target_id` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `farming_start_time` | [string](#string) | | | -| `unbonding_starttime` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `owner` | [string](#string) | | | +this line is used by starport scaffolding # 3 +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +### QueryAllMarketResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `markets` | [Market](#ununifi.pricefeed.Market) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + - +### QueryAllOracleRequest -### IntegrateInfo +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `market_id` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +### QueryAllOracleResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `type` | [IntegrateType](#ununifi.chain.yieldaggregator.IntegrateType) | | | -| `contract_ibc_port_id` | [string](#string) | | for cosmwasm contract | -| `mod_name` | [string](#string) | | for golang module | +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `oracles` | [string](#string) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### QueryAllPriceRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +### QueryAllPriceResponse - +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `prices` | [CurrentPrice](#ununifi.pricefeed.CurrentPrice) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | -### Strategy -Strategy types -recent30DaysHighDPRStrategy - Invest in the best DPR destination in the last 30 days on average -recent1DayHighDPRStrategy - Invest in the best DPR destination in the last average day -notHaveDPRStrategy - Invest in something that does not have a DPR. -ManualStrategy - Manual investment, whiteTargetIdlist required. + +### QueryAllRawPriceRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `strategy_type` | [string](#string) | | | -| `whitelisted_target_ids` | [string](#string) | repeated | | -| `blacklisted_target_ids` | [string](#string) | repeated | | +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `market_id` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +### QueryAllRawPriceResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `prices` | [PostedPrice](#ununifi.pricefeed.PostedPrice) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### QueryGetPriceRequest - +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `market_id` | [string](#string) | | | -### UserDeposit + +### QueryGetPriceResponse +| Field | Type | Label | Description | +| ------- | ----------------------------------------------- | ----- | ----------- | +| `price` | [CurrentPrice](#ununifi.pricefeed.CurrentPrice) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `user` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + +### QueryParamsRequest + +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | ----------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.pricefeed.Params) | | | + - + -### UserInfo + + +### Query -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `user` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | -| `farmed_counter` | [uint64](#uint64) | | | +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------- | --------- | ------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.pricefeed.QueryParamsRequest) | [QueryParamsResponse](#ununifi.pricefeed.QueryParamsResponse) | | GET | /ununifi/pricefeed/params | +| `MarketAll` | [QueryAllMarketRequest](#ununifi.pricefeed.QueryAllMarketRequest) | [QueryAllMarketResponse](#ununifi.pricefeed.QueryAllMarketResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/pricefeed/markets | +| `OracleAll` | [QueryAllOracleRequest](#ununifi.pricefeed.QueryAllOracleRequest) | [QueryAllOracleResponse](#ununifi.pricefeed.QueryAllOracleResponse) | | GET | /ununifi/pricefeed/markets/{market_id}/oracles | +| `Price` | [QueryGetPriceRequest](#ununifi.pricefeed.QueryGetPriceRequest) | [QueryGetPriceResponse](#ununifi.pricefeed.QueryGetPriceResponse) | | GET | /ununifi/pricefeed/markets/{market_id}/price | +| `PriceAll` | [QueryAllPriceRequest](#ununifi.pricefeed.QueryAllPriceRequest) | [QueryAllPriceResponse](#ununifi.pricefeed.QueryAllPriceResponse) | | GET | /ununifi/pricefeed/prices | +| `RawPriceAll` | [QueryAllRawPriceRequest](#ununifi.pricefeed.QueryAllRawPriceRequest) | [QueryAllRawPriceResponse](#ununifi.pricefeed.QueryAllRawPriceResponse) | | GET | /ununifi/pricefeed/markets/{market_id}/raw_prices | + + + - +## pricefeed/tx.proto + - +### MsgPostPrice -### IntegrateType +| Field | Type | Label | Description | +| ----------- | ------------------------------------------------------- | ----- | ----------- | +| `from` | [string](#string) | | | +| `market_id` | [string](#string) | | | +| `price` | [string](#string) | | | +| `expiry` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + -| Name | Number | Description | -| ---- | ------ | ----------- | -| GOLANG_MOD | 0 | | -| COSMWASM | 1 | | +### MsgPostPriceResponse + - - - + - - +### Msg -## yieldaggregatorv1/genesis.proto +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ----------------------------------------------- | --------------------------------------------------------------- | ----------- | --------- | -------- | +| `PostPrice` | [MsgPostPrice](#ununifi.pricefeed.MsgPostPrice) | [MsgPostPriceResponse](#ununifi.pricefeed.MsgPostPriceResponse) | | | + + - + -### GenesisState -GenesisState defines the yieldaggregator module's genesis state. +## ununifidist/ununifidist.proto + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.chain.yieldaggregator.Params) | | | -| `asset_management_accounts` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | repeated | | -| `asset_management_targets` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | repeated | | -| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | -| `farming_units` | [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) | repeated | | -| `user_deposits` | [UserDeposit](#ununifi.chain.yieldaggregator.UserDeposit) | repeated | | -| `daily_percents` | [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) | repeated | | +### Params +| Field | Type | Label | Description | +| --------- | ------------------------------------- | -------- | ----------- | +| `active` | [bool](#bool) | | | +| `periods` | [Period](#ununifi.ununifidist.Period) | repeated | | + +### Period +| Field | Type | Label | Description | +| ----------- | ------------------------------------------------------- | ----- | ----------- | +| `start` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `inflation` | [string](#string) | | | @@ -8413,151 +4826,190 @@ GenesisState defines the yieldaggregator module's genesis state. + - - -## yieldaggregatorv1/proposal.proto - - - - - -### ProposalAddYieldFarm -proposal to add new yield farm. +## ununifidist/genesis.proto + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `account` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | | | +### GenesisState +GenesisState defines the ununifidist module's genesis state. +| Field | Type | Label | Description | +| --------------------- | ------------------------------------------------------- | ----- | --------------------------------------------------------------- | +| `params` | [Params](#ununifi.ununifidist.Params) | | | +| `previous_block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `gov_denom` | [string](#string) | | this line is used by starport scaffolding # genesis/proto/state | + + + - + -### ProposalAddYieldFarmTarget -proposal to add new yield farm target + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `target` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | | | +## ununifidist/query.proto + +### QueryGetBalancesRequest + +### QueryGetBalancesResponse +| Field | Type | Label | Description | +| ---------- | ----------------------------------------------------- | -------- | ----------- | +| `balances` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - + -### ProposalRemoveYieldFarm -proposal to remove yield farm +### QueryParamsRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `id` | [string](#string) | | | +### QueryParamsResponse +| Field | Type | Label | Description | +| -------- | ------------------------------------- | ----- | ----------- | +| `params` | [Params](#ununifi.ununifidist.Params) | | | + + + + - +### Query -### ProposalRemoveYieldFarmTarget -proposal to delete yield farm target +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.ununifidist.QueryParamsRequest) | [QueryParamsResponse](#ununifi.ununifidist.QueryParamsResponse) | | GET | /ununifi/ununifidist/params | +| `Balances` | [QueryGetBalancesRequest](#ununifi.ununifidist.QueryGetBalancesRequest) | [QueryGetBalancesResponse](#ununifi.ununifidist.QueryGetBalancesResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/ununifidist/balances | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `id` | [string](#string) | | | -| `asset_management_account_id` | [string](#string) | | | + + + +## yield-aggregator/params.proto + +### Params - +Params defines the parameters for the module. -### ProposalStopYieldFarm -proposal to remove yield farm +| Field | Type | Label | Description | +| ------------------------ | ----------------------------------------------------- | ----- | ----------- | +| `commission_rate` | [string](#string) | | | +| `vault_creation_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `vault_creation_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `id` | [string](#string) | | | + + + + + +## yield-aggregator/yield-aggregator.proto - + -### ProposalStopYieldFarmTarget -proposal to stop yield farm target +### Strategy +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `id` | [uint64](#uint64) | | | +| `contract_address` | [string](#string) | | | +| `name` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `id` | [string](#string) | | | -| `asset_management_account_id` | [string](#string) | | | + +### StrategyMetrics +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `allocation` | [string](#string) | | | +| `apr` | [string](#string) | | | + +### StrategyWeight +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `strategy_id` | [uint64](#uint64) | | | +| `weight` | [string](#string) | | | - + -### ProposalUpdateYieldFarm -proposal to update yield farm info +### Vault +| Field | Type | Label | Description | +| -------------------------- | --------------------------------------------------------- | -------- | ----------- | +| `id` | [uint64](#uint64) | | | +| `denom` | [string](#string) | | | +| `owner` | [string](#string) | | | +| `owner_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `withdraw_commission_rate` | [string](#string) | | | +| `withdraw_reserve_rate` | [string](#string) | | | +| `strategy_weights` | [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) | repeated | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `account` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | | | + +### VaultMetrics +| Field | Type | Label | Description | +| ------------ | ----------------- | ----- | ----------- | +| `allocation` | [string](#string) | | | +| `apy` | [string](#string) | | | + + + - + -### ProposalUpdateYieldFarmTarget -proposal to update yield farm target + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `target` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | | | +## yield-aggregator/genesis.proto + +### GenesisState +GenesisState defines the yieldaggregator module's genesis state. +| Field | Type | Label | Description | +| ------------ | --------------------------------------------- | -------- | --------------------------------------------------------------- | +| `params` | [Params](#ununifi.yieldaggregator.Params) | | | +| `vaults` | [Vault](#ununifi.yieldaggregator.Vault) | repeated | this line is used by starport scaffolding # genesis/proto/state | +| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | @@ -8567,524 +5019,914 @@ proposal to update yield farm target + - - -## yieldaggregatorv1/query.proto +## yield-aggregator/proposal.proto + +### ProposalAddStrategy - +proposal to add new strategy. -### AssetManagementAccountInfo +| Field | Type | Label | Description | +| ------------------ | ----------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `denom` | [string](#string) | | | +| `contract_address` | [string](#string) | | | +| `name` | [string](#string) | | | + + + + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `name` | [string](#string) | | | -| `asset_management_targets` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | repeated | | + + +## yield-aggregator/query.proto + +### QueryAllStrategyRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### QueryAllAssetManagementAccountsRequest +### QueryAllStrategyResponse +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +### QueryAllVaultRequest +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------------------------------- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +### QueryAllVaultResponse - +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------- | -------- | ----------- | +| `vaults` | [Vault](#ununifi.yieldaggregator.Vault) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | -### QueryAllAssetManagementAccountsResponse + +### QueryEstimateMintAmountRequest +| Field | Type | Label | Description | +| ---------------- | ----------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `deposit_amount` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `accounts` | [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) | repeated | | + +### QueryEstimateMintAmountResponse +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------- | ----- | ----------- | +| `mint_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryEstimateRedeemAmountRequest +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | +| `burn_amount` | [string](#string) | | | - + -### QueryAllFarmingUnitsRequest +### QueryEstimateRedeemAmountResponse +| Field | Type | Label | Description | +| --------------- | ----------------------------------------------------- | ----- | ----------- | +| `redeem_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QueryGetStrategyRequest +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `id` | [uint64](#uint64) | | | + +### QueryGetStrategyResponse - +| Field | Type | Label | Description | +| ---------- | --------------------------------------------- | ----- | ----------- | +| `strategy` | [Strategy](#ununifi.yieldaggregator.Strategy) | | | -### QueryAllFarmingUnitsResponse + +### QueryGetVaultRequest +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| `id` | [uint64](#uint64) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `units` | [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) | repeated | | + +### QueryGetVaultResponse +| Field | Type | Label | Description | +| -------------------------- | --------------------------------------------- | -------- | ----------- | +| `vault` | [Vault](#ununifi.yieldaggregator.Vault) | | | +| `strategies` | [Strategy](#ununifi.yieldaggregator.Strategy) | repeated | | +| `vault_address` | [string](#string) | | | +| `total_bonded_amount` | [string](#string) | | | +| `total_unbonding_amount` | [string](#string) | | | +| `total_withdrawal_balance` | [string](#string) | | | + +### QueryParamsRequest +QueryParamsRequest is request type for the Query/Params RPC method. - + -### QueryAssetManagementAccountRequest +### QueryParamsResponse + +QueryParamsResponse is response type for the Query/Params RPC method. +| Field | Type | Label | Description | +| -------- | ----------------------------------------- | ----- | ----------------------------------------------- | +| `params` | [Params](#ununifi.yieldaggregator.Params) | | params holds all the parameters of this module. | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | + + + +### Query +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ---------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------- | ------------------------------------------------------------ | +| `Params` | [QueryParamsRequest](#ununifi.yieldaggregator.QueryParamsRequest) | [QueryParamsResponse](#ununifi.yieldaggregator.QueryParamsResponse) | Parameters queries the parameters of the module. | GET | /ununifi/yield-aggregator/params | +| `VaultAll` | [QueryAllVaultRequest](#ununifi.yieldaggregator.QueryAllVaultRequest) | [QueryAllVaultResponse](#ununifi.yieldaggregator.QueryAllVaultResponse) | this line is used by starport scaffolding # 2 | GET | /ununifi/yield-aggregator/vaults | +| `Vault` | [QueryGetVaultRequest](#ununifi.yieldaggregator.QueryGetVaultRequest) | [QueryGetVaultResponse](#ununifi.yieldaggregator.QueryGetVaultResponse) | | GET | /ununifi/yield-aggregator/vaults/{id} | +| `StrategyAll` | [QueryAllStrategyRequest](#ununifi.yieldaggregator.QueryAllStrategyRequest) | [QueryAllStrategyResponse](#ununifi.yieldaggregator.QueryAllStrategyResponse) | | GET | /ununifi/yield-aggregator/strategies/query-param | +| `Strategy` | [QueryGetStrategyRequest](#ununifi.yieldaggregator.QueryGetStrategyRequest) | [QueryGetStrategyResponse](#ununifi.yieldaggregator.QueryGetStrategyResponse) | | GET | /ununifi/yield-aggregator/strategies/{id} | +| `EstimateMintAmount` | [QueryEstimateMintAmountRequest](#ununifi.yieldaggregator.QueryEstimateMintAmountRequest) | [QueryEstimateMintAmountResponse](#ununifi.yieldaggregator.QueryEstimateMintAmountResponse) | | GET | /ununifi/yield-aggregator/vaults/{id}/estimate-mint-amount | +| `EstimateRedeemAmount` | [QueryEstimateRedeemAmountRequest](#ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest) | [QueryEstimateRedeemAmountResponse](#ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse) | | GET | /ununifi/yield-aggregator/vaults/{id}/estimate-redeem-amount | - + -### QueryAssetManagementAccountResponse + + +## yield-aggregator/tx.proto -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `account` | [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) | | | + +### MsgCreateVault +| Field | Type | Label | Description | +| ----------------------- | --------------------------------------------------------- | -------- | ----------- | +| `sender` | [string](#string) | | | +| `denom` | [string](#string) | | | +| `commission_rate` | [string](#string) | | | +| `withdraw_reserve_rate` | [string](#string) | | | +| `strategy_weights` | [StrategyWeight](#ununifi.yieldaggregator.StrategyWeight) | repeated | | +| `fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### MsgCreateVaultResponse + - +### MsgDeleteVault -### QueryDailyRewardPercentsRequest +| Field | Type | Label | Description | +| ---------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `vault_id` | [uint64](#uint64) | | | + +### MsgDeleteVaultResponse + +### MsgDepositToVault +this line is used by starport scaffolding # proto/tx/message +| Field | Type | Label | Description | +| ---------- | ----------------------------------------------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `vault_id` | [uint64](#uint64) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### QueryDailyRewardPercentsResponse +### MsgDepositToVaultResponse + +### MsgTransferVaultOwnership -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `daily_percents` | [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) | repeated | | +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `vault_id` | [uint64](#uint64) | | | +| `recipient` | [string](#string) | | | + +### MsgTransferVaultOwnershipResponse + +### MsgWithdrawFromVault +| Field | Type | Label | Description | +| ----------------- | ----------------- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `vault_id` | [uint64](#uint64) | | | +| `lp_token_amount` | [string](#string) | | | - + -### QueryParamsRequest -QueryParamsRequest is request type for the Query/Params RPC method. +### MsgWithdrawFromVaultResponse + + + + +### Msg - +Msg defines the Msg service. -### QueryParamsResponse -QueryParamsResponse is response type for the Query/Params RPC method. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------- | -------- | +| `DepositToVault` | [MsgDepositToVault](#ununifi.yieldaggregator.MsgDepositToVault) | [MsgDepositToVaultResponse](#ununifi.yieldaggregator.MsgDepositToVaultResponse) | this line is used by starport scaffolding # proto/tx/rpc | | +| `WithdrawFromVault` | [MsgWithdrawFromVault](#ununifi.yieldaggregator.MsgWithdrawFromVault) | [MsgWithdrawFromVaultResponse](#ununifi.yieldaggregator.MsgWithdrawFromVaultResponse) | | | +| `CreateVault` | [MsgCreateVault](#ununifi.yieldaggregator.MsgCreateVault) | [MsgCreateVaultResponse](#ununifi.yieldaggregator.MsgCreateVaultResponse) | | | +| `DeleteVault` | [MsgDeleteVault](#ununifi.yieldaggregator.MsgDeleteVault) | [MsgDeleteVaultResponse](#ununifi.yieldaggregator.MsgDeleteVaultResponse) | | | +| `TransferVaultOwnership` | [MsgTransferVaultOwnership](#ununifi.yieldaggregator.MsgTransferVaultOwnership) | [MsgTransferVaultOwnershipResponse](#ununifi.yieldaggregator.MsgTransferVaultOwnershipResponse) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.chain.yieldaggregator.Params) | | params holds all the parameters of this module. | + + +## yieldaggregatorv1/params.proto + +### Params +Params defines the parameters for the module. - +| Field | Type | Label | Description | +| --------------------- | ----------------- | ----- | ----------- | +| `reward_rate_feeders` | [string](#string) | | | -### QueryUserInfo + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | -| `farmed_counter` | [uint64](#uint64) | | | + + + +## yieldaggregatorv1/asset.proto + +### AssetCondition - +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `min` | [string](#string) | | | +| `ratio` | [uint32](#uint32) | | | -### QueryUserInfoRequest + +### AssetManagementAccount +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `name` | [string](#string) | | | +| `enabled` | [bool](#bool) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | + +### AssetManagementTarget +| Field | Type | Label | Description | +| ----------------------------- | --------------------------------------------------------------- | -------- | ----------- | +| `id` | [string](#string) | | | +| `asset_management_account_id` | [string](#string) | | | +| `account_address` | [string](#string) | | | +| `asset_conditions` | [AssetCondition](#ununifi.chain.yieldaggregator.AssetCondition) | repeated | | +| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `integrate_info` | [IntegrateInfo](#ununifi.chain.yieldaggregator.IntegrateInfo) | | | +| `enabled` | [bool](#bool) | | | + +### DailyPercent +| Field | Type | Label | Description | +| ------------ | ------------------------------------------------------- | ----- | ----------- | +| `account_id` | [string](#string) | | | +| `target_id` | [string](#string) | | | +| `rate` | [string](#string) | | | +| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - + -### QueryUserInfoResponse +### DepositAllocation +| Field | Type | Label | Description | +| ---------- | ----------------------------------------------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `order_id` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `user_info` | [QueryUserInfo](#ununifi.chain.yieldaggregator.QueryUserInfo) | | | +### FarmingOrder +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------- | ----- | ----------- | +| `id` | [string](#string) | | | +| `from_address` | [string](#string) | | | +| `strategy` | [Strategy](#ununifi.chain.yieldaggregator.Strategy) | | | +| `max_unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `overall_ratio` | [uint32](#uint32) | | | +| `min` | [string](#string) | | | +| `max` | [string](#string) | | | +| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `active` | [bool](#bool) | | | + +### FarmingUnit +FarmingUnit is managing users' investment on a yield farm target +Here, amount field is the amount withdrawable instantly, staked amount on yield farms are not calculated here +since the value of staked amount could change after deposit - it's only determined at the time of withdrawal +from the farm - +| Field | Type | Label | Description | +| --------------------- | ------------------------------------------------------- | -------- | ----------- | +| `account_id` | [string](#string) | | | +| `target_id` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `farming_start_time` | [string](#string) | | | +| `unbonding_starttime` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `owner` | [string](#string) | | | - + - +### IntegrateInfo +| Field | Type | Label | Description | +| ---------------------- | ------------------------------------------------------------- | ----- | --------------------- | +| `type` | [IntegrateType](#ununifi.chain.yieldaggregator.IntegrateType) | | | +| `contract_ibc_port_id` | [string](#string) | | for cosmwasm contract | +| `mod_name` | [string](#string) | | for golang module | - + -### Query -Query defines the gRPC querier service. +### Strategy -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#ununifi.chain.yieldaggregator.QueryParamsRequest) | [QueryParamsResponse](#ununifi.chain.yieldaggregator.QueryParamsResponse) | Parameters queries the parameters of the module. | GET|/UnUniFi/chain/yieldaggregatorv1/params| -| `AssetManagementAccount` | [QueryAssetManagementAccountRequest](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountRequest) | [QueryAssetManagementAccountResponse](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountResponse) | | GET|/UnUniFi/chain/yieldaggregatorv1/asset_management_account/{id}| -| `AllAssetManagementAccounts` | [QueryAllAssetManagementAccountsRequest](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsRequest) | [QueryAllAssetManagementAccountsResponse](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsResponse) | | GET|/UnUniFi/chain/yieldaggregatorv1/all_asset_management_accounts| -| `UserInfo` | [QueryUserInfoRequest](#ununifi.chain.yieldaggregator.QueryUserInfoRequest) | [QueryUserInfoResponse](#ununifi.chain.yieldaggregator.QueryUserInfoResponse) | | GET|/UnUniFi/chain/yieldaggregatorv1/user_info/{address}| -| `AllFarmingUnits` | [QueryAllFarmingUnitsRequest](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsRequest) | [QueryAllFarmingUnitsResponse](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsResponse) | | GET|/UnUniFi/chain/yieldaggregatorv1/all_user_infos| -| `DailyRewardPercents` | [QueryDailyRewardPercentsRequest](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsRequest) | [QueryDailyRewardPercentsResponse](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsResponse) | | GET|/UnUniFi/chain/yieldaggregatorv1/daily_reward_percents| +Strategy types +recent30DaysHighDPRStrategy - Invest in the best DPR destination in the last 30 days on average +recent1DayHighDPRStrategy - Invest in the best DPR destination in the last average day +notHaveDPRStrategy - Invest in something that does not have a DPR. +ManualStrategy - Manual investment, whiteTargetIdlist required. - +| Field | Type | Label | Description | +| ------------------------ | ----------------- | -------- | ----------- | +| `strategy_type` | [string](#string) | | | +| `whitelisted_target_ids` | [string](#string) | repeated | | +| `blacklisted_target_ids` | [string](#string) | repeated | | + +### UserDeposit - - +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | -------- | ----------- | +| `user` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -## yieldaggregatorv1/tx.proto + +### UserInfo +| Field | Type | Label | Description | +| ---------------- | ----------------------------------------------------------- | -------- | ----------- | +| `user` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | +| `farmed_counter` | [uint64](#uint64) | | | - + -### MsgActivateFarmingOrder + +### IntegrateType +| Name | Number | Description | +| ---------- | ------ | ----------- | +| GOLANG_MOD | 0 | | +| COSMWASM | 1 | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `order_id` | [string](#string) | | | + + + + + +## yieldaggregatorv1/genesis.proto - + -### MsgActivateFarmingOrderResponse +### GenesisState +GenesisState defines the yieldaggregator module's genesis state. +| Field | Type | Label | Description | +| --------------------------- | ------------------------------------------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.chain.yieldaggregator.Params) | | | +| `asset_management_accounts` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | repeated | | +| `asset_management_targets` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | repeated | | +| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | +| `farming_units` | [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) | repeated | | +| `user_deposits` | [UserDeposit](#ununifi.chain.yieldaggregator.UserDeposit) | repeated | | +| `daily_percents` | [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) | repeated | | + + + + - + -### MsgAddFarmingOrder + +## yieldaggregatorv1/proposal.proto + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `order` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | | | +### ProposalAddYieldFarm +proposal to add new yield farm. +| Field | Type | Label | Description | +| ------------- | ------------------------------------------------------------------------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `account` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | | | + +### ProposalAddYieldFarmTarget +proposal to add new yield farm target - +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `target` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | | | -### MsgAddFarmingOrderResponse + +### ProposalRemoveYieldFarm +proposal to remove yield farm +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `id` | [string](#string) | | | + +### ProposalRemoveYieldFarmTarget +proposal to delete yield farm target - +| Field | Type | Label | Description | +| ----------------------------- | ----------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `id` | [string](#string) | | | +| `asset_management_account_id` | [string](#string) | | | -### MsgBeginWithdrawAll + +### ProposalStopYieldFarm +proposal to remove yield farm -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | +| Field | Type | Label | Description | +| ------------- | ----------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `id` | [string](#string) | | | + +### ProposalStopYieldFarmTarget +proposal to stop yield farm target +| Field | Type | Label | Description | +| ----------------------------- | ----------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `id` | [string](#string) | | | +| `asset_management_account_id` | [string](#string) | | | + - +### ProposalUpdateYieldFarm -### MsgBeginWithdrawAllResponse +proposal to update yield farm info +| Field | Type | Label | Description | +| ------------- | ------------------------------------------------------------------------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `account` | [AssetManagementAccount](#ununifi.chain.yieldaggregator.AssetManagementAccount) | | | + +### ProposalUpdateYieldFarmTarget +proposal to update yield farm target +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `target` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | | | + - + -### MsgDeleteFarmingOrder + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `order_id` | [string](#string) | | | + +## yieldaggregatorv1/query.proto + +### AssetManagementAccountInfo +| Field | Type | Label | Description | +| -------------------------- | ----------------------------------------------------------------------------- | -------- | ----------- | +| `id` | [string](#string) | | | +| `name` | [string](#string) | | | +| `asset_management_targets` | [AssetManagementTarget](#ununifi.chain.yieldaggregator.AssetManagementTarget) | repeated | | + - +### QueryAllAssetManagementAccountsRequest -### MsgDeleteFarmingOrderResponse + +### QueryAllAssetManagementAccountsResponse +| Field | Type | Label | Description | +| ---------- | --------------------------------------------------------------------------------------- | -------- | ----------- | +| `accounts` | [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) | repeated | | + +### QueryAllFarmingUnitsRequest + +### QueryAllFarmingUnitsResponse - +| Field | Type | Label | Description | +| ------- | --------------------------------------------------------- | -------- | ----------- | +| `units` | [FarmingUnit](#ununifi.chain.yieldaggregator.FarmingUnit) | repeated | | -### MsgDeposit + +### QueryAssetManagementAccountRequest +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| `id` | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `execute_orders` | [bool](#bool) | | | + +### QueryAssetManagementAccountResponse +| Field | Type | Label | Description | +| --------- | --------------------------------------------------------------------------------------- | ----- | ----------- | +| `account` | [AssetManagementAccountInfo](#ununifi.chain.yieldaggregator.AssetManagementAccountInfo) | | | + +### QueryDailyRewardPercentsRequest + - +### QueryDailyRewardPercentsResponse -### MsgDepositResponse +| Field | Type | Label | Description | +| ---------------- | ----------------------------------------------------------- | -------- | ----------- | +| `daily_percents` | [DailyPercent](#ununifi.chain.yieldaggregator.DailyPercent) | repeated | | + +### QueryParamsRequest +QueryParamsRequest is request type for the Query/Params RPC method. + +### QueryParamsResponse +QueryParamsResponse is response type for the Query/Params RPC method. - +| Field | Type | Label | Description | +| -------- | ----------------------------------------------- | ----- | ----------------------------------------------- | +| `params` | [Params](#ununifi.chain.yieldaggregator.Params) | | params holds all the parameters of this module. | -### MsgExecuteFarmingOrders + +### QueryUserInfo +| Field | Type | Label | Description | +| ---------------- | ----------------------------------------------------------- | -------- | ----------- | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `farming_orders` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | repeated | | +| `farmed_counter` | [uint64](#uint64) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `order_ids` | [string](#string) | repeated | | + +### QueryUserInfoRequest +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------- | +| `address` | [string](#string) | | | + +### QueryUserInfoResponse +| Field | Type | Label | Description | +| ----------- | ------------------------------------------------------------- | ----- | ----------- | +| `user_info` | [QueryUserInfo](#ununifi.chain.yieldaggregator.QueryUserInfo) | | | - + -### MsgExecuteFarmingOrdersResponse + + + +### Query +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ---------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------- | -------------------------------------------------------------- | +| `Params` | [QueryParamsRequest](#ununifi.chain.yieldaggregator.QueryParamsRequest) | [QueryParamsResponse](#ununifi.chain.yieldaggregator.QueryParamsResponse) | Parameters queries the parameters of the module. | GET | /UnUniFi/chain/yieldaggregatorv1/params | +| `AssetManagementAccount` | [QueryAssetManagementAccountRequest](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountRequest) | [QueryAssetManagementAccountResponse](#ununifi.chain.yieldaggregator.QueryAssetManagementAccountResponse) | | GET | /UnUniFi/chain/yieldaggregatorv1/asset_management_account/{id} | +| `AllAssetManagementAccounts` | [QueryAllAssetManagementAccountsRequest](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsRequest) | [QueryAllAssetManagementAccountsResponse](#ununifi.chain.yieldaggregator.QueryAllAssetManagementAccountsResponse) | | GET | /UnUniFi/chain/yieldaggregatorv1/all_asset_management_accounts | +| `UserInfo` | [QueryUserInfoRequest](#ununifi.chain.yieldaggregator.QueryUserInfoRequest) | [QueryUserInfoResponse](#ununifi.chain.yieldaggregator.QueryUserInfoResponse) | | GET | /UnUniFi/chain/yieldaggregatorv1/user_info/{address} | +| `AllFarmingUnits` | [QueryAllFarmingUnitsRequest](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsRequest) | [QueryAllFarmingUnitsResponse](#ununifi.chain.yieldaggregator.QueryAllFarmingUnitsResponse) | | GET | /UnUniFi/chain/yieldaggregatorv1/all_user_infos | +| `DailyRewardPercents` | [QueryDailyRewardPercentsRequest](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsRequest) | [QueryDailyRewardPercentsResponse](#ununifi.chain.yieldaggregator.QueryDailyRewardPercentsResponse) | | GET | /UnUniFi/chain/yieldaggregatorv1/daily_reward_percents | + - + -### MsgInactivateFarmingOrder + +## yieldaggregatorv1/tx.proto + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `order_id` | [string](#string) | | | +### MsgActivateFarmingOrder +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | +| `order_id` | [string](#string) | | | + +### MsgActivateFarmingOrderResponse + +### MsgAddFarmingOrder - +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | +| `order` | [FarmingOrder](#ununifi.chain.yieldaggregator.FarmingOrder) | | | -### MsgInactivateFarmingOrderResponse + +### MsgAddFarmingOrderResponse + +### MsgBeginWithdrawAll +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | + +### MsgBeginWithdrawAllResponse - + -### MsgSetDailyRewardPercent +### MsgDeleteFarmingOrder +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | +| `order_id` | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `account_id` | [string](#string) | | | -| `target_id` | [string](#string) | | | -| `rate` | [string](#string) | | | -| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +### MsgDeleteFarmingOrderResponse + +### MsgDeposit +| Field | Type | Label | Description | +| ---------------- | ----------------------------------------------------- | -------- | ----------- | +| `from_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `execute_orders` | [bool](#bool) | | | + +### MsgDepositResponse - + -### MsgSetDailyRewardPercentResponse +### MsgExecuteFarmingOrders +| Field | Type | Label | Description | +| -------------- | ----------------- | -------- | ----------- | +| `from_address` | [string](#string) | | | +| `order_ids` | [string](#string) | repeated | | + +### MsgExecuteFarmingOrdersResponse + +### MsgInactivateFarmingOrder +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | +| `order_id` | [string](#string) | | | - + -### MsgWithdraw +### MsgInactivateFarmingOrderResponse + +### MsgSetDailyRewardPercent -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| Field | Type | Label | Description | +| -------------- | ------------------------------------------------------- | ----- | ----------- | +| `from_address` | [string](#string) | | | +| `account_id` | [string](#string) | | | +| `target_id` | [string](#string) | | | +| `rate` | [string](#string) | | | +| `date` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + +### MsgSetDailyRewardPercentResponse + +### MsgWithdraw +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------- | -------- | ----------- | +| `from_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | ### MsgWithdrawResponse - - - - - - ### Msg + Msg defines the Msg service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Deposit` | [MsgDeposit](#ununifi.chain.yieldaggregator.MsgDeposit) | [MsgDepositResponse](#ununifi.chain.yieldaggregator.MsgDepositResponse) | | | -| `Withdraw` | [MsgWithdraw](#ununifi.chain.yieldaggregator.MsgWithdraw) | [MsgWithdrawResponse](#ununifi.chain.yieldaggregator.MsgWithdrawResponse) | | | -| `BeginWithdrawAll` | [MsgBeginWithdrawAll](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAll) | [MsgBeginWithdrawAllResponse](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAllResponse) | | | -| `AddFarmingOrder` | [MsgAddFarmingOrder](#ununifi.chain.yieldaggregator.MsgAddFarmingOrder) | [MsgAddFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgAddFarmingOrderResponse) | | | -| `DeleteFarmingOrder` | [MsgDeleteFarmingOrder](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrder) | [MsgDeleteFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrderResponse) | | | -| `ActivateFarmingOrder` | [MsgActivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrder) | [MsgActivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrderResponse) | | | -| `InactivateFarmingOrder` | [MsgInactivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrder) | [MsgInactivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrderResponse) | | | -| `ExecuteFarmingOrders` | [MsgExecuteFarmingOrders](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrders) | [MsgExecuteFarmingOrdersResponse](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrdersResponse) | | | -| `SetDailyRewardPercent` | [MsgSetDailyRewardPercent](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercent) | [MsgSetDailyRewardPercentResponse](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercentResponse) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ------------------------ | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------- | --------- | -------- | +| `Deposit` | [MsgDeposit](#ununifi.chain.yieldaggregator.MsgDeposit) | [MsgDepositResponse](#ununifi.chain.yieldaggregator.MsgDepositResponse) | | | +| `Withdraw` | [MsgWithdraw](#ununifi.chain.yieldaggregator.MsgWithdraw) | [MsgWithdrawResponse](#ununifi.chain.yieldaggregator.MsgWithdrawResponse) | | | +| `BeginWithdrawAll` | [MsgBeginWithdrawAll](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAll) | [MsgBeginWithdrawAllResponse](#ununifi.chain.yieldaggregator.MsgBeginWithdrawAllResponse) | | | +| `AddFarmingOrder` | [MsgAddFarmingOrder](#ununifi.chain.yieldaggregator.MsgAddFarmingOrder) | [MsgAddFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgAddFarmingOrderResponse) | | | +| `DeleteFarmingOrder` | [MsgDeleteFarmingOrder](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrder) | [MsgDeleteFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgDeleteFarmingOrderResponse) | | | +| `ActivateFarmingOrder` | [MsgActivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrder) | [MsgActivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgActivateFarmingOrderResponse) | | | +| `InactivateFarmingOrder` | [MsgInactivateFarmingOrder](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrder) | [MsgInactivateFarmingOrderResponse](#ununifi.chain.yieldaggregator.MsgInactivateFarmingOrderResponse) | | | +| `ExecuteFarmingOrders` | [MsgExecuteFarmingOrders](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrders) | [MsgExecuteFarmingOrdersResponse](#ununifi.chain.yieldaggregator.MsgExecuteFarmingOrdersResponse) | | | +| `SetDailyRewardPercent` | [MsgSetDailyRewardPercent](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercent) | [MsgSetDailyRewardPercentResponse](#ununifi.chain.yieldaggregator.MsgSetDailyRewardPercentResponse) | | | - - + ## yieldfarm/params.proto - - ### Params -Params defines the parameters for the module. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `daily_reward` | [uint64](#uint64) | | | - - +Params defines the parameters for the module. +| Field | Type | Label | Description | +| -------------- | ----------------- | ----- | ----------- | +| `daily_reward` | [uint64](#uint64) | | | @@ -9094,30 +5936,21 @@ Params defines the parameters for the module. - - + ## yieldfarm/yieldfarm.proto - - ### FarmerInfo - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `account` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ----------- | +| `account` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `rewards` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | @@ -9127,29 +5960,22 @@ Params defines the parameters for the module. - - + ## yieldfarm/genesis.proto - - ### GenesisState -GenesisState defines the yieldfarm module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#ununifi.chain.yieldfarm.Params) | | | -| `farmer_infos` | [FarmerInfo](#ununifi.chain.yieldfarm.FarmerInfo) | repeated | | - - +GenesisState defines the yieldfarm module's genesis state. +| Field | Type | Label | Description | +| -------------- | ------------------------------------------------- | -------- | ----------- | +| `params` | [Params](#ununifi.chain.yieldfarm.Params) | | | +| `farmer_infos` | [FarmerInfo](#ununifi.chain.yieldfarm.FarmerInfo) | repeated | | @@ -9159,24 +5985,22 @@ GenesisState defines the yieldfarm module's genesis state. - - ## Scalar Value Types -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | diff --git a/proto/ununifi/derivatives/derivatives.proto b/proto/ununifi/derivatives/derivatives.proto index a57fd4ccc..39a57783d 100644 --- a/proto/ununifi/derivatives/derivatives.proto +++ b/proto/ununifi/derivatives/derivatives.proto @@ -48,12 +48,19 @@ message Position { (gogoproto.moretags) = "yaml:\"remaining_margin\"", (gogoproto.nullable) = false ]; - google.protobuf.Timestamp last_levied_at = 9 [ + cosmos.base.v1beta1.Coin levied_amount = 9 [ + (gogoproto.moretags) = "yaml:\"levied_amount\"", + (gogoproto.nullable) = false + ]; + bool levied_amount_negative = 10 [ + (gogoproto.moretags) = "yaml:\"levied_amount_negative\"" + ]; + google.protobuf.Timestamp last_levied_at = 11 [ (gogoproto.moretags) = "yaml:\"last_levied_at\"", (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - google.protobuf.Any position_instance = 10 [ + google.protobuf.Any position_instance = 12 [ (gogoproto.moretags) = "yaml:\"position_instance\"", (gogoproto.nullable) = false ]; diff --git a/proto/ununifi/derivatives/perpetual_futures.proto b/proto/ununifi/derivatives/perpetual_futures.proto index c151c6a45..4c0d33366 100644 --- a/proto/ununifi/derivatives/perpetual_futures.proto +++ b/proto/ununifi/derivatives/perpetual_futures.proto @@ -46,12 +46,26 @@ message PerpetualFuturesPosition { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin remaining_margin = 8 - [(gogoproto.moretags) = "yaml:\"remaining_margin\"", (gogoproto.nullable) = false]; - google.protobuf.Timestamp last_levied_at = 9 - [(gogoproto.moretags) = "yaml:\"last_levied_at\"", (gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - PerpetualFuturesPositionInstance position_instance = 10 - [(gogoproto.moretags) = "yaml:\"position_instance\"", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin remaining_margin = 8 [ + (gogoproto.moretags) = "yaml:\"remaining_margin\"", + (gogoproto.nullable) = false + ]; + cosmos.base.v1beta1.Coin levied_amount = 9 [ + (gogoproto.moretags) = "yaml:\"levied_amount\"", + (gogoproto.nullable) = false + ]; + bool levied_amount_negative = 10 [ + (gogoproto.moretags) = "yaml:\"levied_amount_negative\"" + ]; + google.protobuf.Timestamp last_levied_at = 11 [ + (gogoproto.moretags) = "yaml:\"last_levied_at\"", + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + PerpetualFuturesPositionInstance position_instance = 12 [ + (gogoproto.moretags) = "yaml:\"position_instance\"", + (gogoproto.nullable) = false + ]; } message PerpetualFuturesPositionInstance { @@ -82,8 +96,8 @@ message EventPerpetualFuturesPositionOpened { message EventPerpetualFuturesPositionClosed { string sender = 1; string position_id = 2; - string fee_amount = 3; - string trade_amount = 4; + string position_size = 3; + string pnl_amount = 4; string returning_amount = 5; } @@ -92,6 +106,7 @@ message EventPerpetualFuturesPositionLiquidated { string position_id = 2; string remaining_margin = 3; string reward_amount = 4; + string levied_amount = 5; } message EventPerpetualFuturesPositionLevied { @@ -99,6 +114,7 @@ message EventPerpetualFuturesPositionLevied { string position_id = 2; string remaining_margin = 3; string reward_amount = 4; + string levied_amount = 5; } message EventLossToLP { diff --git a/scripts/commands/derivatives/start.sh b/scripts/commands/derivatives/start.sh index 3e89268a0..d24fcdd68 100755 --- a/scripts/commands/derivatives/start.sh +++ b/scripts/commands/derivatives/start.sh @@ -52,7 +52,7 @@ jq '.app_state.derivatives.params.perpetual_futures.margin_maintenance_rate = "0 jq '.app_state.derivatives.params.perpetual_futures.imaginary_funding_rate_proportional_coefficient = "0.0005"' ~/.ununifi/config/genesis.json > temp.json ; mv temp.json ~/.ununifi/config/genesis.json; jq '.app_state.derivatives.params.perpetual_futures.markets = [{"base_denom": "ubtc", "quote_denom": "uusd" }]' ~/.ununifi/config/genesis.json > temp.json ; mv temp.json ~/.ununifi/config/genesis.json; -jq '.app_state.bank.denom_metadata = [{"base" : "ubtc" , "symbol": "ubtc"}, {"base" : "uusd", "symbol": "uusdc"}]' ~/.ununifi/config/genesis.json > temp.json ; mv temp.json ~/.ununifi/config/genesis.json; +jq '.app_state.bank.denom_metadata = [{"base" : "ubtc" , "symbol": "BTC"}, {"base" : "uusd", "symbol": "USDC"}]' ~/.ununifi/config/genesis.json > temp.json ; mv temp.json ~/.ununifi/config/genesis.json; # run pricefeed $SCRIPT_DIR/setup_pricefeed.sh diff --git a/scripts/setup/init.sh b/scripts/setup/init.sh index fd338901f..6c9972a06 100755 --- a/scripts/setup/init.sh +++ b/scripts/setup/init.sh @@ -86,8 +86,8 @@ jq '.app_state.derivatives.params.perpetual_futures.margin_maintenance_rate = "0 jq '.app_state.derivatives.params.perpetual_futures.imaginary_funding_rate_proportional_coefficient = "0.0005"' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; jq '.app_state.derivatives.params.perpetual_futures.markets = [{"base_denom": "ubtc", "quote_denom": "uusdc" }]' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; jq '.app_state.bank.denom_metadata = [ - {"base" : "ubtc" , "symbol": "ubtc"}, - {"base" : "uusdc", "symbol": "uusdc"} + {"base" : "ubtc" , "symbol": "BTC"}, + {"base" : "uusdc", "symbol": "USDC"} ]' $NODE_HOME/config/genesis.json > temp.json ; mv temp.json $NODE_HOME/config/genesis.json; jq '.app_state.pricefeed.posted_prices = [ {"expiry": "2024-02-20T12:02:01Z","market_id": "ubtc:usd","oracle_address": "ununifi1h7ulktk5p2gt7tnxwhqzlq0yegq47hum0fahcr","price": "0.024508410211260500"}, diff --git a/x/derivatives/README.md b/x/derivatives/README.md index 5d05fb37e..2d3ffcd4c 100644 --- a/x/derivatives/README.md +++ b/x/derivatives/README.md @@ -153,24 +153,42 @@ message Position { uint64 opened_height = 5 [ (gogoproto.moretags) = "yaml:\"opened_height\"" ]; - string opened_rate = 6 [ - (gogoproto.moretags) = "yaml:\"opened_rate\"", + string opened_base_rate = 6 [ + (gogoproto.moretags) = "yaml:\"opened_base_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + string opened_quote_rate = 7 [ + (gogoproto.moretags) = "yaml:\"opened_quote_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + cosmos.base.v1beta1.Coin remaining_margin = 8 [ + (gogoproto.moretags) = "yaml:\"remaining_margin\"", + (gogoproto.nullable) = false + ]; cosmos.base.v1beta1.Coin remaining_margin = 7 [ (gogoproto.moretags) = "yaml:\"remaining_margin\"", (gogoproto.nullable) = false ]; - google.protobuf.Timestamp last_levied_at = 8 [ + cosmos.base.v1beta1.Coin levied_amount = 9 [ + (gogoproto.moretags) = "yaml:\"levied_amount\"", + (gogoproto.nullable) = false + ]; + bool levied_amount_negative = 10 [ + (gogoproto.moretags) = "yaml:\"levied_amount_negative\"", + (gogoproto.nullable) = false + ]; + google.protobuf.Timestamp last_levied_at = 11 [ (gogoproto.moretags) = "yaml:\"last_levied_at\"", (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; - google.protobuf.Any position_instance = 9 [ + google.protobuf.Any position_instance = 12 [ (gogoproto.moretags) = "yaml:\"position_instance\"", (gogoproto.nullable) = false ]; + } ``` diff --git a/x/derivatives/keeper/keeper_test.go b/x/derivatives/keeper/keeper_test.go index 23c8afc33..4df4ddd79 100644 --- a/x/derivatives/keeper/keeper_test.go +++ b/x/derivatives/keeper/keeper_test.go @@ -15,7 +15,6 @@ import ( pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" simapp "github.com/UnUniFi/chain/app" - ununifitypes "github.com/UnUniFi/chain/deprecated/types" "github.com/UnUniFi/chain/x/derivatives/keeper" "github.com/UnUniFi/chain/x/derivatives/types" ) @@ -71,8 +70,8 @@ func (suite *KeeperTestSuite) SetupTest() { pfParams := pricefeedtypes.Params{ Markets: []pricefeedtypes.Market{ - {MarketId: "uusdc:usd", BaseAsset: TestQuoteTokenDenom, QuoteAsset: TestQuoteTokenDenom, Oracles: []ununifitypes.StringAccAddress{}, Active: true}, - {MarketId: "uatom:usd", BaseAsset: TestBaseTokenDenom, QuoteAsset: TestQuoteTokenDenom, Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uusdc:usd", BaseAsset: TestQuoteTokenDenom, QuoteAsset: TestQuoteTokenDenom, Oracles: []string{}, Active: true}, + {MarketId: "uatom:usd", BaseAsset: TestBaseTokenDenom, QuoteAsset: TestQuoteTokenDenom, Oracles: []string{}, Active: true}, }, } app.PricefeedKeeper.SetParams(suite.ctx, pfParams) diff --git a/x/derivatives/keeper/lpt_test.go b/x/derivatives/keeper/lpt_test.go index 2f6be519e..1b24acb8d 100644 --- a/x/derivatives/keeper/lpt_test.go +++ b/x/derivatives/keeper/lpt_test.go @@ -8,7 +8,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - ununifitypes "github.com/UnUniFi/chain/deprecated/types" "github.com/UnUniFi/chain/x/derivatives/types" pftypes "github.com/UnUniFi/chain/x/pricefeed/types" pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" @@ -43,7 +42,7 @@ func (suite *KeeperTestSuite) TestDetermineMintingLPTokenAmount() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) @@ -91,7 +90,7 @@ func (suite *KeeperTestSuite) TestGetLPTokenPrice() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) @@ -122,7 +121,7 @@ func (suite *KeeperTestSuite) TestGetRedeemDenomAmount() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) @@ -199,7 +198,7 @@ func (suite *KeeperTestSuite) TestMintLiquidityProviderToken() { _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, owner, sdk.Coins{tc.sendCoin}) err := suite.keeper.MintLiquidityProviderToken(suite.ctx, &types.MsgDepositToPool{ - Sender: owner.Bytes(), + Sender: owner.String(), Amount: tc.sendCoin, }) diff --git a/x/derivatives/keeper/margin.go b/x/derivatives/keeper/margin.go index 22c4c6a33..33fed8d26 100644 --- a/x/derivatives/keeper/margin.go +++ b/x/derivatives/keeper/margin.go @@ -19,5 +19,5 @@ func (k Keeper) SendCoinFromPoolToMarginManager(ctx sdk.Context, amount sdk.Coin } func (k Keeper) SendBackMargin(ctx sdk.Context, recipient sdk.AccAddress, amount sdk.Coins) error { - return k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, amount) + return k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.MarginManager, recipient, amount) } diff --git a/x/derivatives/keeper/market_test.go b/x/derivatives/keeper/market_test.go index 6abbc4838..488ef6720 100644 --- a/x/derivatives/keeper/market_test.go +++ b/x/derivatives/keeper/market_test.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - ununifitypes "github.com/UnUniFi/chain/deprecated/types" pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" ) @@ -21,7 +20,7 @@ func (suite *KeeperTestSuite) TestGetAssetPrice() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:usd", BaseAsset: "uatom", QuoteAsset: "usd", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:usd", BaseAsset: "uatom", QuoteAsset: "usd", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uatom:usd") @@ -45,7 +44,7 @@ func (suite *KeeperTestSuite) TestGetPrice() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uusdc:usd", BaseAsset: "uusdc", QuoteAsset: "usd", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uusdc:usd", BaseAsset: "uusdc", QuoteAsset: "usd", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uusdc:usd") diff --git a/x/derivatives/keeper/perpetual_futures.go b/x/derivatives/keeper/perpetual_futures.go index d82271d5b..16cea1345 100644 --- a/x/derivatives/keeper/perpetual_futures.go +++ b/x/derivatives/keeper/perpetual_futures.go @@ -58,15 +58,18 @@ func (k Keeper) OpenPerpetualFuturesPosition(ctx sdk.Context, positionId string, } position := types.Position{ - Id: positionId, - Market: market, - Address: sender, - OpenedAt: ctx.BlockTime(), - OpenedHeight: uint64(ctx.BlockHeight()), - OpenedBaseRate: openedBaseRate, - OpenedQuoteRate: openedQuoteRate, - PositionInstance: *any, - RemainingMargin: margin, + Id: positionId, + Market: market, + Address: sender, + OpenedAt: ctx.BlockTime(), + OpenedHeight: uint64(ctx.BlockHeight()), + OpenedBaseRate: openedBaseRate, + OpenedQuoteRate: openedQuoteRate, + RemainingMargin: margin, + LeviedAmount: sdk.NewInt64Coin(margin.Denom, 0), + LeviedAmountNegative: true, + LastLeviedAt: ctx.BlockTime(), + PositionInstance: *any, } // General validation for the position creation @@ -106,6 +109,15 @@ func (k Keeper) OpenPerpetualFuturesPosition(ctx sdk.Context, positionId string, return nil, fmt.Errorf("unknown position type") } + senderAccAddr, err := sdk.AccAddressFromBech32(sender) + if err != nil { + return nil, err + } + + if err := k.SendMarginToMarginManager(ctx, senderAccAddr, sdk.NewCoins(margin)); err != nil { + return nil, err + } + _ = ctx.EventManager().EmitTypedEvent(&types.EventPerpetualFuturesPositionOpened{ Sender: sender, PositionId: positionId, @@ -148,18 +160,6 @@ func (k Keeper) SubReserveTokensForPosition(ctx sdk.Context, marketType types.Ma } func (k Keeper) ClosePerpetualFuturesPosition(ctx sdk.Context, position types.PerpetualFuturesPosition) error { - // params := k.GetParams(ctx) - // commissionRate := params.PerpetualFutures.CommissionRate - // Set the ClosePosition commission rate to 0. The commission will be deducted by Levy instead. - commissionRate := sdk.MustNewDecFromStr("0") - - // At closing the position, the trading fee is deducted. - // fee = positionSize * commissionRate - positionSizeInDenomUnit := sdk.NewDecFromInt(position.PositionInstance.SizeInDenomExponent(types.OneMillionInt)) - feeAmountDec := positionSizeInDenomUnit.Mul(commissionRate) - tradeAmount := positionSizeInDenomUnit.Sub(feeAmountDec) - feeAmount := feeAmountDec.RoundInt() - baseUsdPrice, err := k.GetCurrentPrice(ctx, position.Market.BaseDenom) if err != nil { return err @@ -172,22 +172,26 @@ func (k Keeper) ClosePerpetualFuturesPosition(ctx sdk.Context, position types.Pe quoteTicker := k.GetPoolQuoteTicker(ctx) baseMetricsRate := types.NewMetricsRateType(quoteTicker, position.Market.BaseDenom, baseUsdPrice) quoteMetricsRate := types.NewMetricsRateType(quoteTicker, position.Market.QuoteDenom, quoteUsdPrice) + + // profit or loss amount in margin denom pnlAmount := position.ProfitAndLoss(baseMetricsRate, quoteMetricsRate) + if position.LeviedAmountNegative { + pnlAmount = pnlAmount.Sub(position.LeviedAmount.Amount) + } else { + pnlAmount = pnlAmount.Add(position.LeviedAmount.Amount) + } returningAmount, err := k.HandleReturnAmount(ctx, pnlAmount, position) if err != nil { return err } - // TODO: Fix position size in total by removing the closing position switch position.PositionInstance.PositionType { - // FIXME: Don't use OneMillionInt derectly to make it decimal unit. issue #476 + // FIXME: Don't use OneMillionInt directly to make it decimal unit. issue #476 case types.PositionType_LONG: k.SubPerpetualFuturesGrossPositionOfMarket(ctx, position.Market, position.PositionInstance.PositionType, position.PositionInstance.SizeInDenomExponent(types.OneMillionInt)) - // break case types.PositionType_SHORT: k.SubPerpetualFuturesGrossPositionOfMarket(ctx, position.Market, position.PositionInstance.PositionType, position.PositionInstance.SizeInDenomExponent(types.OneMillionInt)) - // break case types.PositionType_POSITION_UNKNOWN: return fmt.Errorf("unknown position type") } @@ -195,8 +199,8 @@ func (k Keeper) ClosePerpetualFuturesPosition(ctx sdk.Context, position types.Pe _ = ctx.EventManager().EmitTypedEvent(&types.EventPerpetualFuturesPositionClosed{ Sender: position.Address, PositionId: position.Id, - FeeAmount: feeAmount.String(), - TradeAmount: tradeAmount.String(), + PositionSize: position.PositionInstance.SizeInDenomExponent(types.OneMillionInt).String(), + PnlAmount: pnlAmount.String(), ReturningAmount: returningAmount.String(), }) @@ -212,33 +216,36 @@ func (k Keeper) HandleReturnAmount(ctx sdk.Context, pnlAmount sdk.Int, position } if pnlAmount.IsNegative() { - returningAmount = position.RemainingMargin.Amount.Sub(pnlAmount.Abs()) - // Tell the loss to the LP happened by a trade - // This has to be restricted by the protocol behavior in the future - if !(returningAmount.IsNegative()) { + loss := pnlAmount.Abs() + returningAmount = position.RemainingMargin.Amount.Sub(loss) + + if returningAmount.IsNegative() { _ = ctx.EventManager().EmitTypedEvent(&types.EventLossToLP{ PositionId: position.Id, LossAmount: returningAmount.String(), }) + // Send margin to the pool from MarginManager + // The loss is taken by the pool + if err := k.SendCoinFromMarginManagerToPool(ctx, sdk.NewCoins(position.RemainingMargin)); err != nil { + return sdk.ZeroInt(), err + } } else { returningCoin := sdk.NewCoin(position.RemainingMargin.Denom, returningAmount) - // Send coin including margin + // Send margin-loss from MarginManager if err := k.SendBackMargin(ctx, addr, sdk.NewCoins(returningCoin)); err != nil { return sdk.ZeroInt(), err } - - // Send Loss of the position to the pool - if err := k.SendCoinFromMarginManagerToPool(ctx, sdk.NewCoins(sdk.NewCoin(position.RemainingMargin.Denom, pnlAmount))); err != nil { + // Send loss to the pool + if err := k.SendCoinFromMarginManagerToPool(ctx, sdk.NewCoins(sdk.NewCoin(position.RemainingMargin.Denom, loss))); err != nil { return sdk.ZeroInt(), err } } } else { returningAmount = position.RemainingMargin.Amount.Add(pnlAmount) - fromMarginManagerAmount := position.RemainingMargin - if err := k.SendBackMargin(ctx, addr, sdk.NewCoins(fromMarginManagerAmount)); err != nil { + // Send margin from MarginManager & profit from the pool + if err := k.SendBackMargin(ctx, addr, sdk.NewCoins(position.RemainingMargin)); err != nil { return sdk.ZeroInt(), err } - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, sdk.NewCoins(sdk.NewCoin(position.RemainingMargin.Denom, pnlAmount))); err != nil { return sdk.ZeroInt(), err } @@ -267,32 +274,32 @@ func (k Keeper) ReportLiquidationNeededPerpetualFuturesPosition(ctx sdk.Context, } else { commissionFee = k.ConvertBaseAmountToQuoteAmount(ctx, position.Market, commissionBaseFee) } - - // If the margin is lower than the fee, the fee is equal to the margin. - if position.RemainingMargin.Amount.LT(commissionFee) { - commissionFee = position.RemainingMargin.Amount + if position.LeviedAmountNegative { + position.LeviedAmount.Amount = position.LeviedAmount.Amount.Add(commissionFee) + } else { + rest := position.LeviedAmount.Amount.Sub(commissionFee) + if rest.IsNegative() { + position.LeviedAmountNegative = true + position.LeviedAmount.Amount = rest.Abs() + } else { + position.LeviedAmount.Amount = rest + } } - position.RemainingMargin.Amount = position.RemainingMargin.Amount.Sub(commissionFee) - rewardAmount := sdk.NewDecFromInt(position.RemainingMargin.Amount).Mul(params.PoolParams.ReportLiquidationRewardRate).RoundInt() - reward := sdk.NewCoins(sdk.NewCoin(position.RemainingMargin.Denom, rewardAmount)) - if err := k.ClosePerpetualFuturesPosition(ctx, position); err != nil { return err } - recipient, err := sdk.AccAddressFromBech32(rewardRecipient) - if err != nil { - return err - } + // Delete Position positionAddress, err := sdk.AccAddressFromBech32(position.Address) if err != nil { return err } - - // Delete Position k.DeletePosition(ctx, positionAddress, position.Id) - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, reward) + + // Send Reward + rewardAmount := sdk.NewDecFromInt(commissionFee).Mul(params.PoolParams.ReportLiquidationRewardRate).RoundInt() + err = k.SendRewardFromCommission(ctx, rewardAmount, position.RemainingMargin.Denom, rewardRecipient) if err != nil { return err } @@ -302,8 +309,8 @@ func (k Keeper) ReportLiquidationNeededPerpetualFuturesPosition(ctx sdk.Context, PositionId: position.Id, RemainingMargin: position.RemainingMargin.String(), RewardAmount: rewardAmount.String(), + LeviedAmount: position.LeviedAmount.String(), }) - return nil } return nil @@ -328,45 +335,34 @@ func (k Keeper) ReportLevyPeriodPerpetualFuturesPosition(ctx sdk.Context, reward commissionFee = k.ConvertBaseAmountToQuoteAmount(ctx, position.Market, commissionBaseFee) imaginaryFundingFee = k.ConvertBaseAmountToQuoteAmount(ctx, position.Market, imaginaryFundingBaseFee) } + var totalFee sdk.Int if positionInstance.PositionType == types.PositionType_LONG { - // If the margin is lower than the fee, the fee is equal to the margin. - if position.RemainingMargin.Amount.LT(imaginaryFundingFee) { - imaginaryFundingFee = position.RemainingMargin.Amount - } - if position.RemainingMargin.Amount.Sub(imaginaryFundingFee).LT(commissionFee) { - commissionFee = position.RemainingMargin.Amount.Sub(imaginaryFundingFee) - } - position.RemainingMargin.Amount = position.RemainingMargin.Amount.Sub(imaginaryFundingFee).Sub(commissionFee) - + totalFee = commissionFee.Add(imaginaryFundingFee) } else { - if position.RemainingMargin.Amount.Add(imaginaryFundingFee).LT(commissionFee) { - commissionFee = position.RemainingMargin.Amount.Add(imaginaryFundingFee) - } - position.RemainingMargin.Amount = position.RemainingMargin.Amount.Add(imaginaryFundingFee).Sub(commissionFee) + totalFee = commissionFee.Sub(imaginaryFundingFee) } - // Transfer the fees from pool to manager or manager to pool appropriately - // to keep the remaining margin of the position match the actual number to the balance - if err := k.HandleImaginaryFundingFeeTransfer(ctx, imaginaryFundingFee, commissionFee, positionInstance.PositionType, position.RemainingMargin.Denom); err != nil { - return err + if position.LeviedAmountNegative { + position.LeviedAmount.Amount = position.LeviedAmount.Amount.Add(totalFee) + } else { + rest := position.LeviedAmount.Amount.Sub(totalFee) + if rest.IsNegative() { + position.LeviedAmountNegative = true + position.LeviedAmount.Amount = rest.Abs() + } else { + position.LeviedAmount.Amount = rest + } } position.LastLeviedAt = ctx.BlockTime() - // Reward is part of the commission fee - rewardAmount := sdk.NewDecFromInt(commissionFee).Mul(params.PoolParams.ReportLevyPeriodRewardRate).RoundInt() - - recipient, err := sdk.AccAddressFromBech32(rewardRecipient) + err := k.SetPosition(ctx, position) if err != nil { return err } - reward := sdk.NewCoins(sdk.NewCoin(position.RemainingMargin.Denom, rewardAmount)) - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, reward) - if err != nil { - return err - } - - err = k.SetPosition(ctx, position) + // Send Reward + rewardAmount := sdk.NewDecFromInt(commissionFee).Mul(params.PoolParams.ReportLevyPeriodRewardRate).RoundInt() + err = k.SendRewardFromCommission(ctx, rewardAmount, position.RemainingMargin.Denom, rewardRecipient) if err != nil { return err } @@ -376,11 +372,26 @@ func (k Keeper) ReportLevyPeriodPerpetualFuturesPosition(ctx sdk.Context, reward PositionId: position.Id, RemainingMargin: position.RemainingMargin.String(), RewardAmount: rewardAmount.String(), + LeviedAmount: position.LeviedAmount.String(), }) return nil } +func (k Keeper) SendRewardFromCommission(ctx sdk.Context, rewardAmount sdk.Int, denom string, recipientAddr string) error { + recipient, err := sdk.AccAddressFromBech32(recipientAddr) + if err != nil { + return err + } + + reward := sdk.NewCoins(sdk.NewCoin(denom, rewardAmount)) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, reward) + if err != nil { + return err + } + return nil +} + func (k Keeper) HandleImaginaryFundingFeeTransfer(ctx sdk.Context, imaginaryFundingFee, commissionFee sdk.Int, positionType types.PositionType, denom string) error { var totalFee sdk.Int if positionType == types.PositionType_LONG { @@ -419,16 +430,6 @@ func (k Keeper) GetPerpetualFuturesGrossPositionOfMarket(ctx sdk.Context, market return grossPositionOfMarket } -/// GetPositionSizeOfGrossPositionOfMarket is not used anymore. -/// This can be deleted. -// func (k Keeper) GetPositionSizeOfGrossPositionOfMarket(ctx sdk.Context, market types.Market) sdk.Int { -// position := k.GetPerpetualFuturesGrossPositionOfMarket(ctx, market, ) -// if position.PositionSizeInDenomUnit.IsNil() { -// return sdk.ZeroInt() -// } -// return position.PositionSizeInDenomUnit -// } - func (k Keeper) GetAllPerpetualFuturesGrossPositionOfMarket(ctx sdk.Context) []types.PerpetualFuturesGrossPositionOfMarket { store := ctx.KVStore(k.storeKey) diff --git a/x/derivatives/keeper/perpetual_futures_test.go b/x/derivatives/keeper/perpetual_futures_test.go index 3d30df388..d1792a52c 100644 --- a/x/derivatives/keeper/perpetual_futures_test.go +++ b/x/derivatives/keeper/perpetual_futures_test.go @@ -1,9 +1,10 @@ package keeper_test import ( - // "fmt" + "time" "github.com/cometbft/cometbft/crypto/ed25519" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/UnUniFi/chain/x/derivatives/types" @@ -11,7 +12,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) -// TODO: Add checks to ensure the margin is handed to MarginManager module account appropriately. func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { owner := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) @@ -21,11 +21,12 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { } positions := []struct { - positionId string - margin sdk.Coin - instance types.PerpetualFuturesPositionInstance - availableAssetInPool sdk.Coin - expGrossPosition sdk.Int + positionId string + margin sdk.Coin + instance types.PerpetualFuturesPositionInstance + availableAssetInPool sdk.Coin + expGrossPosition sdk.Int + expMarginManagerBalance sdk.Coin }{ { positionId: "-1", @@ -35,8 +36,9 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("1"), Leverage: 1, }, - availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(1)), - expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(1)), + expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uatom", sdk.NewInt(0)), }, { positionId: "0", @@ -46,8 +48,9 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("2"), Leverage: 5, }, - availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(2000000)), - expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(2000000)), + expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uatom", sdk.NewInt(500000)), }, { positionId: "1", @@ -57,8 +60,9 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("1"), Leverage: 5, }, - availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), - expGrossPosition: sdk.MustNewDecFromStr("1").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), + expGrossPosition: sdk.MustNewDecFromStr("1").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uatom", sdk.NewInt(1000000)), }, { positionId: "2", @@ -68,8 +72,9 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("2"), Leverage: 20, }, - availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(20000000)), - expGrossPosition: sdk.MustNewDecFromStr("4").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(20000000)), + expGrossPosition: sdk.MustNewDecFromStr("4").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uusdc", sdk.NewInt(1000000)), }, { positionId: "3", @@ -79,11 +84,16 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("1"), Leverage: 10, }, - availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), - expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), + expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uusdc", sdk.NewInt(2000000)), }, } + coins := sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(5000000)), sdk.NewCoin("uusdc", sdk.NewInt(50000000))} + _ = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, owner, coins) + for _, testPosition := range positions { err := suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{testPosition.availableAssetInPool}) suite.Require().NoError(err) @@ -99,8 +109,11 @@ func (suite *KeeperTestSuite) TestOpenPerpetualFuturesPosition() { // Check if the position was added grossPosition := suite.keeper.GetPerpetualFuturesGrossPositionOfMarket(suite.ctx, market, testPosition.instance.PositionType) - suite.Require().Equal(testPosition.expGrossPosition, grossPosition.PositionSizeInDenomExponent) + + // Check if the margin manager module account has the margin + balance := suite.app.BankKeeper.GetBalance(suite.ctx, authtypes.NewModuleAddress(types.MarginManager), testPosition.margin.Denom) + suite.Require().Equal(testPosition.expMarginManagerBalance, balance) } } @@ -128,7 +141,7 @@ func (suite *KeeperTestSuite) TestAddReserveTokensForPosition() { reserve, err := suite.keeper.GetReservedCoin(suite.ctx, types.MarketType_FUTURES, tc.reserveCoin.Denom) suite.Require().NoError(err) - suite.Require().Equal(tc.expReserve, reserve) + suite.Require().Equal(tc.expReserve, reserve.Amount) } } @@ -161,13 +174,11 @@ func (suite *KeeperTestSuite) TestSubReserveTokensForPosition() { reserve, err := suite.keeper.GetReservedCoin(suite.ctx, types.MarketType_FUTURES, tc.reserveCoin.Denom) suite.Require().NoError(err) - suite.Require().Equal(tc.expReserve, reserve) + suite.Require().Equal(tc.expReserve, reserve.Amount) } } -// TODO: Add chekcs for the proper token transfer from MarginManager and Pool(derivatives) module accounts -// You can refer how the token should be distributed from those two. -// Actually, many cases could be happened. All of them have to be checked. +// TODO: Add check for profit and loss func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { owner := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) @@ -176,7 +187,122 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { QuoteDenom: "uusdc", } - // TODO: Check the returning amount to the owner + positions := []struct { + positionId string + margin sdk.Coin + instance types.PerpetualFuturesPositionInstance + availableAssetInPool sdk.Coin + expGrossPosition sdk.Int + expMarginManagerBalance sdk.Coin + expOwnerBalance sdk.Coin + }{ + { + positionId: "0", + margin: sdk.NewCoin("uatom", sdk.NewInt(500000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_LONG, + Size_: sdk.MustNewDecFromStr("2"), + Leverage: 5, + }, + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(10000000)), + // 2+2-2 = 2 + expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uatom", sdk.NewInt(500000)), + expOwnerBalance: sdk.NewCoin("uatom", sdk.NewInt(4500000)), + }, + { + positionId: "1", + margin: sdk.NewCoin("uatom", sdk.NewInt(500000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_SHORT, + Size_: sdk.MustNewDecFromStr("2"), + Leverage: 5, + }, + availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), + // 2+1-2 = 1 + expGrossPosition: sdk.MustNewDecFromStr("1").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uatom", sdk.NewInt(0)), + expOwnerBalance: sdk.NewCoin("uatom", sdk.NewInt(5000000)), + }, + { + positionId: "2", + margin: sdk.NewCoin("uusdc", sdk.NewInt(1000000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_LONG, + Size_: sdk.MustNewDecFromStr("2"), + Leverage: 20, + }, + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(10000000)), + expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uusdc", sdk.NewInt(1000000)), + expOwnerBalance: sdk.NewCoin("uusdc", sdk.NewInt(49000000)), + }, + { + positionId: "3", + margin: sdk.NewCoin("uusdc", sdk.NewInt(1000000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_SHORT, + Size_: sdk.MustNewDecFromStr("1"), + Leverage: 10, + }, + availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), + expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + expMarginManagerBalance: sdk.NewCoin("uusdc", sdk.NewInt(0)), + expOwnerBalance: sdk.NewCoin("uusdc", sdk.NewInt(50000000)), + }, + } + + coins := sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(5000000)), sdk.NewCoin("uusdc", sdk.NewInt(50000000))} + _ = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, owner, coins) + + for _, testPosition := range positions { + err := suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{testPosition.availableAssetInPool}) + suite.Require().NoError(err) + + position, err := suite.keeper.OpenPerpetualFuturesPosition(suite.ctx, testPosition.positionId, owner.String(), testPosition.margin, market, testPosition.instance) + suite.Require().NoError(err) + suite.Require().NotNil(position) + + _ = suite.keeper.SetPosition(suite.ctx, *position) + } + + for _, testPosition := range positions { + position := suite.keeper.GetPositionWithId(suite.ctx, testPosition.positionId) + err := suite.keeper.ClosePerpetualFuturesPosition(suite.ctx, types.NewPerpetualFuturesPosition(*position, testPosition.instance)) + suite.Require().NoError(err) + + // Check if the position was added + grossPosition := suite.keeper.GetPerpetualFuturesGrossPositionOfMarket(suite.ctx, market, testPosition.instance.PositionType) + suite.Require().Equal(testPosition.expGrossPosition, grossPosition.PositionSizeInDenomExponent) + + // Check if the margin manager module account has the margin + balance := suite.app.BankKeeper.GetBalance(suite.ctx, authtypes.NewModuleAddress(types.MarginManager), testPosition.margin.Denom) + suite.Require().Equal(testPosition.expMarginManagerBalance, balance) + ownerBalance := suite.app.BankKeeper.GetBalance(suite.ctx, owner, testPosition.margin.Denom) + suite.Require().Equal(testPosition.expOwnerBalance, ownerBalance) + } +} + +func (suite *KeeperTestSuite) TestReportLiquidationNeededPerpetualFuturesPosition() { + suite.SetParams() + owner := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + market := types.Market{ + BaseDenom: "uatom", + QuoteDenom: "uusdc", + } + _, err := suite.app.PricefeedKeeper.SetPrice(suite.ctx, sdk.AccAddress{}, "uatom:usd", sdk.MustNewDecFromStr("0.00002"), suite.ctx.BlockTime().Add(time.Hour*3)) + suite.Require().NoError(err) + _, err = suite.app.PricefeedKeeper.SetPrice(suite.ctx, sdk.AccAddress{}, "uusdc:usd", sdk.MustNewDecFromStr("0.000001"), suite.ctx.BlockTime().Add(time.Hour*3)) + suite.Require().NoError(err) + err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uatom:usd") + suite.Require().NoError(err) + err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uusdc:usd") + suite.Require().NoError(err) + coins := sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(5000000)), sdk.NewCoin("uusdc", sdk.NewInt(50000000))} + _ = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, owner, coins) + positions := []struct { positionId string margin sdk.Coin @@ -192,9 +318,10 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("2"), Leverage: 5, }, - availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(10000000)), - // 2+2-2 = 2 - expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(2000000)), + // margin rate 125% = margin 10usd / require 8usd + // => 69% = (margin 9usd + loss 4usd = 5usd) / require 7.2 usd + expGrossPosition: sdk.MustNewDecFromStr("4").MulInt64(1000000).TruncateInt(), }, { positionId: "1", @@ -205,8 +332,104 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { Leverage: 5, }, availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), - // 2+1-2 = 1 - expGrossPosition: sdk.MustNewDecFromStr("1").MulInt64(1000000).TruncateInt(), + // margin rate 125% + // => 180% = (margin 9usd + profit 4usd = 13usd) / require 7.2 usd + expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + }, + { + positionId: "2", + margin: sdk.NewCoin("uusdc", sdk.NewInt(5000000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_LONG, + Size_: sdk.MustNewDecFromStr("2"), + Leverage: 10, + }, + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(20000000)), + // margin rate 125% = margin 5usd / require 4usd + // => 27% = (margin 5usd - loss 4usd = 1usd) / require 3.6 usd + // Close position#2 + expGrossPosition: sdk.MustNewDecFromStr("2").MulInt64(1000000).TruncateInt(), + }, + } + + for _, testPosition := range positions { + err := suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{testPosition.availableAssetInPool}) + suite.Require().NoError(err) + + position, err := suite.keeper.OpenPerpetualFuturesPosition(suite.ctx, testPosition.positionId, owner.String(), testPosition.margin, market, testPosition.instance) + suite.Require().NoError(err) + suite.Require().NotNil(position) + + _ = suite.keeper.SetPosition(suite.ctx, *position) + _ = suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{testPosition.margin}) + } + + // 10% price down + _, err = suite.app.PricefeedKeeper.SetPrice(suite.ctx, sdk.AccAddress{}, "uatom:usd", sdk.MustNewDecFromStr("0.000018"), suite.ctx.BlockTime().Add(time.Hour*3)) + suite.Require().NoError(err) + err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uatom:usd") + suite.Require().NoError(err) + + for _, testPosition := range positions { + position := suite.keeper.GetPositionWithId(suite.ctx, testPosition.positionId) + positionInstance, err := types.UnpackPositionInstance(position.PositionInstance) + suite.Require().NoError(err) + switch positionInstance := positionInstance.(type) { + case *types.PerpetualFuturesPositionInstance: + perpetualFuturesPosition := types.NewPerpetualFuturesPosition(*position, *positionInstance) + err = suite.keeper.ReportLiquidationNeededPerpetualFuturesPosition(suite.ctx, owner.String(), perpetualFuturesPosition) + } + suite.Require().NoError(err) + + // Check if the position was closed + grossPosition := suite.keeper.GetPerpetualFuturesGrossPositionOfMarket(suite.ctx, market, testPosition.instance.PositionType) + suite.Require().Equal(testPosition.expGrossPosition, grossPosition.PositionSizeInDenomExponent) + } +} + +func (suite *KeeperTestSuite) TestReportLevyPeriodPerpetualFuturesPosition() { + suite.SetParams() + owner := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + market := types.Market{ + BaseDenom: "uatom", + QuoteDenom: "uusdc", + } + coins := sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(5000000)), sdk.NewCoin("uusdc", sdk.NewInt(50000000))} + _ = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, owner, coins) + + positions := []struct { + positionId string + margin sdk.Coin + instance types.PerpetualFuturesPositionInstance + availableAssetInPool sdk.Coin + expMargin sdk.Int + }{ + { + positionId: "0", + margin: sdk.NewCoin("uatom", sdk.NewInt(500000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_LONG, + Size_: sdk.MustNewDecFromStr("2"), + Leverage: 5, + }, + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(2000000)), + // -funding 2000000 * 0.0005 * 2 / 6 = 333uatom + // 500000 - 333 - 2000(commission 2000000*0.001) = 497667 + expMargin: sdk.MustNewDecFromStr("497667").TruncateInt(), + }, + { + positionId: "1", + margin: sdk.NewCoin("uatom", sdk.NewInt(500000)), + instance: types.PerpetualFuturesPositionInstance{ + PositionType: types.PositionType_SHORT, + Size_: sdk.MustNewDecFromStr("1"), + Leverage: 5, + }, + availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), + // +funding 1000000 * 0.0005 * 2 / 6 = 167uatom + // 500000 + 167 - 1000(commission) = 499167 + expMargin: sdk.MustNewDecFromStr("499167").TruncateInt(), }, { positionId: "2", @@ -216,8 +439,10 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { Size_: sdk.MustNewDecFromStr("2"), Leverage: 20, }, - availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(10000000)), - expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + availableAssetInPool: sdk.NewCoin("uatom", sdk.NewInt(20000000)), + // -funding 2000000 * 0.0005 * 2 / 6 = 333uatom + // 1000000 - 33(funding) - 200(commission) = 999767uusdc + expMargin: sdk.MustNewDecFromStr("999767").TruncateInt(), }, { positionId: "3", @@ -228,7 +453,9 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { Leverage: 10, }, availableAssetInPool: sdk.NewCoin("uusdc", sdk.NewInt(10000000)), - expGrossPosition: sdk.MustNewDecFromStr("0").MulInt64(1000000).TruncateInt(), + // +funding 1000000 * 0.0005 * 2 / 6 = 167uatom + // 1000000 + 17(funding) - 100(commission) = 999917uusdc + expMargin: sdk.MustNewDecFromStr("999917").TruncateInt(), }, } @@ -240,18 +467,19 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { suite.Require().NoError(err) suite.Require().NotNil(position) - suite.keeper.SetPosition(suite.ctx, *position) - + _ = suite.keeper.SetPosition(suite.ctx, *position) _ = suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{testPosition.margin}) } for _, testPosition := range positions { position := suite.keeper.GetPositionWithId(suite.ctx, testPosition.positionId) - err := suite.keeper.ClosePerpetualFuturesPosition(suite.ctx, types.NewPerpetualFuturesPosition(*position, testPosition.instance)) + positionInstance, err := types.UnpackPositionInstance(position.PositionInstance) + suite.Require().NoError(err) + switch positionInstance := positionInstance.(type) { + case *types.PerpetualFuturesPositionInstance: + err = suite.keeper.ReportLevyPeriodPerpetualFuturesPosition(suite.ctx, owner.String(), *position, *positionInstance) + } suite.Require().NoError(err) - - // Check if the position was added - netPosition := suite.keeper.GetPerpetualFuturesNetPositionOfMarket(suite.ctx, market, testPosition.instance.PositionType) // Check if the position was changed updatedPosition := suite.keeper.GetPositionWithId(suite.ctx, testPosition.positionId) @@ -265,7 +493,7 @@ func (suite *KeeperTestSuite) TestClosePerpetualFuturesPosition() { // imaginaryFundingFee: sdk.Int // commissionFee: sdk.Int // denom: string -// We can test the functionaly with above params and the balance of the MarginManager and Pool(derivatives) Module account +// We can test the functionally with above params and the balance of the MarginManager and Pool(derivatives) Module account // By checking those two balance after the function func (suite *KeeperTestSuite) TestHandleImaginaryFundingFeeTransfer() { testcases := []struct { @@ -325,12 +553,14 @@ func (suite *KeeperTestSuite) TestHandleImaginaryFundingFeeTransfer() { }, } - err := suite.app.BankKeeper.MintCoins(suite.ctx, types.MarginManager, sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(1000100))}) - suite.Require().NoError(err) + coins := sdk.Coins{sdk.NewCoin("uatom", sdk.NewInt(1000100))} + _ = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + _ = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, authtypes.NewModuleAddress(types.MarginManager), coins) + for _, tc := range testcases { suite.Run(tc.name, func() { - suite.keeper.HandleImaginaryFundingFeeTransfer(suite.ctx, tc.imaginaryFundingFee, tc.commissionFee, tc.positionType, tc.denom) - + err := suite.keeper.HandleImaginaryFundingFeeTransfer(suite.ctx, tc.imaginaryFundingFee, tc.commissionFee, tc.positionType, tc.denom) + suite.Require().NoError(err) // Check if the balance of the MarginManager and Pool(derivatives) Module account was changed suite.Require().Equal(tc.expMarginManagerPool, suite.app.BankKeeper.GetBalance(suite.ctx, authtypes.NewModuleAddress(types.MarginManager), tc.denom).Amount) suite.Require().Equal(tc.expPool, suite.app.BankKeeper.GetBalance(suite.ctx, authtypes.NewModuleAddress(types.ModuleName), tc.denom).Amount) diff --git a/x/derivatives/keeper/pool.go b/x/derivatives/keeper/pool.go index 92d70cbe4..27c2f7983 100644 --- a/x/derivatives/keeper/pool.go +++ b/x/derivatives/keeper/pool.go @@ -143,7 +143,7 @@ func (k Keeper) IsPriceReady(ctx sdk.Context) bool { } func (k Keeper) SetReservedCoin(ctx sdk.Context, reserve types.Reserve) error { - bz, err := reserve.Amount.Marshal() + bz, err := reserve.Amount.Amount.Marshal() if err != nil { return err } @@ -158,17 +158,17 @@ func (k Keeper) GetReservedCoin(ctx sdk.Context, marketType types.MarketType, de store := ctx.KVStore(k.storeKey) bz := store.Get(types.ReservedCoinKeyPrefix(marketType, denom)) - var reserve types.Reserve + reserveAmount := sdk.Int{} - if err := k.cdc.Unmarshal(bz, &reserve); err != nil { + if err := reserveAmount.Unmarshal(bz); err != nil { return types.Reserve{}, err } - if reserve.Amount.Amount.IsNil() { - reserve.Amount.Amount = sdk.ZeroInt() + if reserveAmount.IsNil() { + reserveAmount = sdk.ZeroInt() } - return reserve, nil + return types.NewReserve(marketType, sdk.NewCoin(denom, reserveAmount)), nil } func (k Keeper) AvailableAssetInPoolWithMarketType(ctx sdk.Context, marketType types.MarketType, denom string) (sdk.Coin, error) { @@ -176,10 +176,6 @@ func (k Keeper) AvailableAssetInPoolWithMarketType(ctx sdk.Context, marketType t reserve, err := k.GetReservedCoin(ctx, marketType, denom) if err != nil { - return sdk.Coin{}, err - } - - if reserve.Amount.IsZero() { reserve.Amount = sdk.NewCoin(denom, sdk.ZeroInt()) } @@ -189,8 +185,11 @@ func (k Keeper) AvailableAssetInPoolWithMarketType(ctx sdk.Context, marketType t func (k Keeper) AvailableAssetInPool(ctx sdk.Context, denom string) (sdk.Coin, error) { availableInFutures, err := k.AvailableAssetInPoolWithMarketType(ctx, types.MarketType_FUTURES, denom) - availableInOptions, err := k.AvailableAssetInPoolWithMarketType(ctx, types.MarketType_OPTIONS, denom) + if err != nil { + return sdk.Coin{}, err + } + availableInOptions, err := k.AvailableAssetInPoolWithMarketType(ctx, types.MarketType_OPTIONS, denom) if err != nil { return sdk.Coin{}, err } diff --git a/x/derivatives/keeper/pool_test.go b/x/derivatives/keeper/pool_test.go index 532867111..349a0bbed 100644 --- a/x/derivatives/keeper/pool_test.go +++ b/x/derivatives/keeper/pool_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "time" - ununifitypes "github.com/UnUniFi/chain/deprecated/types" "github.com/UnUniFi/chain/x/derivatives/types" pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" @@ -108,7 +107,7 @@ func (suite *KeeperTestSuite) TestIsPriceReady() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uatom:uusdc") @@ -117,3 +116,10 @@ func (suite *KeeperTestSuite) TestIsPriceReady() { isReady = suite.keeper.IsPriceReady(suite.ctx) suite.Require().True(isReady) } + +func (suite *KeeperTestSuite) TestAvailableAssetInPool() { + // get the value when nothing is set + availableAssets, err := suite.keeper.AvailableAssetInPool(suite.ctx, "uatom") + suite.Require().NoError(err) + suite.Require().Equal(availableAssets, sdk.NewCoin("uatom", sdk.ZeroInt())) +} diff --git a/x/derivatives/keeper/positions.go b/x/derivatives/keeper/positions.go index 4889d84c7..5b3c6c09b 100644 --- a/x/derivatives/keeper/positions.go +++ b/x/derivatives/keeper/positions.go @@ -164,11 +164,6 @@ func (k Keeper) OpenPosition(ctx sdk.Context, msg *types.MsgOpenPosition) error return err } - sender, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { - return err - } - var position *types.Position switch positionInstance := positionInstance.(type) { case *types.PerpetualFuturesPositionInstance: @@ -183,12 +178,11 @@ func (k Keeper) OpenPosition(ctx sdk.Context, msg *types.MsgOpenPosition) error return err } - k.SetPosition(ctx, *position) - k.IncreaseLastPositionId(ctx) - - if err := k.SendMarginToMarginManager(ctx, sender, sdk.NewCoins(msg.Margin)); err != nil { + err = k.SetPosition(ctx, *position) + if err != nil { return err } + k.IncreaseLastPositionId(ctx) return nil } @@ -219,10 +213,8 @@ func (k Keeper) ClosePosition(ctx sdk.Context, msg *types.MsgClosePosition) erro case *types.PerpetualFuturesPositionInstance: perpetualFuturesPosition := types.NewPerpetualFuturesPosition(*position, *positionInstance) err = k.ClosePerpetualFuturesPosition(ctx, perpetualFuturesPosition) - break case *types.PerpetualOptionsPositionInstance: err = k.ClosePerpetualOptionsPosition(ctx, *position, *positionInstance) - break default: return sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "position instance: %s", positionInstance) } diff --git a/x/derivatives/keeper/positions_test.go b/x/derivatives/keeper/positions_test.go index e10956984..ac402fe3a 100644 --- a/x/derivatives/keeper/positions_test.go +++ b/x/derivatives/keeper/positions_test.go @@ -48,7 +48,7 @@ func (suite *KeeperTestSuite) TestGetAllPositions() { positions := []types.Position{ { Id: "0", - Address: owner.Bytes(), + Address: owner.String(), Market: types.Market{ BaseDenom: "uatom", QuoteDenom: "uusdc", @@ -63,7 +63,7 @@ func (suite *KeeperTestSuite) TestGetAllPositions() { }, { Id: "1", - Address: owner.Bytes(), + Address: owner.String(), Market: types.Market{ BaseDenom: "uatom", QuoteDenom: "uusdc", @@ -132,7 +132,7 @@ func (suite *KeeperTestSuite) TestDeletePosition() { positions := []types.Position{ { Id: "0", - Address: owner.Bytes(), + Address: owner.String(), Market: types.Market{ BaseDenom: "uatom", QuoteDenom: "uusdc", @@ -143,7 +143,7 @@ func (suite *KeeperTestSuite) TestDeletePosition() { }, { Id: "1", - Address: owner2.Bytes(), + Address: owner2.String(), Market: types.Market{ BaseDenom: "uatom", QuoteDenom: "uusdc", @@ -164,7 +164,9 @@ func (suite *KeeperTestSuite) TestDeletePosition() { // check per id for _, position := range positions { - p := suite.keeper.GetAddressPositionWithId(suite.ctx, position.Address.AccAddress(), position.Id) + address, err := sdk.AccAddressFromBech32(position.Address) + suite.Require().NoError(err) + p := suite.keeper.GetAddressPositionWithId(suite.ctx, address, position.Id) suite.Require().NotNil(p) suite.Require().Equal(p.Id, position.Id) suite.Require().Equal(p.Market, position.Market) diff --git a/x/derivatives/keeper/yield_test.go b/x/derivatives/keeper/yield_test.go index 3880c8ea9..9ebf77688 100644 --- a/x/derivatives/keeper/yield_test.go +++ b/x/derivatives/keeper/yield_test.go @@ -9,7 +9,6 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - ununifitypes "github.com/UnUniFi/chain/deprecated/types" "github.com/UnUniFi/chain/x/derivatives/types" pricefeedtypes "github.com/UnUniFi/chain/x/pricefeed/types" ) @@ -80,7 +79,7 @@ func (suite *KeeperTestSuite) TestGetLPNominalYieldRate() { suite.Require().NoError(err) params := suite.app.PricefeedKeeper.GetParams(suite.ctx) params.Markets = []pricefeedtypes.Market{ - {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []ununifitypes.StringAccAddress{}, Active: true}, + {MarketId: "uatom:uusdc", BaseAsset: "uatom", QuoteAsset: "uusdc", Oracles: []string{}, Active: true}, } suite.app.PricefeedKeeper.SetParams(suite.ctx, params) err = suite.app.PricefeedKeeper.SetCurrentPrices(suite.ctx, "uatom:uusdc") diff --git a/x/derivatives/types/derivatives.pb.go b/x/derivatives/types/derivatives.pb.go index 01fcb6079..cbc1c9835 100644 --- a/x/derivatives/types/derivatives.pb.go +++ b/x/derivatives/types/derivatives.pb.go @@ -88,16 +88,18 @@ func (MarketType) EnumDescriptor() ([]byte, []int) { } type Position struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - Market Market `protobuf:"bytes,2,opt,name=market,proto3" json:"market" yaml:"market"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - OpenedAt time.Time `protobuf:"bytes,4,opt,name=opened_at,json=openedAt,proto3,stdtime" json:"opened_at" yaml:"opened_at"` - OpenedHeight uint64 `protobuf:"varint,5,opt,name=opened_height,json=openedHeight,proto3" json:"opened_height,omitempty" yaml:"opened_height"` - OpenedBaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=opened_base_rate,json=openedBaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_base_rate" yaml:"opened_base_rate"` - OpenedQuoteRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=opened_quote_rate,json=openedQuoteRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_quote_rate" yaml:"opened_quote_rate"` - RemainingMargin types.Coin `protobuf:"bytes,8,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin" yaml:"remaining_margin"` - LastLeviedAt time.Time `protobuf:"bytes,9,opt,name=last_levied_at,json=lastLeviedAt,proto3,stdtime" json:"last_levied_at" yaml:"last_levied_at"` - PositionInstance types1.Any `protobuf:"bytes,10,opt,name=position_instance,json=positionInstance,proto3" json:"position_instance" yaml:"position_instance"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Market Market `protobuf:"bytes,2,opt,name=market,proto3" json:"market" yaml:"market"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + OpenedAt time.Time `protobuf:"bytes,4,opt,name=opened_at,json=openedAt,proto3,stdtime" json:"opened_at" yaml:"opened_at"` + OpenedHeight uint64 `protobuf:"varint,5,opt,name=opened_height,json=openedHeight,proto3" json:"opened_height,omitempty" yaml:"opened_height"` + OpenedBaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=opened_base_rate,json=openedBaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_base_rate" yaml:"opened_base_rate"` + OpenedQuoteRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=opened_quote_rate,json=openedQuoteRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_quote_rate" yaml:"opened_quote_rate"` + RemainingMargin types.Coin `protobuf:"bytes,8,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin" yaml:"remaining_margin"` + LeviedAmount types.Coin `protobuf:"bytes,9,opt,name=levied_amount,json=leviedAmount,proto3" json:"levied_amount" yaml:"levied_amount"` + LeviedAmountNegative bool `protobuf:"varint,10,opt,name=levied_amount_negative,json=leviedAmountNegative,proto3" json:"levied_amount_negative,omitempty" yaml:"levied_amount_negative"` + LastLeviedAt time.Time `protobuf:"bytes,11,opt,name=last_levied_at,json=lastLeviedAt,proto3,stdtime" json:"last_levied_at" yaml:"last_levied_at"` + PositionInstance types1.Any `protobuf:"bytes,12,opt,name=position_instance,json=positionInstance,proto3" json:"position_instance" yaml:"position_instance"` } func (m *Position) Reset() { *m = Position{} } @@ -175,6 +177,20 @@ func (m *Position) GetRemainingMargin() types.Coin { return types.Coin{} } +func (m *Position) GetLeviedAmount() types.Coin { + if m != nil { + return m.LeviedAmount + } + return types.Coin{} +} + +func (m *Position) GetLeviedAmountNegative() bool { + if m != nil { + return m.LeviedAmountNegative + } + return false +} + func (m *Position) GetLastLeviedAt() time.Time { if m != nil { return m.LastLeviedAt @@ -781,103 +797,107 @@ func init() { } var fileDescriptor_5a25a5cf1b44b970 = []byte{ - // 1532 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xc9, 0x6e, 0x1b, 0x47, - 0x1a, 0x56, 0x6b, 0x67, 0x69, 0xa3, 0xda, 0x92, 0x45, 0x49, 0x63, 0x52, 0x53, 0x86, 0x0d, 0xc1, - 0xf0, 0x90, 0xb0, 0x3c, 0xc0, 0x60, 0x0c, 0x24, 0x86, 0x68, 0x9b, 0x11, 0x1d, 0x2d, 0x74, 0x89, - 0x8a, 0x82, 0x00, 0x41, 0xa3, 0xc4, 0x2e, 0x52, 0x05, 0x91, 0x5d, 0x74, 0x75, 0x35, 0x15, 0x22, - 0xe7, 0x00, 0xc9, 0xcd, 0xc8, 0xd5, 0x01, 0x72, 0xc9, 0x35, 0x0f, 0x91, 0x4b, 0xe0, 0x4b, 0x00, - 0xdf, 0x12, 0xe4, 0xc0, 0x04, 0xf6, 0x1b, 0xf0, 0x09, 0x82, 0x5a, 0xba, 0xb9, 0x88, 0x5e, 0xe8, - 0x04, 0xf0, 0x49, 0xac, 0x7f, 0xf9, 0xfe, 0xaf, 0xfe, 0xad, 0xbb, 0x05, 0xae, 0x05, 0x5e, 0xe0, - 0xd1, 0x32, 0xcd, 0xb8, 0x84, 0xd3, 0x06, 0x16, 0xb4, 0x41, 0xfc, 0xee, 0xdf, 0xe9, 0x3a, 0x67, - 0x82, 0xd9, 0x97, 0x8c, 0x59, 0xba, 0x4b, 0xb5, 0xb6, 0x5a, 0x61, 0xac, 0x52, 0x25, 0x19, 0x65, - 0x72, 0x12, 0x94, 0x33, 0xd8, 0x6b, 0x6a, 0xfb, 0xb5, 0xa5, 0x0a, 0xab, 0x30, 0xf5, 0x33, 0x23, - 0x7f, 0x19, 0x69, 0xaa, 0xdf, 0x41, 0xd0, 0x1a, 0xf1, 0x05, 0xae, 0xd5, 0x8d, 0x41, 0xb2, 0xc4, - 0xfc, 0x1a, 0xf3, 0x33, 0x27, 0xd8, 0x27, 0x99, 0xc6, 0xad, 0x13, 0x22, 0xf0, 0xad, 0x4c, 0x89, - 0x51, 0xcf, 0xe8, 0x57, 0xb5, 0xde, 0xd1, 0xc8, 0xfa, 0xa0, 0x55, 0xf0, 0xd7, 0x49, 0x30, 0x5d, - 0x60, 0x3e, 0x15, 0x94, 0x79, 0xf6, 0x15, 0x30, 0x4a, 0xdd, 0x84, 0xb5, 0x61, 0x6d, 0xc6, 0xb2, - 0x73, 0xed, 0x56, 0x2a, 0xd6, 0xc4, 0xb5, 0xea, 0x1d, 0x48, 0x5d, 0x88, 0x46, 0xa9, 0x6b, 0x3f, - 0x04, 0x93, 0x35, 0xcc, 0xcf, 0x88, 0x48, 0x8c, 0x6e, 0x58, 0x9b, 0x33, 0x5b, 0xeb, 0xe9, 0x01, - 0xd7, 0x4b, 0xef, 0x29, 0x93, 0xec, 0xf2, 0xb3, 0x56, 0x6a, 0xa4, 0xdd, 0x4a, 0xcd, 0x69, 0x0c, - 0xed, 0x08, 0x91, 0x41, 0xb0, 0x6f, 0x82, 0x29, 0xec, 0xba, 0x9c, 0xf8, 0x7e, 0x62, 0x4c, 0xc5, - 0xb3, 0xdb, 0xad, 0xd4, 0xbc, 0xb6, 0x35, 0x0a, 0x88, 0x42, 0x13, 0xfb, 0x08, 0xc4, 0x58, 0x9d, - 0x78, 0xc4, 0x75, 0xb0, 0x48, 0x8c, 0xab, 0xe0, 0x6b, 0x69, 0x9d, 0x95, 0x74, 0x98, 0x95, 0x74, - 0x31, 0xcc, 0x4a, 0xf6, 0x5f, 0x26, 0x76, 0x5c, 0xe3, 0x45, 0xae, 0xf0, 0xc9, 0x1f, 0x29, 0x0b, - 0x4d, 0xeb, 0xf3, 0xb6, 0xb0, 0x3f, 0x00, 0x73, 0x46, 0x77, 0x4a, 0x68, 0xe5, 0x54, 0x24, 0x26, - 0x36, 0xac, 0xcd, 0xf1, 0x6c, 0xa2, 0xdd, 0x4a, 0x2d, 0xf5, 0xb8, 0x6a, 0x35, 0x44, 0xb3, 0xfa, - 0xbc, 0xa3, 0x8e, 0xb6, 0x0f, 0xe2, 0x46, 0x2f, 0x13, 0xef, 0x70, 0x2c, 0x48, 0x62, 0x52, 0x5d, - 0x26, 0x2f, 0x09, 0xfc, 0xde, 0x4a, 0x5d, 0xaf, 0x50, 0x71, 0x1a, 0x9c, 0xa4, 0x4b, 0xac, 0x66, - 0xd2, 0x6e, 0xfe, 0xfc, 0xc7, 0x77, 0xcf, 0x32, 0xa2, 0x59, 0x27, 0x7e, 0xfa, 0x3e, 0x29, 0xb5, - 0x5b, 0xa9, 0x95, 0x9e, 0x78, 0x11, 0x1e, 0x44, 0xf3, 0x5a, 0x94, 0xc5, 0x3e, 0x41, 0x58, 0x10, - 0xbb, 0x01, 0x16, 0x8d, 0xd1, 0xe3, 0x80, 0x09, 0x13, 0x75, 0x4a, 0x45, 0x7d, 0x38, 0x74, 0xd4, - 0x44, 0x4f, 0xd4, 0x0e, 0x20, 0x44, 0x0b, 0x5a, 0xf6, 0x48, 0x8a, 0x54, 0x5c, 0x02, 0xe2, 0x9c, - 0xd4, 0x30, 0xf5, 0xa8, 0x57, 0x71, 0x6a, 0x98, 0x57, 0xa8, 0x97, 0x98, 0x56, 0x95, 0x58, 0x4d, - 0x9b, 0x8e, 0x92, 0xac, 0xd3, 0xa6, 0xfd, 0xd2, 0xf7, 0x18, 0xf5, 0xb2, 0x29, 0x53, 0x08, 0x73, - 0xbb, 0x7e, 0x00, 0x88, 0x16, 0x22, 0xd1, 0x9e, 0x92, 0xd8, 0x25, 0x30, 0x5f, 0xc5, 0xbe, 0x70, - 0xaa, 0xa4, 0x41, 0x75, 0xb9, 0x63, 0x6f, 0x2c, 0xf7, 0xbf, 0x4d, 0x94, 0x65, 0x1d, 0xa5, 0xd7, - 0x5f, 0xd7, 0x7c, 0x56, 0x0a, 0x77, 0x95, 0x6c, 0x5b, 0xd8, 0x25, 0xb0, 0x58, 0x37, 0x3d, 0xef, - 0x50, 0xcf, 0x17, 0xd8, 0x2b, 0x91, 0x04, 0x50, 0x71, 0x96, 0x2e, 0xc4, 0xd9, 0xf6, 0x9a, 0xd9, - 0x0d, 0x13, 0xc1, 0xe4, 0xeb, 0x82, 0x33, 0x44, 0xf1, 0x50, 0x96, 0x0f, 0x45, 0x3f, 0x8f, 0x83, - 0x85, 0x47, 0x01, 0xe1, 0x94, 0xb8, 0xd1, 0x80, 0x21, 0x30, 0x1d, 0xda, 0xa9, 0x31, 0x9b, 0xd9, - 0xba, 0x32, 0x70, 0x86, 0x42, 0x87, 0xec, 0x8a, 0x09, 0xbc, 0xd0, 0x1b, 0x18, 0xa2, 0x08, 0x47, - 0x16, 0xa6, 0x81, 0xab, 0x01, 0x56, 0x84, 0xea, 0x9c, 0x95, 0x69, 0x38, 0x9f, 0x6f, 0x5f, 0x98, - 0x7e, 0x00, 0x88, 0x16, 0x22, 0x51, 0x41, 0x49, 0xec, 0xaf, 0x2c, 0x70, 0xb9, 0xbf, 0x7e, 0x8e, - 0x34, 0x22, 0x66, 0x80, 0x0f, 0x86, 0xee, 0xbe, 0x2b, 0x83, 0xbb, 0x42, 0xa3, 0x42, 0xb4, 0xd4, - 0xd7, 0x1b, 0x9f, 0x48, 0xb1, 0xbc, 0x2e, 0x29, 0x97, 0x49, 0x49, 0x26, 0x2a, 0xec, 0xc3, 0xf1, - 0x21, 0xaf, 0xdb, 0x0f, 0x00, 0xd1, 0x42, 0x24, 0x32, 0x7d, 0xf8, 0xb5, 0x05, 0x56, 0x0c, 0x1d, - 0x49, 0x42, 0x10, 0x4f, 0x16, 0x55, 0x4f, 0xdb, 0x84, 0xba, 0x6f, 0x61, 0xe8, 0xfb, 0x26, 0xa3, - 0x55, 0x38, 0x08, 0x16, 0xa2, 0x65, 0xad, 0xd9, 0xeb, 0x28, 0xe4, 0xe4, 0xc1, 0x1f, 0x2c, 0x30, - 0x57, 0x60, 0xac, 0xba, 0xed, 0xfb, 0x44, 0xdc, 0x63, 0x5e, 0xd9, 0xbe, 0x0e, 0x26, 0x5c, 0xe2, - 0xb1, 0x9a, 0x59, 0xd5, 0xf1, 0x76, 0x2b, 0x35, 0xab, 0xb1, 0x95, 0x18, 0x22, 0xad, 0xb6, 0xcf, - 0xc0, 0x9c, 0xc0, 0xbc, 0x42, 0x84, 0x73, 0xae, 0xf7, 0xdb, 0xa8, 0xb2, 0xcf, 0x0d, 0xcd, 0xdc, - 0x6c, 0xc3, 0x1e, 0x30, 0x88, 0x66, 0xf5, 0xf9, 0x58, 0x1f, 0xbf, 0x99, 0x02, 0x40, 0xd2, 0x2c, - 0x60, 0x8e, 0x6b, 0xbe, 0x7d, 0x07, 0xcc, 0xea, 0x7d, 0x22, 0x68, 0xe9, 0x8c, 0x70, 0x43, 0x75, - 0xa5, 0xdd, 0x4a, 0x5d, 0xd2, 0x60, 0xdd, 0x5a, 0x88, 0x66, 0xd4, 0xb1, 0xa8, 0x4e, 0x76, 0x00, - 0x16, 0xd5, 0x06, 0xac, 0xd6, 0x85, 0x53, 0xa3, 0x9e, 0x70, 0xca, 0x84, 0x18, 0xee, 0xef, 0xbc, - 0xe3, 0x2e, 0x00, 0x42, 0x34, 0x2f, 0x65, 0xbb, 0x75, 0xb1, 0x47, 0x3d, 0x91, 0x23, 0xc4, 0xfe, - 0x12, 0x5c, 0x8a, 0xac, 0x38, 0x71, 0x09, 0xa9, 0xa9, 0xc0, 0xba, 0xbd, 0x77, 0x87, 0x0e, 0xbc, - 0xd6, 0x17, 0xb8, 0x03, 0x09, 0x51, 0xdc, 0x84, 0x46, 0x4a, 0x26, 0x83, 0x7f, 0x6b, 0x81, 0xf5, - 0x13, 0xc6, 0x39, 0x3b, 0x97, 0x93, 0x50, 0x26, 0xba, 0x29, 0x9c, 0x3a, 0xe1, 0xce, 0x29, 0x0b, - 0xb8, 0xea, 0xf1, 0x58, 0xb6, 0x38, 0x34, 0x0b, 0x68, 0x58, 0xbc, 0x1a, 0x1a, 0xa2, 0x95, 0x48, - 0x9b, 0x23, 0xaa, 0xe7, 0x0a, 0x84, 0xef, 0xb0, 0x80, 0xdb, 0xdf, 0x59, 0x20, 0xc9, 0x49, 0x9d, - 0x71, 0xe1, 0x54, 0xe9, 0xe3, 0x80, 0xba, 0x7a, 0x49, 0x70, 0x72, 0x8e, 0xb9, 0xdb, 0x3d, 0x0c, - 0xc7, 0x43, 0xf3, 0xba, 0x16, 0x0e, 0xff, 0xeb, 0xd0, 0x21, 0x5a, 0xd7, 0x06, 0xbb, 0x1d, 0x3d, - 0x52, 0x6a, 0xf5, 0x4c, 0x7a, 0xda, 0x45, 0x8f, 0x34, 0x9a, 0xf2, 0x46, 0x94, 0xb9, 0x3d, 0xf4, - 0x26, 0xff, 0x19, 0x7a, 0x83, 0xd1, 0x21, 0x5a, 0x33, 0xf4, 0x48, 0xa3, 0x59, 0x50, 0xea, 0x2e, - 0x76, 0x4d, 0xb0, 0x84, 0x4b, 0x25, 0x52, 0x17, 0xf2, 0x39, 0x24, 0x67, 0xd7, 0x77, 0x4a, 0xcc, - 0x2b, 0x27, 0xa6, 0x36, 0xc6, 0x36, 0x67, 0xb6, 0xe0, 0x2b, 0x16, 0x7f, 0xd7, 0x9c, 0x67, 0xaf, - 0x9a, 0xb5, 0xb5, 0x6e, 0xde, 0x8b, 0x06, 0xa0, 0x41, 0x64, 0x87, 0x62, 0xe5, 0xe7, 0x4b, 0x47, - 0xf8, 0xcb, 0xb8, 0x5e, 0x19, 0xfa, 0x5d, 0xec, 0x1e, 0xae, 0xff, 0xad, 0x71, 0x2c, 0x82, 0x09, - 0xc1, 0x04, 0xae, 0x9a, 0x11, 0xfc, 0x70, 0xe8, 0x64, 0x9a, 0xe5, 0xa4, 0x40, 0x20, 0xd2, 0x60, - 0x76, 0x19, 0x00, 0x75, 0x0f, 0x87, 0x7a, 0x65, 0x96, 0x18, 0x53, 0x49, 0xb9, 0xf9, 0xca, 0xa4, - 0x44, 0x37, 0x49, 0xab, 0x6b, 0xe6, 0xbd, 0x32, 0xcb, 0xae, 0x9a, 0xf4, 0x2c, 0x9a, 0xf4, 0x44, - 0x68, 0x10, 0xc5, 0x70, 0x68, 0xb5, 0xf6, 0xd3, 0x28, 0x88, 0x45, 0x3e, 0x6f, 0xbd, 0x3a, 0x8f, - 0xc1, 0x24, 0xae, 0xb1, 0xc0, 0x0b, 0x77, 0xe6, 0xdd, 0x21, 0x2e, 0x9d, 0xf7, 0x44, 0xe7, 0xc5, - 0x57, 0xa3, 0x40, 0x64, 0xe0, 0x64, 0x32, 0xeb, 0x9c, 0x96, 0xc2, 0xb5, 0xf2, 0xce, 0xc9, 0x54, - 0x20, 0x10, 0x69, 0x30, 0xfb, 0x73, 0x30, 0xcd, 0x89, 0x4f, 0x78, 0x83, 0xb8, 0x66, 0x53, 0x6c, - 0x0f, 0x4d, 0x78, 0x21, 0x6c, 0x79, 0x8d, 0x03, 0x51, 0x04, 0x09, 0xcf, 0xc1, 0xa4, 0x2e, 0x80, - 0xfd, 0x5f, 0x00, 0xd4, 0x42, 0xeb, 0x4e, 0xe2, 0x72, 0xa7, 0x06, 0x1d, 0x1d, 0x44, 0x31, 0x79, - 0xb8, 0xaf, 0xb2, 0xf9, 0x3f, 0xa0, 0x1b, 0xca, 0xb8, 0xe9, 0x94, 0x5e, 0x6e, 0xb7, 0x52, 0x76, - 0x77, 0xf3, 0x19, 0x3f, 0xa0, 0x4e, 0xca, 0x11, 0xfe, 0x68, 0x81, 0x29, 0xa4, 0x59, 0xd8, 0x9f, - 0x82, 0x19, 0xfd, 0xf1, 0xe0, 0x48, 0xd6, 0x2a, 0xf6, 0xfc, 0x56, 0xea, 0x35, 0xdf, 0x20, 0xc5, - 0x66, 0x9d, 0x74, 0x47, 0xe9, 0xf2, 0x86, 0x08, 0xd4, 0x22, 0x1b, 0x7b, 0xa7, 0xa7, 0xd8, 0xaf, - 0x7d, 0x93, 0xe8, 0xfb, 0xac, 0xe9, 0xab, 0x2e, 0xbc, 0x0b, 0x96, 0x1f, 0x34, 0x88, 0x27, 0x0a, - 0xb2, 0x2a, 0x79, 0x7f, 0x9f, 0xc9, 0x07, 0x8b, 0x4b, 0x5c, 0xd9, 0x77, 0xaa, 0x25, 0x2f, 0xf6, - 0x9d, 0x12, 0x43, 0xa4, 0xd5, 0xf0, 0xa9, 0x05, 0x52, 0x1a, 0x81, 0xf0, 0x3a, 0x11, 0x01, 0xae, - 0xe6, 0x02, 0x11, 0x70, 0xe2, 0x17, 0x39, 0x76, 0xf5, 0x82, 0xb6, 0xef, 0x82, 0x31, 0xf9, 0x5c, - 0xb2, 0xde, 0xc4, 0xd5, 0x36, 0x5c, 0x81, 0x0e, 0xa4, 0x1e, 0x3c, 0xd2, 0x53, 0x96, 0xa3, 0xf3, - 0x0a, 0xeb, 0x5e, 0x2c, 0x47, 0x97, 0x12, 0x22, 0x10, 0xbd, 0xd9, 0xba, 0xf2, 0x55, 0x64, 0x73, - 0x20, 0xbb, 0x7c, 0x0d, 0x57, 0xa8, 0x87, 0x79, 0x33, 0x17, 0x78, 0xef, 0x9f, 0xe6, 0xf7, 0x16, - 0xb8, 0x3a, 0x90, 0x66, 0xd7, 0x63, 0xe4, 0xbd, 0x32, 0xbc, 0xf1, 0x7f, 0x30, 0x1b, 0xbe, 0xe3, - 0xab, 0x0e, 0x5c, 0x02, 0xf1, 0xc2, 0xc1, 0x61, 0xbe, 0x98, 0x3f, 0xd8, 0x77, 0x8e, 0xf6, 0x3f, - 0xde, 0x3f, 0x38, 0xde, 0x8f, 0x8f, 0xd8, 0xd3, 0x60, 0x7c, 0xf7, 0x60, 0xff, 0xa3, 0xb8, 0x65, - 0xc7, 0xc0, 0xc4, 0xe1, 0xce, 0x01, 0x2a, 0xc6, 0x47, 0x6f, 0xdc, 0x06, 0xa0, 0xd3, 0xde, 0xf6, - 0x0c, 0x98, 0xea, 0xd8, 0xcf, 0x80, 0xa9, 0xdc, 0x51, 0xf1, 0x08, 0x3d, 0x38, 0x8c, 0x5b, 0xf2, - 0x70, 0x50, 0x90, 0x80, 0x87, 0xf1, 0xd1, 0x6c, 0xee, 0xd9, 0x8b, 0xa4, 0xf5, 0xfc, 0x45, 0xd2, - 0xfa, 0xf3, 0x45, 0xd2, 0x7a, 0xf2, 0x32, 0x39, 0xf2, 0xfc, 0x65, 0x72, 0xe4, 0xb7, 0x97, 0xc9, - 0x91, 0xcf, 0x6e, 0x76, 0xed, 0x87, 0x23, 0xef, 0xc8, 0xa3, 0x39, 0x9a, 0x29, 0x9d, 0x62, 0xea, - 0x65, 0xbe, 0xe8, 0xf9, 0xe7, 0x86, 0xda, 0x14, 0x27, 0x93, 0xea, 0xb3, 0xe8, 0xf6, 0x5f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xaf, 0x94, 0x6d, 0x15, 0x00, 0x11, 0x00, 0x00, + // 1594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x49, 0x6f, 0x1b, 0xc9, + 0x15, 0x56, 0x6b, 0x25, 0x8b, 0x94, 0x44, 0x95, 0x25, 0x8b, 0x92, 0x22, 0xb6, 0x5c, 0x86, 0x0d, + 0xc1, 0x70, 0x48, 0x58, 0x0e, 0x10, 0xc4, 0x40, 0x62, 0x88, 0xb6, 0x19, 0xd1, 0xd1, 0x42, 0x97, + 0xa8, 0x28, 0x08, 0x12, 0x34, 0x5a, 0xec, 0x22, 0x55, 0x10, 0xd9, 0x45, 0x77, 0x57, 0x53, 0x21, + 0x72, 0x0e, 0x90, 0x5c, 0x02, 0x23, 0x57, 0x07, 0x98, 0xcb, 0x5c, 0xe7, 0x47, 0xcc, 0x65, 0xe0, + 0xcb, 0x00, 0x3e, 0x0e, 0xe6, 0xc0, 0x19, 0xd8, 0xff, 0x80, 0xbf, 0x60, 0x50, 0x4b, 0x37, 0x17, + 0xd1, 0x0b, 0x3d, 0x03, 0xf8, 0x24, 0xd6, 0x5b, 0xbe, 0xf7, 0xd5, 0x7b, 0xaf, 0x5e, 0x55, 0x0b, + 0xdc, 0x0a, 0xdc, 0xc0, 0xa5, 0x55, 0x9a, 0x73, 0x88, 0x47, 0x5b, 0x36, 0xa7, 0x2d, 0xe2, 0xf7, + 0xff, 0xce, 0x36, 0x3d, 0xc6, 0x19, 0xbc, 0xa6, 0xcd, 0xb2, 0x7d, 0xaa, 0xf5, 0xb5, 0x1a, 0x63, + 0xb5, 0x3a, 0xc9, 0x49, 0x93, 0xb3, 0xa0, 0x9a, 0xb3, 0xdd, 0xb6, 0xb2, 0x5f, 0x5f, 0xae, 0xb1, + 0x1a, 0x93, 0x3f, 0x73, 0xe2, 0x97, 0x96, 0x9a, 0xc3, 0x0e, 0x9c, 0x36, 0x88, 0xcf, 0xed, 0x46, + 0x53, 0x1b, 0x64, 0x2a, 0xcc, 0x6f, 0x30, 0x3f, 0x77, 0x66, 0xfb, 0x24, 0xd7, 0xba, 0x77, 0x46, + 0xb8, 0x7d, 0x2f, 0x57, 0x61, 0xd4, 0xd5, 0xfa, 0x35, 0xa5, 0xb7, 0x14, 0xb2, 0x5a, 0x28, 0x15, + 0xfa, 0x6f, 0x0c, 0xc4, 0x4a, 0xcc, 0xa7, 0x9c, 0x32, 0x17, 0x6e, 0x82, 0x49, 0xea, 0xa4, 0x8d, + 0x2d, 0x63, 0x3b, 0x9e, 0x9f, 0xef, 0x76, 0xcc, 0x78, 0xdb, 0x6e, 0xd4, 0x1f, 0x20, 0xea, 0x20, + 0x3c, 0x49, 0x1d, 0xf8, 0x14, 0xcc, 0x36, 0x6c, 0xef, 0x82, 0xf0, 0xf4, 0xe4, 0x96, 0xb1, 0x9d, + 0xd8, 0xd9, 0xc8, 0x8e, 0xd8, 0x5e, 0xf6, 0x40, 0x9a, 0xe4, 0x57, 0x5e, 0x75, 0xcc, 0x89, 0x6e, + 0xc7, 0x9c, 0x57, 0x18, 0xca, 0x11, 0x61, 0x8d, 0x00, 0xef, 0x82, 0x39, 0xdb, 0x71, 0x3c, 0xe2, + 0xfb, 0xe9, 0x29, 0x19, 0x0f, 0x76, 0x3b, 0xe6, 0x82, 0xb2, 0xd5, 0x0a, 0x84, 0x43, 0x13, 0x78, + 0x02, 0xe2, 0xac, 0x49, 0x5c, 0xe2, 0x58, 0x36, 0x4f, 0x4f, 0xcb, 0xe0, 0xeb, 0x59, 0x95, 0x95, + 0x6c, 0x98, 0x95, 0x6c, 0x39, 0xcc, 0x4a, 0xfe, 0x57, 0x3a, 0x76, 0x4a, 0xe1, 0x45, 0xae, 0xe8, + 0xc5, 0x0f, 0xa6, 0x81, 0x63, 0x6a, 0xbd, 0xcb, 0xe1, 0xef, 0xc1, 0xbc, 0xd6, 0x9d, 0x13, 0x5a, + 0x3b, 0xe7, 0xe9, 0x99, 0x2d, 0x63, 0x7b, 0x3a, 0x9f, 0xee, 0x76, 0xcc, 0xe5, 0x01, 0x57, 0xa5, + 0x46, 0x38, 0xa9, 0xd6, 0x7b, 0x72, 0x09, 0x7d, 0x90, 0xd2, 0x7a, 0x91, 0x78, 0xcb, 0xb3, 0x39, + 0x49, 0xcf, 0xca, 0xcd, 0x14, 0x05, 0x81, 0xef, 0x3b, 0xe6, 0xed, 0x1a, 0xe5, 0xe7, 0xc1, 0x59, + 0xb6, 0xc2, 0x1a, 0x3a, 0xed, 0xfa, 0xcf, 0xaf, 0x7d, 0xe7, 0x22, 0xc7, 0xdb, 0x4d, 0xe2, 0x67, + 0x1f, 0x93, 0x4a, 0xb7, 0x63, 0xae, 0x0e, 0xc4, 0x8b, 0xf0, 0x10, 0x5e, 0x50, 0xa2, 0xbc, 0xed, + 0x13, 0x6c, 0x73, 0x02, 0x5b, 0x60, 0x49, 0x1b, 0x3d, 0x0f, 0x18, 0xd7, 0x51, 0xe7, 0x64, 0xd4, + 0xa7, 0x63, 0x47, 0x4d, 0x0f, 0x44, 0xed, 0x01, 0x22, 0xbc, 0xa8, 0x64, 0xcf, 0x84, 0x48, 0xc6, + 0x25, 0x20, 0xe5, 0x91, 0x86, 0x4d, 0x5d, 0xea, 0xd6, 0xac, 0x86, 0xed, 0xd5, 0xa8, 0x9b, 0x8e, + 0xc9, 0x4a, 0xac, 0x65, 0x75, 0x47, 0x09, 0xd6, 0x59, 0xdd, 0x7e, 0xd9, 0x47, 0x8c, 0xba, 0x79, + 0x53, 0x17, 0x42, 0xef, 0x6e, 0x18, 0x00, 0xe1, 0xc5, 0x48, 0x74, 0x20, 0x25, 0xf0, 0x6f, 0x60, + 0xbe, 0x4e, 0x5a, 0x54, 0x94, 0xab, 0xc1, 0x02, 0x97, 0xa7, 0xe3, 0x1f, 0x8a, 0x11, 0x16, 0x5b, + 0x57, 0x6c, 0xc0, 0x1b, 0xe1, 0xa4, 0x5a, 0xef, 0xca, 0x25, 0x3c, 0x05, 0xd7, 0x07, 0xf4, 0x96, + 0x4b, 0x6a, 0xb2, 0x6d, 0xd3, 0x60, 0xcb, 0xd8, 0x8e, 0xe5, 0x6f, 0x74, 0x3b, 0xe6, 0xe6, 0x08, + 0x9c, 0xc8, 0x0e, 0xe1, 0xe5, 0x7e, 0xc0, 0x43, 0x2d, 0x86, 0x15, 0xb0, 0x50, 0xb7, 0x7d, 0x6e, + 0x85, 0x5e, 0x3c, 0x9d, 0xf8, 0x60, 0x97, 0xde, 0xd0, 0xc4, 0x57, 0x74, 0xc0, 0x01, 0x7f, 0xd5, + 0xaa, 0x49, 0x21, 0xdc, 0x57, 0x01, 0x39, 0xac, 0x80, 0xa5, 0xa6, 0x3e, 0xaa, 0x16, 0x75, 0x7d, + 0x6e, 0xbb, 0x15, 0x92, 0x4e, 0xca, 0x38, 0xcb, 0x57, 0xe2, 0xec, 0xba, 0xed, 0xfc, 0x96, 0x8e, + 0xa0, 0xcb, 0x7c, 0xc5, 0x19, 0xe1, 0x54, 0x28, 0x2b, 0x86, 0xa2, 0x6f, 0xa6, 0xc1, 0xe2, 0xb3, + 0x80, 0x78, 0x94, 0x38, 0xd1, 0x5c, 0xc0, 0x20, 0x16, 0xda, 0xc9, 0xe9, 0x90, 0xd8, 0xd9, 0x1c, + 0x79, 0xf4, 0x43, 0x87, 0xfc, 0xaa, 0x0e, 0xbc, 0x38, 0x18, 0x18, 0xe1, 0x08, 0x47, 0xf4, 0x53, + 0xcb, 0xae, 0x07, 0xb6, 0x24, 0xd4, 0xf4, 0x58, 0x95, 0x86, 0x63, 0xe5, 0xe3, 0xfb, 0x69, 0x18, + 0x00, 0xe1, 0xc5, 0x48, 0x54, 0x92, 0x12, 0xf8, 0x2f, 0x03, 0x5c, 0x1f, 0x6e, 0x3b, 0x4b, 0x18, + 0x11, 0x3d, 0x77, 0x8e, 0xc6, 0x3e, 0x34, 0x9b, 0xa3, 0x9b, 0x59, 0xa1, 0x22, 0xbc, 0x3c, 0xd4, + 0xd2, 0x7f, 0x16, 0x62, 0xb1, 0x5d, 0x52, 0xad, 0x92, 0x8a, 0x48, 0x54, 0x78, 0x7c, 0xa6, 0xc7, + 0xdc, 0xee, 0x30, 0x00, 0xc2, 0x8b, 0x91, 0x48, 0x1f, 0x9f, 0x7f, 0x1b, 0x60, 0x55, 0xd3, 0x11, + 0x24, 0x38, 0x71, 0x45, 0x51, 0xd5, 0x90, 0x98, 0x91, 0xfb, 0x2d, 0x8d, 0xbd, 0xdf, 0x4c, 0x34, + 0xc1, 0x47, 0xc1, 0x22, 0xbc, 0xa2, 0x34, 0x07, 0x3d, 0x85, 0x18, 0x18, 0xe8, 0x4b, 0x03, 0xcc, + 0x97, 0x18, 0xab, 0xef, 0xfa, 0x3e, 0xe1, 0x8f, 0x98, 0x5b, 0x85, 0xb7, 0xc1, 0x8c, 0x43, 0x5c, + 0xd6, 0xd0, 0x37, 0x4c, 0xaa, 0xdb, 0x31, 0x93, 0x0a, 0x5b, 0x8a, 0x11, 0x56, 0x6a, 0x78, 0x01, + 0xe6, 0xb9, 0xed, 0xd5, 0x08, 0xb7, 0x2e, 0xd5, 0x58, 0x9e, 0x94, 0xf6, 0x85, 0xb1, 0x99, 0xeb, + 0x91, 0x30, 0x00, 0x86, 0x70, 0x52, 0xad, 0x4f, 0xd5, 0xf2, 0x3f, 0x73, 0x00, 0x08, 0x9a, 0x25, + 0xdb, 0xb3, 0x1b, 0x3e, 0x7c, 0x00, 0x92, 0x6a, 0x0c, 0x72, 0x5a, 0xb9, 0x20, 0x9e, 0xa6, 0xba, + 0xda, 0xed, 0x98, 0xd7, 0x14, 0x58, 0xbf, 0x16, 0xe1, 0x84, 0x5c, 0x96, 0xe5, 0x0a, 0x06, 0x60, + 0x49, 0x0e, 0xee, 0x7a, 0x93, 0x5b, 0x0d, 0xea, 0x72, 0xab, 0x4a, 0x88, 0xe6, 0xfe, 0xc9, 0xa3, + 0xf9, 0x0a, 0x20, 0xc2, 0x0b, 0x42, 0xb6, 0xdf, 0xe4, 0x07, 0xd4, 0xe5, 0x05, 0x42, 0xe0, 0x3f, + 0xc1, 0xb5, 0xc8, 0xca, 0x23, 0x0e, 0x21, 0x0d, 0x19, 0x58, 0xb5, 0xf7, 0xfe, 0xd8, 0x81, 0xd7, + 0x87, 0x02, 0xf7, 0x20, 0x11, 0x4e, 0xe9, 0xd0, 0x58, 0xca, 0x44, 0xf0, 0xff, 0x19, 0x60, 0xe3, + 0x8c, 0x79, 0x1e, 0xbb, 0x14, 0x27, 0xa1, 0x4a, 0x54, 0x53, 0x58, 0x4d, 0xe2, 0x59, 0xe7, 0x2c, + 0xf0, 0x64, 0x8f, 0xc7, 0xf3, 0xe5, 0xb1, 0x59, 0x20, 0xcd, 0xe2, 0xdd, 0xd0, 0x08, 0xaf, 0x46, + 0xda, 0x02, 0x91, 0x3d, 0x57, 0x22, 0xde, 0x1e, 0x0b, 0x3c, 0xf8, 0x7f, 0x03, 0x64, 0x3c, 0xd2, + 0x64, 0x1e, 0xb7, 0xea, 0xf4, 0x79, 0x40, 0x1d, 0x35, 0x24, 0x3c, 0x72, 0x69, 0x7b, 0x4e, 0xff, + 0x61, 0x38, 0x1d, 0x9b, 0xd7, 0xad, 0xf0, 0xf0, 0xbf, 0x0f, 0x1d, 0xe1, 0x0d, 0x65, 0xb0, 0xdf, + 0xd3, 0x63, 0xa9, 0x96, 0x57, 0xe9, 0xcb, 0x3e, 0x7a, 0xa4, 0xd5, 0x16, 0x3b, 0xa2, 0xcc, 0x19, + 0xa0, 0x37, 0xfb, 0xcb, 0xd0, 0x1b, 0x8d, 0x8e, 0xf0, 0xba, 0xa6, 0x47, 0x5a, 0xed, 0x92, 0x54, + 0xf7, 0xb1, 0x6b, 0x83, 0x65, 0xbb, 0x52, 0x21, 0x4d, 0x2e, 0xee, 0x21, 0x71, 0x76, 0x7d, 0xab, + 0xc2, 0xdc, 0x6a, 0x7a, 0x6e, 0x6b, 0x6a, 0x3b, 0xb1, 0x83, 0xde, 0x31, 0xf8, 0xfb, 0xce, 0x79, + 0xfe, 0xa6, 0x1e, 0x5b, 0x1b, 0xfa, 0x39, 0x37, 0x02, 0x0d, 0x61, 0x18, 0x8a, 0xa5, 0x9f, 0x2f, + 0x1c, 0xd1, 0xb7, 0xd3, 0x6a, 0x64, 0xa8, 0x27, 0xe4, 0x23, 0xbb, 0xf9, 0xb3, 0x8e, 0x63, 0x19, + 0xcc, 0x70, 0xc6, 0xed, 0xba, 0x3e, 0x82, 0x7f, 0x18, 0x3b, 0x99, 0x7a, 0x38, 0x49, 0x10, 0x84, + 0x15, 0x18, 0xac, 0x02, 0x20, 0xf7, 0x61, 0x51, 0xb7, 0xca, 0xd2, 0x53, 0x32, 0x29, 0x77, 0xdf, + 0x99, 0x94, 0x68, 0x27, 0x59, 0xb9, 0xcd, 0xa2, 0x5b, 0x65, 0xf9, 0x35, 0x9d, 0x9e, 0x25, 0x9d, + 0x9e, 0x08, 0x0d, 0xe1, 0xb8, 0x1d, 0x5a, 0xad, 0x7f, 0x3d, 0x09, 0xe2, 0x91, 0xcf, 0x47, 0x8f, + 0xce, 0x53, 0x30, 0xab, 0xdf, 0x4d, 0x6a, 0xd3, 0x0f, 0xc7, 0xd8, 0x74, 0xd1, 0xe5, 0xbd, 0xf7, + 0x7a, 0xf8, 0x7e, 0xd2, 0x70, 0x22, 0x99, 0x4d, 0x8f, 0x56, 0xc2, 0xb1, 0xf2, 0xc9, 0xc9, 0x94, + 0x20, 0x08, 0x2b, 0x30, 0xf8, 0x77, 0x10, 0xf3, 0x88, 0x4f, 0xbc, 0x16, 0x71, 0xf4, 0xa4, 0xd8, + 0x1d, 0x9b, 0xf0, 0x62, 0xd8, 0xf2, 0x0a, 0x07, 0xe1, 0x08, 0x12, 0x5d, 0x82, 0x59, 0x55, 0x00, + 0xf8, 0x1b, 0x00, 0xe4, 0x40, 0xeb, 0x4f, 0xe2, 0x4a, 0xaf, 0x06, 0x3d, 0x1d, 0xc2, 0x71, 0xb1, + 0x78, 0x2c, 0xb3, 0xf9, 0x5b, 0xa0, 0x1a, 0x4a, 0xbb, 0xa9, 0x94, 0x5e, 0xef, 0x76, 0x4c, 0xd8, + 0xdf, 0x7c, 0xda, 0x0f, 0xc8, 0x95, 0x74, 0x44, 0x5f, 0x19, 0x60, 0x0e, 0x2b, 0x16, 0xf0, 0x2f, + 0x20, 0xa1, 0xbe, 0x79, 0x2c, 0xc1, 0x5a, 0xc6, 0x5e, 0xd8, 0x31, 0xdf, 0xf3, 0xe9, 0x54, 0x6e, + 0x37, 0x49, 0x7f, 0x94, 0x3e, 0x6f, 0x84, 0x41, 0x23, 0xb2, 0x81, 0x7b, 0x03, 0xc5, 0x7e, 0xef, + 0x4b, 0x62, 0xe8, 0x6b, 0x6c, 0xa8, 0xba, 0xe8, 0x21, 0x58, 0x79, 0xd2, 0x22, 0x2e, 0x2f, 0x89, + 0xaa, 0x14, 0xfd, 0x43, 0x26, 0x2e, 0x16, 0x87, 0x38, 0xa2, 0xef, 0x64, 0x4b, 0x5e, 0xed, 0x3b, + 0x29, 0x46, 0x58, 0xa9, 0xd1, 0x4b, 0x03, 0x98, 0x0a, 0x81, 0x78, 0x4d, 0xc2, 0x03, 0xbb, 0x5e, + 0x08, 0x78, 0xe0, 0x11, 0xbf, 0xec, 0xd9, 0x8e, 0x1a, 0xd0, 0xf0, 0x21, 0x98, 0x12, 0xf7, 0x92, + 0xf1, 0x21, 0xae, 0x50, 0x73, 0x05, 0x2a, 0x90, 0xbc, 0x78, 0x84, 0xa7, 0x28, 0x47, 0xef, 0x09, + 0xeb, 0x5c, 0x2d, 0x47, 0x9f, 0x12, 0x61, 0x10, 0xbd, 0x6c, 0x1d, 0xf1, 0x14, 0xd9, 0x1e, 0xc9, + 0xae, 0xd8, 0xb0, 0x6b, 0xd4, 0xb5, 0xbd, 0x76, 0x21, 0x70, 0x3f, 0x3f, 0xcd, 0x2f, 0x0c, 0x70, + 0x73, 0x24, 0xcd, 0xbe, 0x6b, 0xe4, 0xb3, 0x32, 0xbc, 0xf3, 0x3b, 0x90, 0x0c, 0xdf, 0xf8, 0xb2, + 0x03, 0x97, 0x41, 0xaa, 0x74, 0x74, 0x5c, 0x2c, 0x17, 0x8f, 0x0e, 0xad, 0x93, 0xc3, 0x3f, 0x1d, + 0x1e, 0x9d, 0x1e, 0xa6, 0x26, 0x60, 0x0c, 0x4c, 0xef, 0x1f, 0x1d, 0xfe, 0x31, 0x65, 0xc0, 0x38, + 0x98, 0x39, 0xde, 0x3b, 0xc2, 0xe5, 0xd4, 0xe4, 0x9d, 0xfb, 0x00, 0xf4, 0xda, 0x1b, 0x26, 0xc0, + 0x5c, 0xcf, 0x3e, 0x01, 0xe6, 0x0a, 0x27, 0xe5, 0x13, 0xfc, 0xe4, 0x38, 0x65, 0x88, 0xc5, 0x51, + 0x49, 0x00, 0x1e, 0xa7, 0x26, 0xf3, 0x85, 0x57, 0x6f, 0x32, 0xc6, 0xeb, 0x37, 0x19, 0xe3, 0xc7, + 0x37, 0x19, 0xe3, 0xc5, 0xdb, 0xcc, 0xc4, 0xeb, 0xb7, 0x99, 0x89, 0xef, 0xde, 0x66, 0x26, 0xfe, + 0x7a, 0xb7, 0x6f, 0x3e, 0x9c, 0xb8, 0x27, 0x2e, 0x2d, 0xd0, 0x5c, 0xe5, 0xdc, 0xa6, 0x6e, 0xee, + 0x1f, 0x03, 0xff, 0x93, 0x91, 0x93, 0xe2, 0x6c, 0x56, 0x7e, 0x16, 0xdd, 0xff, 0x29, 0x00, 0x00, + 0xff, 0xff, 0xcb, 0x6e, 0x9f, 0x01, 0xb7, 0x11, 0x00, 0x00, } func (m *Position) Marshal() (dAtA []byte, err error) { @@ -909,7 +929,7 @@ func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintDerivatives(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x62 n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastLeviedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastLeviedAt):]) if err2 != nil { return 0, err2 @@ -917,6 +937,26 @@ func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n2 i = encodeVarintDerivatives(dAtA, i, uint64(n2)) i-- + dAtA[i] = 0x5a + if m.LeviedAmountNegative { + i-- + if m.LeviedAmountNegative { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + { + size, err := m.LeviedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDerivatives(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x4a { size, err := m.RemainingMargin.MarshalToSizedBuffer(dAtA[:i]) @@ -953,12 +993,12 @@ func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.OpenedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.OpenedAt):]) - if err4 != nil { - return 0, err4 + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.OpenedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.OpenedAt):]) + if err5 != nil { + return 0, err5 } - i -= n4 - i = encodeVarintDerivatives(dAtA, i, uint64(n4)) + i -= n5 + i = encodeVarintDerivatives(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x22 if len(m.Address) > 0 { @@ -1572,6 +1612,11 @@ func (m *Position) Size() (n int) { n += 1 + l + sovDerivatives(uint64(l)) l = m.RemainingMargin.Size() n += 1 + l + sovDerivatives(uint64(l)) + l = m.LeviedAmount.Size() + n += 1 + l + sovDerivatives(uint64(l)) + if m.LeviedAmountNegative { + n += 2 + } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastLeviedAt) n += 1 + l + sovDerivatives(uint64(l)) l = m.PositionInstance.Size() @@ -2057,6 +2102,59 @@ func (m *Position) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDerivatives + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDerivatives + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDerivatives + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeviedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmountNegative", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDerivatives + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LeviedAmountNegative = bool(v != 0) + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastLeviedAt", wireType) } @@ -2089,7 +2187,7 @@ func (m *Position) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PositionInstance", wireType) } diff --git a/x/derivatives/types/perpetual_futures.pb.go b/x/derivatives/types/perpetual_futures.pb.go index 739401fbe..0c510782a 100644 --- a/x/derivatives/types/perpetual_futures.pb.go +++ b/x/derivatives/types/perpetual_futures.pb.go @@ -86,16 +86,18 @@ func (m *PerpetualFuturesParams) GetMaxLeverage() uint32 { } type PerpetualFuturesPosition struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - Market Market `protobuf:"bytes,2,opt,name=market,proto3" json:"market" yaml:"market"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - OpenedAt time.Time `protobuf:"bytes,4,opt,name=opened_at,json=openedAt,proto3,stdtime" json:"opened_at" yaml:"opened_at"` - OpenedHeight uint64 `protobuf:"varint,5,opt,name=opened_height,json=openedHeight,proto3" json:"opened_height,omitempty" yaml:"opened_height"` - OpenedBaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=opened_base_rate,json=openedBaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_base_rate" yaml:"opened_base_rate"` - OpenedQuoteRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=opened_quote_rate,json=openedQuoteRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_quote_rate" yaml:"opened_quote_rate"` - RemainingMargin types.Coin `protobuf:"bytes,8,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin" yaml:"remaining_margin"` - LastLeviedAt time.Time `protobuf:"bytes,9,opt,name=last_levied_at,json=lastLeviedAt,proto3,stdtime" json:"last_levied_at" yaml:"last_levied_at"` - PositionInstance PerpetualFuturesPositionInstance `protobuf:"bytes,10,opt,name=position_instance,json=positionInstance,proto3" json:"position_instance" yaml:"position_instance"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Market Market `protobuf:"bytes,2,opt,name=market,proto3" json:"market" yaml:"market"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + OpenedAt time.Time `protobuf:"bytes,4,opt,name=opened_at,json=openedAt,proto3,stdtime" json:"opened_at" yaml:"opened_at"` + OpenedHeight uint64 `protobuf:"varint,5,opt,name=opened_height,json=openedHeight,proto3" json:"opened_height,omitempty" yaml:"opened_height"` + OpenedBaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=opened_base_rate,json=openedBaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_base_rate" yaml:"opened_base_rate"` + OpenedQuoteRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=opened_quote_rate,json=openedQuoteRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"opened_quote_rate" yaml:"opened_quote_rate"` + RemainingMargin types.Coin `protobuf:"bytes,8,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin" yaml:"remaining_margin"` + LeviedAmount types.Coin `protobuf:"bytes,9,opt,name=levied_amount,json=leviedAmount,proto3" json:"levied_amount" yaml:"levied_amount"` + LeviedAmountNegative bool `protobuf:"varint,10,opt,name=levied_amount_negative,json=leviedAmountNegative,proto3" json:"levied_amount_negative,omitempty" yaml:"levied_amount_negative"` + LastLeviedAt time.Time `protobuf:"bytes,11,opt,name=last_levied_at,json=lastLeviedAt,proto3,stdtime" json:"last_levied_at" yaml:"last_levied_at"` + PositionInstance PerpetualFuturesPositionInstance `protobuf:"bytes,12,opt,name=position_instance,json=positionInstance,proto3" json:"position_instance" yaml:"position_instance"` } func (m *PerpetualFuturesPosition) Reset() { *m = PerpetualFuturesPosition{} } @@ -173,6 +175,20 @@ func (m *PerpetualFuturesPosition) GetRemainingMargin() types.Coin { return types.Coin{} } +func (m *PerpetualFuturesPosition) GetLeviedAmount() types.Coin { + if m != nil { + return m.LeviedAmount + } + return types.Coin{} +} + +func (m *PerpetualFuturesPosition) GetLeviedAmountNegative() bool { + if m != nil { + return m.LeviedAmountNegative + } + return false +} + func (m *PerpetualFuturesPosition) GetLastLeviedAt() time.Time { if m != nil { return m.LastLeviedAt @@ -348,8 +364,8 @@ func (m *EventPerpetualFuturesPositionOpened) GetPositionId() string { type EventPerpetualFuturesPositionClosed struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` PositionId string `protobuf:"bytes,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - FeeAmount string `protobuf:"bytes,3,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount,omitempty"` - TradeAmount string `protobuf:"bytes,4,opt,name=trade_amount,json=tradeAmount,proto3" json:"trade_amount,omitempty"` + PositionSize string `protobuf:"bytes,3,opt,name=position_size,json=positionSize,proto3" json:"position_size,omitempty"` + PnlAmount string `protobuf:"bytes,4,opt,name=pnl_amount,json=pnlAmount,proto3" json:"pnl_amount,omitempty"` ReturningAmount string `protobuf:"bytes,5,opt,name=returning_amount,json=returningAmount,proto3" json:"returning_amount,omitempty"` } @@ -400,16 +416,16 @@ func (m *EventPerpetualFuturesPositionClosed) GetPositionId() string { return "" } -func (m *EventPerpetualFuturesPositionClosed) GetFeeAmount() string { +func (m *EventPerpetualFuturesPositionClosed) GetPositionSize() string { if m != nil { - return m.FeeAmount + return m.PositionSize } return "" } -func (m *EventPerpetualFuturesPositionClosed) GetTradeAmount() string { +func (m *EventPerpetualFuturesPositionClosed) GetPnlAmount() string { if m != nil { - return m.TradeAmount + return m.PnlAmount } return "" } @@ -426,6 +442,7 @@ type EventPerpetualFuturesPositionLiquidated struct { PositionId string `protobuf:"bytes,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` RemainingMargin string `protobuf:"bytes,3,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin,omitempty"` RewardAmount string `protobuf:"bytes,4,opt,name=reward_amount,json=rewardAmount,proto3" json:"reward_amount,omitempty"` + LeviedAmount string `protobuf:"bytes,5,opt,name=levied_amount,json=leviedAmount,proto3" json:"levied_amount,omitempty"` } func (m *EventPerpetualFuturesPositionLiquidated) Reset() { @@ -491,11 +508,19 @@ func (m *EventPerpetualFuturesPositionLiquidated) GetRewardAmount() string { return "" } +func (m *EventPerpetualFuturesPositionLiquidated) GetLeviedAmount() string { + if m != nil { + return m.LeviedAmount + } + return "" +} + type EventPerpetualFuturesPositionLevied struct { RewardRecipient string `protobuf:"bytes,1,opt,name=reward_recipient,json=rewardRecipient,proto3" json:"reward_recipient,omitempty"` PositionId string `protobuf:"bytes,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` RemainingMargin string `protobuf:"bytes,3,opt,name=remaining_margin,json=remainingMargin,proto3" json:"remaining_margin,omitempty"` RewardAmount string `protobuf:"bytes,4,opt,name=reward_amount,json=rewardAmount,proto3" json:"reward_amount,omitempty"` + LeviedAmount string `protobuf:"bytes,5,opt,name=levied_amount,json=leviedAmount,proto3" json:"levied_amount,omitempty"` } func (m *EventPerpetualFuturesPositionLevied) Reset() { *m = EventPerpetualFuturesPositionLevied{} } @@ -559,6 +584,13 @@ func (m *EventPerpetualFuturesPositionLevied) GetRewardAmount() string { return "" } +func (m *EventPerpetualFuturesPositionLevied) GetLeviedAmount() string { + if m != nil { + return m.LeviedAmount + } + return "" +} + type EventLossToLP struct { PositionId string `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` LossAmount string `protobuf:"bytes,2,opt,name=loss_amount,json=lossAmount,proto3" json:"loss_amount,omitempty"` @@ -628,81 +660,85 @@ func init() { } var fileDescriptor_7a8566c220d595b9 = []byte{ - // 1178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0xdb, 0xc6, - 0x13, 0x35, 0x65, 0xc5, 0x8e, 0x57, 0x92, 0xed, 0x30, 0x89, 0xad, 0x38, 0xbf, 0x88, 0xf6, 0x06, - 0xc9, 0xcf, 0x41, 0x52, 0x12, 0x49, 0x91, 0x4b, 0x80, 0x1c, 0x2c, 0x27, 0x6e, 0x1c, 0xd8, 0x88, - 0xcd, 0xda, 0x40, 0xd1, 0x43, 0xd9, 0xb5, 0xb8, 0x92, 0x17, 0x11, 0x77, 0x69, 0xee, 0x52, 0xb5, - 0x73, 0xee, 0x21, 0xbd, 0xe5, 0x13, 0xf4, 0xbb, 0xf4, 0x50, 0x20, 0x40, 0x51, 0x20, 0xc7, 0xa2, - 0x07, 0xb5, 0xb0, 0xcf, 0xbd, 0xe8, 0xd0, 0x73, 0xc1, 0xdd, 0x25, 0xf5, 0xc7, 0x72, 0x04, 0x21, - 0x3d, 0xf4, 0x24, 0x72, 0xf6, 0xcd, 0x7b, 0x33, 0xb3, 0x33, 0x43, 0x81, 0xfb, 0x31, 0x8d, 0x29, - 0xa9, 0x13, 0xc7, 0xc7, 0x11, 0x69, 0x21, 0x41, 0x5a, 0x98, 0x3b, 0x21, 0x8e, 0x42, 0x2c, 0x62, - 0xd4, 0xf4, 0xea, 0xb1, 0x88, 0x23, 0xcc, 0xed, 0x30, 0x62, 0x82, 0x99, 0x57, 0x35, 0xd8, 0xee, - 0x01, 0x2f, 0xdd, 0x68, 0x30, 0xd6, 0x68, 0x62, 0x47, 0x42, 0x0e, 0xe2, 0xba, 0x83, 0xe8, 0x89, - 0xc2, 0x2f, 0x5d, 0x6b, 0xb0, 0x06, 0x93, 0x8f, 0x4e, 0xf2, 0xa4, 0xad, 0xd6, 0xa0, 0x83, 0x20, - 0x01, 0xe6, 0x02, 0x05, 0xa1, 0x06, 0x54, 0x6a, 0x8c, 0x07, 0x8c, 0x3b, 0x07, 0x88, 0x63, 0xa7, - 0xf5, 0xf0, 0x00, 0x0b, 0xf4, 0xd0, 0xa9, 0x31, 0x42, 0xf5, 0xf9, 0x9d, 0x61, 0x31, 0xf7, 0x3c, - 0x2b, 0x18, 0xfc, 0x2b, 0x0f, 0x16, 0x76, 0xd2, 0x4c, 0x36, 0x54, 0x22, 0x3b, 0x28, 0x42, 0x01, - 0x37, 0x8f, 0xc0, 0x5c, 0x8d, 0x05, 0x01, 0xe1, 0x9c, 0x30, 0xea, 0x45, 0x48, 0xe0, 0xb2, 0xb1, - 0x6c, 0xac, 0xce, 0x54, 0x5f, 0xbc, 0x6f, 0x5b, 0x13, 0xbf, 0xb7, 0xad, 0xbb, 0x0d, 0x22, 0x0e, - 0xe3, 0x03, 0xbb, 0xc6, 0x02, 0x47, 0x47, 0xa3, 0x7e, 0x3e, 0xe3, 0xfe, 0x6b, 0x47, 0x9c, 0x84, - 0x98, 0xdb, 0xcf, 0x70, 0xad, 0xd3, 0xb6, 0x16, 0x4e, 0x50, 0xd0, 0x7c, 0x02, 0x07, 0xe8, 0xa0, - 0x3b, 0xdb, 0xb5, 0xb8, 0x48, 0x60, 0xf3, 0xad, 0x01, 0x16, 0x03, 0x14, 0x35, 0x08, 0xf5, 0x02, - 0x44, 0xa8, 0xc0, 0x14, 0xd1, 0x1a, 0x56, 0xda, 0x39, 0xa9, 0xbd, 0x33, 0xb6, 0x76, 0x45, 0x69, - 0x5f, 0x40, 0x0b, 0xdd, 0xeb, 0xea, 0x64, 0xbb, 0x7b, 0x20, 0x43, 0xf9, 0xd5, 0x00, 0x0e, 0x09, - 0x50, 0x83, 0x50, 0x14, 0x9d, 0x78, 0xf5, 0x98, 0xfa, 0x84, 0x36, 0xa4, 0x8b, 0x17, 0x46, 0x2c, - 0x64, 0x91, 0x20, 0x8c, 0xa2, 0xa6, 0x57, 0x63, 0xb8, 0x5e, 0x27, 0x35, 0x82, 0xa9, 0x28, 0x4f, - 0xca, 0x10, 0x1b, 0x63, 0x87, 0xf8, 0x58, 0x85, 0xf8, 0x71, 0xb9, 0x41, 0x35, 0xe8, 0xde, 0xcf, - 0x1c, 0x36, 0x14, 0x3e, 0x09, 0x7c, 0xa7, 0x27, 0xb8, 0xf5, 0x2e, 0xda, 0xdc, 0x04, 0xd3, 0x01, - 0x8a, 0x5e, 0x63, 0xc1, 0xcb, 0xf9, 0xe5, 0xc9, 0xd5, 0xc2, 0xa3, 0x9b, 0xf6, 0x90, 0x46, 0xb5, - 0xb7, 0x25, 0xa6, 0x6a, 0x76, 0xda, 0xd6, 0x6c, 0x56, 0xb8, 0xc4, 0x0b, 0xba, 0xa9, 0xbf, 0xf9, - 0x04, 0x14, 0x03, 0x74, 0xec, 0x35, 0x71, 0x0b, 0x47, 0xa8, 0x81, 0xcb, 0x97, 0x96, 0x8d, 0xd5, - 0x52, 0x75, 0xb1, 0xd3, 0xb6, 0xae, 0xa6, 0x2e, 0xdd, 0x53, 0xe8, 0x16, 0x02, 0x74, 0xbc, 0x95, - 0xbe, 0xfd, 0x30, 0x0d, 0xca, 0xe7, 0xfa, 0x8d, 0x71, 0x92, 0x04, 0x6c, 0xde, 0x02, 0x39, 0xe2, - 0xeb, 0x26, 0x2b, 0x75, 0xda, 0xd6, 0x8c, 0xae, 0x8b, 0x0f, 0xdd, 0x1c, 0xf1, 0xcd, 0x97, 0x60, - 0x4a, 0x85, 0x20, 0x7b, 0x61, 0x44, 0x06, 0xd7, 0x93, 0x5b, 0xe8, 0xb4, 0xad, 0x52, 0x6f, 0x16, - 0xd0, 0xd5, 0x0c, 0xe6, 0x03, 0x30, 0x8d, 0x7c, 0x3f, 0xc2, 0x9c, 0xeb, 0x5b, 0xeb, 0xc9, 0x58, - 0x1f, 0x40, 0x37, 0x85, 0x98, 0xfb, 0x60, 0x86, 0x85, 0x98, 0x62, 0xdf, 0x43, 0xa2, 0x9c, 0x97, - 0xe2, 0x4b, 0xb6, 0x9a, 0x50, 0x3b, 0x9d, 0x50, 0x7b, 0x2f, 0x9d, 0xd0, 0xea, 0xff, 0xb4, 0xf6, - 0xbc, 0xe2, 0xcb, 0x5c, 0xe1, 0xbb, 0x3f, 0x2c, 0xc3, 0xbd, 0xac, 0xde, 0xd7, 0x84, 0xf9, 0x14, - 0x94, 0xf4, 0xd9, 0x21, 0x26, 0x8d, 0x43, 0x21, 0x2b, 0x99, 0xaf, 0x96, 0x3b, 0x6d, 0xeb, 0x5a, - 0x9f, 0xab, 0x3a, 0x86, 0x6e, 0x51, 0xbd, 0xbf, 0x90, 0xaf, 0x26, 0x07, 0xf3, 0xfa, 0x3c, 0x59, - 0x02, 0x6a, 0x4a, 0xa6, 0x64, 0x32, 0x9b, 0x63, 0xb7, 0xe0, 0x62, 0x9f, 0x5e, 0xc6, 0x07, 0xdd, - 0x59, 0x65, 0xaa, 0x22, 0xae, 0xe6, 0xa2, 0x05, 0xae, 0x68, 0xd0, 0x51, 0xcc, 0x84, 0x56, 0x9d, - 0x96, 0xaa, 0x2f, 0xc7, 0x56, 0x2d, 0xf7, 0xa9, 0x76, 0x09, 0xa1, 0x3b, 0xa7, 0x6c, 0xbb, 0x89, - 0x49, 0xea, 0x62, 0x30, 0x1f, 0xe1, 0x64, 0x7a, 0x93, 0xb9, 0x50, 0x23, 0x5b, 0xbe, 0x2c, 0x6f, - 0xe2, 0x86, 0xad, 0xd8, 0xed, 0x24, 0x6a, 0x5b, 0xaf, 0x42, 0x7b, 0x9d, 0x11, 0x5a, 0xb5, 0xf4, - 0x45, 0xe8, 0xec, 0x06, 0x09, 0xa0, 0x3b, 0x97, 0x99, 0xb6, 0xa5, 0xc5, 0xac, 0x81, 0xd9, 0x26, - 0xe2, 0x22, 0x69, 0x5f, 0xa2, 0xae, 0x7b, 0x66, 0xe4, 0x75, 0xaf, 0x68, 0x95, 0xeb, 0x4a, 0xa5, - 0xdf, 0x5f, 0xdd, 0x79, 0x31, 0x31, 0x6e, 0x49, 0xdb, 0x9a, 0x30, 0xbf, 0x37, 0xc0, 0x95, 0x50, - 0x37, 0xbd, 0x47, 0x28, 0x17, 0xc9, 0xd6, 0x29, 0x03, 0x29, 0xf4, 0x78, 0x68, 0x53, 0x5f, 0x34, - 0x32, 0x9b, 0xda, 0xb9, 0xba, 0xac, 0x63, 0xd0, 0x15, 0x3d, 0xc7, 0x0e, 0xdd, 0xf9, 0x70, 0xc0, - 0x07, 0xbe, 0xcd, 0x81, 0xe5, 0x51, 0xc4, 0xe6, 0xb7, 0xa0, 0x94, 0x91, 0x25, 0x57, 0x27, 0xc7, - 0x73, 0xf6, 0xd1, 0xca, 0xf0, 0x30, 0x35, 0x72, 0xef, 0x24, 0xc4, 0xbd, 0x6d, 0xdc, 0xc7, 0x00, - 0xdd, 0x62, 0xd8, 0x83, 0x33, 0x77, 0x41, 0x9e, 0x93, 0x37, 0xe9, 0x82, 0x7f, 0x3a, 0x76, 0x13, - 0x15, 0x94, 0x46, 0xc2, 0x01, 0x5d, 0x49, 0x65, 0x3a, 0xe0, 0x72, 0xb6, 0x9d, 0x26, 0xe5, 0x76, - 0xba, 0xda, 0x69, 0x5b, 0x73, 0xfa, 0x7e, 0xb2, 0xcd, 0x94, 0x81, 0xe0, 0xdf, 0x39, 0x70, 0x67, - 0xb0, 0x14, 0x5f, 0x44, 0x8c, 0x67, 0xf5, 0x78, 0x55, 0x57, 0x7b, 0xa5, 0x67, 0x09, 0x19, 0x9f, - 0xbc, 0x84, 0xce, 0xd5, 0x36, 0xf7, 0x6f, 0xd7, 0xf6, 0x47, 0x03, 0x58, 0x19, 0x20, 0x29, 0x8d, - 0x47, 0xa8, 0xe7, 0x63, 0xca, 0x02, 0x0f, 0x1f, 0x87, 0x8c, 0x76, 0xbf, 0x5a, 0x5f, 0x8d, 0x51, - 0xf7, 0x4d, 0x2a, 0x3a, 0x6d, 0xeb, 0xee, 0x80, 0xfe, 0x70, 0x7a, 0xe8, 0xde, 0x4c, 0x11, 0x5f, - 0x92, 0x37, 0x78, 0x93, 0x3e, 0x4b, 0x8e, 0x9f, 0xa7, 0xa7, 0xdf, 0x80, 0xdb, 0xcf, 0x5b, 0x98, - 0x8a, 0x8b, 0xfa, 0xf0, 0x95, 0x5c, 0x03, 0xe6, 0x02, 0x98, 0xe2, 0x98, 0xfa, 0x38, 0x52, 0x5f, - 0x07, 0x57, 0xbf, 0x99, 0x16, 0x28, 0x74, 0x5b, 0xdd, 0x57, 0x2d, 0xe4, 0x82, 0xac, 0xd3, 0x7d, - 0xf8, 0x8b, 0x31, 0x42, 0x60, 0xbd, 0xc9, 0xf8, 0x27, 0x08, 0x98, 0xb7, 0x00, 0xa8, 0x63, 0xec, - 0xa1, 0x80, 0xc5, 0x69, 0x2d, 0xdd, 0x99, 0x3a, 0xc6, 0x6b, 0xd2, 0x60, 0xae, 0x80, 0xa2, 0x88, - 0x90, 0x9f, 0x01, 0xf2, 0x12, 0x50, 0x90, 0x36, 0x0d, 0xb9, 0x97, 0x6c, 0x36, 0x11, 0x47, 0x72, - 0x31, 0x69, 0xd8, 0x25, 0x09, 0x9b, 0xcb, 0xec, 0x0a, 0x0a, 0x7f, 0x36, 0xc0, 0xff, 0x3f, 0x9a, - 0xcd, 0x16, 0x39, 0x8a, 0x89, 0x8f, 0x04, 0xf6, 0x15, 0xed, 0x77, 0x28, 0xf2, 0xbd, 0x08, 0xd7, - 0x48, 0x28, 0xff, 0xa0, 0x18, 0x29, 0x6d, 0x62, 0x77, 0x53, 0xf3, 0xe8, 0x24, 0xef, 0x0d, 0x59, - 0xbe, 0x93, 0x29, 0x57, 0xff, 0x02, 0xbd, 0x0d, 0x4a, 0x5a, 0xb6, 0x2f, 0xe3, 0xa2, 0x32, 0xea, - 0x3c, 0x7e, 0x1a, 0x75, 0x2b, 0x6a, 0x55, 0xfe, 0xa7, 0x73, 0xd8, 0x05, 0x25, 0x99, 0xc2, 0x16, - 0xe3, 0x7c, 0x8f, 0x6d, 0xed, 0x0c, 0x46, 0x60, 0x9c, 0x8b, 0xc0, 0x02, 0x85, 0x26, 0xe3, 0x3c, - 0x25, 0xd5, 0x21, 0x26, 0x26, 0x45, 0x59, 0xdd, 0x78, 0x7f, 0x5a, 0x31, 0x3e, 0x9c, 0x56, 0x8c, - 0x3f, 0x4f, 0x2b, 0xc6, 0xbb, 0xb3, 0xca, 0xc4, 0x87, 0xb3, 0xca, 0xc4, 0x6f, 0x67, 0x95, 0x89, - 0xaf, 0x1f, 0xf4, 0x4c, 0xe5, 0x3e, 0xdd, 0xa7, 0x64, 0x83, 0x38, 0xb5, 0x43, 0x44, 0xa8, 0x73, - 0xdc, 0xf7, 0x07, 0x5f, 0xce, 0xe7, 0xc1, 0x94, 0xfc, 0x48, 0x7d, 0xfe, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xd5, 0x54, 0xdb, 0x76, 0xb8, 0x0c, 0x00, 0x00, + // 1242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x13, 0x47, + 0x14, 0xce, 0x3a, 0x26, 0x24, 0x63, 0x3b, 0x09, 0x0b, 0x84, 0x05, 0x8a, 0xd7, 0x4c, 0x04, 0x0d, + 0x82, 0xee, 0x0a, 0x2a, 0x2e, 0x48, 0x1c, 0x30, 0x90, 0x12, 0x14, 0x4a, 0xd8, 0x82, 0x5a, 0x55, + 0x55, 0xb7, 0x13, 0xef, 0x78, 0x33, 0xc2, 0x3b, 0xb3, 0xec, 0xcc, 0xba, 0x09, 0xe7, 0x1e, 0x38, + 0xf2, 0x17, 0xf4, 0x6f, 0xe9, 0x91, 0x0b, 0x12, 0xc7, 0xaa, 0x07, 0xb7, 0x02, 0xa9, 0x87, 0x4a, + 0xbd, 0xf8, 0xd0, 0x73, 0xb5, 0x33, 0xb3, 0xeb, 0x1f, 0x31, 0x58, 0x16, 0xbd, 0xf4, 0x94, 0x9d, + 0x37, 0xdf, 0xfb, 0xbe, 0xf7, 0x66, 0xde, 0x7b, 0x13, 0x83, 0xcb, 0x29, 0x4d, 0x29, 0x69, 0x13, + 0x37, 0xc0, 0x09, 0xe9, 0x22, 0x41, 0xba, 0x98, 0xbb, 0x31, 0x4e, 0x62, 0x2c, 0x52, 0xd4, 0xf1, + 0xdb, 0xa9, 0x48, 0x13, 0xcc, 0x9d, 0x38, 0x61, 0x82, 0x99, 0xc7, 0x35, 0xd8, 0x19, 0x02, 0x9f, + 0x39, 0x1d, 0x32, 0x16, 0x76, 0xb0, 0x2b, 0x21, 0xbb, 0x69, 0xdb, 0x45, 0xf4, 0x40, 0xe1, 0xcf, + 0x9c, 0x08, 0x59, 0xc8, 0xe4, 0xa7, 0x9b, 0x7d, 0x69, 0xab, 0x3d, 0xee, 0x20, 0x48, 0x84, 0xb9, + 0x40, 0x51, 0xac, 0x01, 0xf5, 0x16, 0xe3, 0x11, 0xe3, 0xee, 0x2e, 0xe2, 0xd8, 0xed, 0x5e, 0xdd, + 0xc5, 0x02, 0x5d, 0x75, 0x5b, 0x8c, 0x50, 0xbd, 0x7f, 0x61, 0x52, 0xcc, 0x43, 0xdf, 0x0a, 0x06, + 0xff, 0x2e, 0x83, 0xb5, 0x9d, 0x3c, 0x93, 0x4d, 0x95, 0xc8, 0x0e, 0x4a, 0x50, 0xc4, 0xcd, 0x67, + 0x60, 0xa5, 0xc5, 0xa2, 0x88, 0x70, 0x4e, 0x18, 0xf5, 0x13, 0x24, 0xb0, 0x65, 0x34, 0x8c, 0x8d, + 0xa5, 0xe6, 0xbd, 0x57, 0x3d, 0x7b, 0xee, 0xb7, 0x9e, 0x7d, 0x31, 0x24, 0x62, 0x2f, 0xdd, 0x75, + 0x5a, 0x2c, 0x72, 0x75, 0x34, 0xea, 0xcf, 0x67, 0x3c, 0x78, 0xea, 0x8a, 0x83, 0x18, 0x73, 0xe7, + 0x0e, 0x6e, 0xf5, 0x7b, 0xf6, 0xda, 0x01, 0x8a, 0x3a, 0x37, 0xe0, 0x18, 0x1d, 0xf4, 0x96, 0x07, + 0x16, 0x0f, 0x09, 0x6c, 0xbe, 0x30, 0xc0, 0xa9, 0x08, 0x25, 0x21, 0xa1, 0x7e, 0x84, 0x08, 0x15, + 0x98, 0x22, 0xda, 0xc2, 0x4a, 0xbb, 0x24, 0xb5, 0x77, 0x66, 0xd6, 0xae, 0x2b, 0xed, 0xf7, 0xd0, + 0x42, 0xef, 0xa4, 0xda, 0x79, 0x30, 0xd8, 0x90, 0xa1, 0xbc, 0x36, 0x80, 0x4b, 0x22, 0x14, 0x12, + 0x8a, 0x92, 0x03, 0xbf, 0x9d, 0xd2, 0x80, 0xd0, 0x50, 0xba, 0xf8, 0x71, 0xc2, 0x62, 0x96, 0x08, + 0xc2, 0x28, 0xea, 0xf8, 0x2d, 0x86, 0xdb, 0x6d, 0xd2, 0x22, 0x98, 0x0a, 0x6b, 0x5e, 0x86, 0x18, + 0xce, 0x1c, 0xe2, 0x75, 0x15, 0xe2, 0x87, 0xe5, 0xc6, 0xd5, 0xa0, 0x77, 0xb9, 0x70, 0xd8, 0x54, + 0xf8, 0x2c, 0xf0, 0x9d, 0xa1, 0xe0, 0x6e, 0x0f, 0xd0, 0xe6, 0x16, 0x38, 0x1a, 0xa1, 0xe4, 0x29, + 0x16, 0xdc, 0x2a, 0x37, 0xe6, 0x37, 0x2a, 0xd7, 0xce, 0x3a, 0x13, 0x0a, 0xd5, 0x79, 0x20, 0x31, + 0x4d, 0xb3, 0xdf, 0xb3, 0x97, 0x8b, 0x83, 0xcb, 0xbc, 0xa0, 0x97, 0xfb, 0x9b, 0x37, 0x40, 0x35, + 0x42, 0xfb, 0x7e, 0x07, 0x77, 0x71, 0x82, 0x42, 0x6c, 0x1d, 0x69, 0x18, 0x1b, 0xb5, 0xe6, 0xa9, + 0x7e, 0xcf, 0x3e, 0x9e, 0xbb, 0x0c, 0x76, 0xa1, 0x57, 0x89, 0xd0, 0xfe, 0x76, 0xbe, 0xfa, 0x65, + 0x11, 0x58, 0x87, 0xea, 0x8d, 0x71, 0x92, 0x05, 0x6c, 0x9e, 0x03, 0x25, 0x12, 0xe8, 0x22, 0xab, + 0xf5, 0x7b, 0xf6, 0x92, 0x3e, 0x97, 0x00, 0x7a, 0x25, 0x12, 0x98, 0xf7, 0xc1, 0x82, 0x0a, 0x41, + 0xd6, 0xc2, 0x94, 0x0c, 0x4e, 0x66, 0xb7, 0xd0, 0xef, 0xd9, 0xb5, 0xe1, 0x2c, 0xa0, 0xa7, 0x19, + 0xcc, 0x2b, 0xe0, 0x28, 0x0a, 0x82, 0x04, 0x73, 0xae, 0x6f, 0x6d, 0x28, 0x63, 0xbd, 0x01, 0xbd, + 0x1c, 0x62, 0x3e, 0x01, 0x4b, 0x2c, 0xc6, 0x14, 0x07, 0x3e, 0x12, 0x56, 0x59, 0x8a, 0x9f, 0x71, + 0x54, 0x87, 0x3a, 0x79, 0x87, 0x3a, 0x8f, 0xf3, 0x0e, 0x6d, 0x7e, 0xa2, 0xb5, 0x57, 0x15, 0x5f, + 0xe1, 0x0a, 0x5f, 0xfe, 0x6e, 0x1b, 0xde, 0xa2, 0x5a, 0xdf, 0x12, 0xe6, 0x4d, 0x50, 0xd3, 0x7b, + 0x7b, 0x98, 0x84, 0x7b, 0x42, 0x9e, 0x64, 0xb9, 0x69, 0xf5, 0x7b, 0xf6, 0x89, 0x11, 0x57, 0xb5, + 0x0d, 0xbd, 0xaa, 0x5a, 0xdf, 0x93, 0x4b, 0x93, 0x83, 0x55, 0xbd, 0x9f, 0x0d, 0x01, 0xd5, 0x25, + 0x0b, 0x32, 0x99, 0xad, 0x99, 0x4b, 0xf0, 0xd4, 0x88, 0x5e, 0xc1, 0x07, 0xbd, 0x65, 0x65, 0x6a, + 0x22, 0xae, 0xfa, 0xa2, 0x0b, 0x8e, 0x69, 0xd0, 0xb3, 0x94, 0x09, 0xad, 0x7a, 0x54, 0xaa, 0xde, + 0x9f, 0x59, 0xd5, 0x1a, 0x51, 0x1d, 0x10, 0x42, 0x6f, 0x45, 0xd9, 0x1e, 0x65, 0x26, 0xa9, 0x8b, + 0xc1, 0x6a, 0x82, 0xb3, 0xee, 0xcd, 0xfa, 0x42, 0xb5, 0xac, 0xb5, 0x28, 0x6f, 0xe2, 0xb4, 0xa3, + 0xd8, 0x9d, 0x2c, 0x6a, 0x47, 0x8f, 0x42, 0xe7, 0x36, 0x23, 0xb4, 0x69, 0xeb, 0x8b, 0xd0, 0xd9, + 0x8d, 0x13, 0x40, 0x6f, 0xa5, 0x30, 0x3d, 0x90, 0x16, 0xf3, 0x3b, 0x50, 0xeb, 0xe0, 0x2e, 0xc9, + 0xae, 0x2b, 0x62, 0x29, 0x15, 0xd6, 0xd2, 0x34, 0x8d, 0xfc, 0xb2, 0xf5, 0x8d, 0x8d, 0x78, 0x43, + 0xaf, 0xaa, 0xd6, 0xb7, 0xe4, 0xd2, 0xfc, 0x1a, 0xac, 0x8d, 0xec, 0xfb, 0x14, 0x87, 0xb2, 0x6c, + 0x2d, 0xd0, 0x30, 0x36, 0x16, 0x9b, 0xe7, 0xfb, 0x3d, 0xfb, 0xdc, 0x04, 0x9e, 0x02, 0x07, 0xbd, + 0x13, 0xc3, 0x84, 0x5f, 0x6a, 0xb3, 0xd9, 0x02, 0xcb, 0x1d, 0xc4, 0x85, 0x9f, 0x7b, 0x09, 0xab, + 0x32, 0xb5, 0x4a, 0xcf, 0xeb, 0xc0, 0x4f, 0x6a, 0xc1, 0x11, 0x7f, 0x55, 0xaa, 0xd5, 0xcc, 0xb8, + 0xad, 0x04, 0x85, 0xf9, 0x93, 0x01, 0x8e, 0xc5, 0xba, 0x57, 0x7d, 0x42, 0xb9, 0xc8, 0x86, 0xa5, + 0x55, 0x95, 0x42, 0xd7, 0x27, 0xf6, 0xe2, 0xfb, 0x3a, 0x7d, 0x4b, 0x3b, 0x37, 0x1b, 0x3a, 0x06, + 0x5d, 0x08, 0x87, 0xd8, 0xa1, 0xb7, 0x1a, 0x8f, 0xf9, 0xc0, 0x17, 0x25, 0xd0, 0x98, 0x46, 0x6c, + 0xfe, 0x00, 0x6a, 0x05, 0x59, 0x56, 0x71, 0x72, 0xaa, 0x2c, 0x5f, 0x3b, 0x3f, 0x39, 0x4c, 0x8d, + 0x7c, 0x7c, 0x10, 0xe3, 0xe1, 0xee, 0x1b, 0x61, 0x80, 0x5e, 0x35, 0x1e, 0xc2, 0x99, 0x8f, 0x40, + 0x99, 0x93, 0xe7, 0xf9, 0xbb, 0x74, 0x73, 0xe6, 0xda, 0xaf, 0x28, 0x8d, 0x8c, 0x03, 0x7a, 0x92, + 0xca, 0x74, 0xc1, 0x62, 0x31, 0x54, 0xe7, 0xe5, 0x50, 0x3d, 0xde, 0xef, 0xd9, 0x2b, 0x45, 0x41, + 0xe8, 0x81, 0x5a, 0x80, 0xe0, 0x3f, 0x25, 0x70, 0x61, 0xfc, 0x28, 0xbe, 0x48, 0x18, 0x2f, 0xce, + 0xe3, 0x61, 0x5b, 0x8d, 0xc3, 0xa1, 0xd9, 0x69, 0x7c, 0xf4, 0xec, 0x3c, 0x74, 0xb6, 0xa5, 0xff, + 0xfa, 0x6c, 0x7f, 0x36, 0x80, 0x5d, 0x00, 0xb2, 0xa3, 0xf1, 0x09, 0xf5, 0x03, 0x4c, 0x59, 0xe4, + 0xe3, 0xfd, 0x98, 0xd1, 0xc1, 0x63, 0xfb, 0xcd, 0x0c, 0xe7, 0xbe, 0x45, 0x45, 0xbf, 0x67, 0x5f, + 0x1c, 0xd3, 0x9f, 0x4c, 0x0f, 0xbd, 0xb3, 0x39, 0xe2, 0x2b, 0xf2, 0x1c, 0x6f, 0xd1, 0x3b, 0xd9, + 0xf6, 0xdd, 0x7c, 0xf7, 0x7b, 0xb0, 0x7e, 0xb7, 0x8b, 0xa9, 0x78, 0x5f, 0x1d, 0x3e, 0x94, 0xd3, + 0xcb, 0x5c, 0x03, 0x0b, 0x1c, 0xd3, 0x00, 0x27, 0xea, 0x51, 0xf3, 0xf4, 0xca, 0xb4, 0x41, 0x65, + 0x50, 0xea, 0x81, 0x2a, 0x21, 0x0f, 0x14, 0x95, 0x1e, 0xc0, 0xd7, 0xc6, 0x14, 0x81, 0xdb, 0x1d, + 0xc6, 0x3f, 0x42, 0xc0, 0x5c, 0x1f, 0xba, 0x43, 0x59, 0xc6, 0xf2, 0x38, 0x07, 0xd7, 0x90, 0x25, + 0x6d, 0x9e, 0x03, 0x20, 0xa6, 0x9d, 0x7c, 0x12, 0x96, 0x25, 0x62, 0x29, 0xa6, 0x1d, 0x3d, 0xcd, + 0x2e, 0x65, 0x23, 0x59, 0xa4, 0x89, 0x9c, 0xa8, 0x1a, 0x74, 0x44, 0x82, 0x56, 0x0a, 0xbb, 0x82, + 0xc2, 0xbf, 0x0c, 0xf0, 0xe9, 0x07, 0xf3, 0xd9, 0x26, 0xcf, 0x52, 0x12, 0x20, 0x81, 0x03, 0x45, + 0xfb, 0x23, 0x4a, 0x02, 0x3f, 0xc1, 0x2d, 0x12, 0xcb, 0xff, 0xac, 0x8c, 0x9c, 0x36, 0xb3, 0x7b, + 0xb9, 0x79, 0x7a, 0x9a, 0x97, 0x26, 0xbc, 0x1a, 0xf3, 0x39, 0xd7, 0xe8, 0xe4, 0x5f, 0x07, 0x35, + 0x2d, 0x3b, 0x92, 0x6f, 0x55, 0x19, 0x75, 0xca, 0xeb, 0xe3, 0xcf, 0x83, 0xca, 0x77, 0x64, 0xca, + 0xc3, 0x3f, 0xa7, 0x5d, 0x9e, 0x9a, 0xa8, 0xff, 0xff, 0x44, 0x1f, 0x81, 0x9a, 0xcc, 0x73, 0x9b, + 0x71, 0xfe, 0x98, 0x6d, 0xef, 0x8c, 0x87, 0x69, 0x1c, 0x0a, 0xd3, 0x06, 0x95, 0x0e, 0xe3, 0x3c, + 0x27, 0xd5, 0x79, 0x64, 0x26, 0x45, 0xd9, 0xdc, 0x7c, 0xf5, 0xb6, 0x6e, 0xbc, 0x79, 0x5b, 0x37, + 0xfe, 0x78, 0x5b, 0x37, 0x5e, 0xbe, 0xab, 0xcf, 0xbd, 0x79, 0x57, 0x9f, 0xfb, 0xf5, 0x5d, 0x7d, + 0xee, 0xdb, 0x2b, 0x43, 0x1d, 0xfe, 0x84, 0x3e, 0xa1, 0x64, 0x93, 0xb8, 0xad, 0x3d, 0x44, 0xa8, + 0xbb, 0x3f, 0xf2, 0x1b, 0x47, 0xf6, 0xfa, 0xee, 0x82, 0x7c, 0xf0, 0x3e, 0xff, 0x37, 0x00, 0x00, + 0xff, 0xff, 0x1f, 0x95, 0x5a, 0x9f, 0xbb, 0x0d, 0x00, 0x00, } func (m *PerpetualFuturesParams) Marshal() (dAtA []byte, err error) { @@ -806,7 +842,7 @@ func (m *PerpetualFuturesPosition) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintPerpetualFutures(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x62 n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastLeviedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastLeviedAt):]) if err2 != nil { return 0, err2 @@ -814,6 +850,26 @@ func (m *PerpetualFuturesPosition) MarshalToSizedBuffer(dAtA []byte) (int, error i -= n2 i = encodeVarintPerpetualFutures(dAtA, i, uint64(n2)) i-- + dAtA[i] = 0x5a + if m.LeviedAmountNegative { + i-- + if m.LeviedAmountNegative { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + { + size, err := m.LeviedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPerpetualFutures(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x4a { size, err := m.RemainingMargin.MarshalToSizedBuffer(dAtA[:i]) @@ -850,12 +906,12 @@ func (m *PerpetualFuturesPosition) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x28 } - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.OpenedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.OpenedAt):]) - if err4 != nil { - return 0, err4 + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.OpenedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.OpenedAt):]) + if err5 != nil { + return 0, err5 } - i -= n4 - i = encodeVarintPerpetualFutures(dAtA, i, uint64(n4)) + i -= n5 + i = encodeVarintPerpetualFutures(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x22 if len(m.Address) > 0 { @@ -1040,17 +1096,17 @@ func (m *EventPerpetualFuturesPositionClosed) MarshalToSizedBuffer(dAtA []byte) i-- dAtA[i] = 0x2a } - if len(m.TradeAmount) > 0 { - i -= len(m.TradeAmount) - copy(dAtA[i:], m.TradeAmount) - i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.TradeAmount))) + if len(m.PnlAmount) > 0 { + i -= len(m.PnlAmount) + copy(dAtA[i:], m.PnlAmount) + i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.PnlAmount))) i-- dAtA[i] = 0x22 } - if len(m.FeeAmount) > 0 { - i -= len(m.FeeAmount) - copy(dAtA[i:], m.FeeAmount) - i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.FeeAmount))) + if len(m.PositionSize) > 0 { + i -= len(m.PositionSize) + copy(dAtA[i:], m.PositionSize) + i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.PositionSize))) i-- dAtA[i] = 0x1a } @@ -1091,6 +1147,13 @@ func (m *EventPerpetualFuturesPositionLiquidated) MarshalToSizedBuffer(dAtA []by _ = i var l int _ = l + if len(m.LeviedAmount) > 0 { + i -= len(m.LeviedAmount) + copy(dAtA[i:], m.LeviedAmount) + i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.LeviedAmount))) + i-- + dAtA[i] = 0x2a + } if len(m.RewardAmount) > 0 { i -= len(m.RewardAmount) copy(dAtA[i:], m.RewardAmount) @@ -1142,6 +1205,13 @@ func (m *EventPerpetualFuturesPositionLevied) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l + if len(m.LeviedAmount) > 0 { + i -= len(m.LeviedAmount) + copy(dAtA[i:], m.LeviedAmount) + i = encodeVarintPerpetualFutures(dAtA, i, uint64(len(m.LeviedAmount))) + i-- + dAtA[i] = 0x2a + } if len(m.RewardAmount) > 0 { i -= len(m.RewardAmount) copy(dAtA[i:], m.RewardAmount) @@ -1272,6 +1342,11 @@ func (m *PerpetualFuturesPosition) Size() (n int) { n += 1 + l + sovPerpetualFutures(uint64(l)) l = m.RemainingMargin.Size() n += 1 + l + sovPerpetualFutures(uint64(l)) + l = m.LeviedAmount.Size() + n += 1 + l + sovPerpetualFutures(uint64(l)) + if m.LeviedAmountNegative { + n += 2 + } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastLeviedAt) n += 1 + l + sovPerpetualFutures(uint64(l)) l = m.PositionInstance.Size() @@ -1343,11 +1418,11 @@ func (m *EventPerpetualFuturesPositionClosed) Size() (n int) { if l > 0 { n += 1 + l + sovPerpetualFutures(uint64(l)) } - l = len(m.FeeAmount) + l = len(m.PositionSize) if l > 0 { n += 1 + l + sovPerpetualFutures(uint64(l)) } - l = len(m.TradeAmount) + l = len(m.PnlAmount) if l > 0 { n += 1 + l + sovPerpetualFutures(uint64(l)) } @@ -1380,6 +1455,10 @@ func (m *EventPerpetualFuturesPositionLiquidated) Size() (n int) { if l > 0 { n += 1 + l + sovPerpetualFutures(uint64(l)) } + l = len(m.LeviedAmount) + if l > 0 { + n += 1 + l + sovPerpetualFutures(uint64(l)) + } return n } @@ -1405,6 +1484,10 @@ func (m *EventPerpetualFuturesPositionLevied) Size() (n int) { if l > 0 { n += 1 + l + sovPerpetualFutures(uint64(l)) } + l = len(m.LeviedAmount) + if l > 0 { + n += 1 + l + sovPerpetualFutures(uint64(l)) + } return n } @@ -1916,6 +1999,59 @@ func (m *PerpetualFuturesPosition) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPerpetualFutures + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPerpetualFutures + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPerpetualFutures + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeviedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmountNegative", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPerpetualFutures + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LeviedAmountNegative = bool(v != 0) + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastLeviedAt", wireType) } @@ -1948,7 +2084,7 @@ func (m *PerpetualFuturesPosition) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PositionInstance", wireType) } @@ -2469,7 +2605,7 @@ func (m *EventPerpetualFuturesPositionClosed) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeAmount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PositionSize", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2497,11 +2633,11 @@ func (m *EventPerpetualFuturesPositionClosed) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FeeAmount = string(dAtA[iNdEx:postIndex]) + m.PositionSize = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeAmount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PnlAmount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2529,7 +2665,7 @@ func (m *EventPerpetualFuturesPositionClosed) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TradeAmount = string(dAtA[iNdEx:postIndex]) + m.PnlAmount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { @@ -2741,6 +2877,38 @@ func (m *EventPerpetualFuturesPositionLiquidated) Unmarshal(dAtA []byte) error { } m.RewardAmount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPerpetualFutures + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPerpetualFutures + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPerpetualFutures + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LeviedAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPerpetualFutures(dAtA[iNdEx:]) @@ -2919,6 +3087,38 @@ func (m *EventPerpetualFuturesPositionLevied) Unmarshal(dAtA []byte) error { } m.RewardAmount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeviedAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPerpetualFutures + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPerpetualFutures + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPerpetualFutures + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LeviedAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPerpetualFutures(dAtA[iNdEx:]) diff --git a/x/derivatives/types/positions.go b/x/derivatives/types/positions.go index 8fb7dd918..e4b140790 100644 --- a/x/derivatives/types/positions.go +++ b/x/derivatives/types/positions.go @@ -1,6 +1,6 @@ // InMetrics represents the profit/loss amount in the metrics asset of the market. // In the most cases, it means it's in "usd". -// And IMPORTANTLY, it means it's not calcualted in micro case. +// And IMPORTANTLY, it means it's not calculated in micro case. package types @@ -107,16 +107,18 @@ func (m Position) NeedLiquidation(MarginMaintenanceRate sdk.Dec, currentBaseMetr func NewPerpetualFuturesPosition(position Position, ins PerpetualFuturesPositionInstance) PerpetualFuturesPosition { return PerpetualFuturesPosition{ - Id: position.Id, - Market: position.Market, - Address: position.Address, - OpenedAt: position.OpenedAt, - OpenedBaseRate: position.OpenedBaseRate, - OpenedQuoteRate: position.OpenedQuoteRate, - OpenedHeight: position.OpenedHeight, - RemainingMargin: position.RemainingMargin, - LastLeviedAt: position.LastLeviedAt, - PositionInstance: ins, + Id: position.Id, + Market: position.Market, + Address: position.Address, + OpenedAt: position.OpenedAt, + OpenedBaseRate: position.OpenedBaseRate, + OpenedQuoteRate: position.OpenedQuoteRate, + OpenedHeight: position.OpenedHeight, + RemainingMargin: position.RemainingMargin, + LeviedAmount: position.LeviedAmount, + LeviedAmountNegative: position.LeviedAmountNegative, + LastLeviedAt: position.LastLeviedAt, + PositionInstance: ins, } } @@ -234,18 +236,18 @@ func (positionInstance PerpetualFuturesPositionInstance) MarginRequirement(curre } func (m PerpetualFuturesPosition) RequiredMarginInQuote(baseQuoteRate sdk.Dec) sdk.Int { - // 必要証拠金(quote単位) = 現在のbase/quoteレート * ポジションサイズ(base単位) ÷ レバレッジ + // Required Margin (in quote units) = Current base/quote rate * Position size (in base units) ÷ Leverage return m.PositionInstance.MarginRequirement(baseQuoteRate) } func (m PerpetualFuturesPosition) RequiredMarginInBase() sdk.Int { - // 必要証拠金(base単位) = ポジションサイズ(base単位) ÷ レバレッジ // レートでの変動なし + // Required Margin (in base units) = Position size (in base units) ÷ Leverage // No change in rate return m.PositionInstance.MarginRequirement(sdk.MustNewDecFromStr("1")) } func (m PerpetualFuturesPosition) RequiredMarginInMetrics(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 必要証拠金(USD単位) = 必要証拠金(quote単位) * 現在のquote/USDレート - // = 必要証拠金(base単位) * 現在のbase/USDレート + // Required Margin (in USD units) = Required Margin (in quote units) * Current quote/USD rate + // = Required Margin (in base units) * Current base/USD rate if m.RemainingMargin.Denom == m.Market.QuoteDenom { baseQuoteRate := baseMetricsRate.Amount.Amount.Quo(quoteMetricsRate.Amount.Amount) return sdk.NewDecFromInt(m.RequiredMarginInQuote(baseQuoteRate)).Mul(quoteMetricsRate.Amount.Amount) @@ -301,9 +303,9 @@ func (m PerpetualFuturesPosition) ProfitAndLoss(baseMetricsRate, quoteMetricsRat } func (m PerpetualFuturesPosition) ProfitAndLossInQuote(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 損益(quote単位) = (longなら*1,shortなら*-1) * (現在のbase/quoteレート - ポジション開設時base/quoteレート) * ポジションサイズ(base単位) + // Profit/Loss (in quote units) = (1 for long, -1 for short) * (Current base/quote rate - Base/quote rate at position opening) * Position size (in base units) baseQuoteRate := baseMetricsRate.Amount.Amount.Quo(quoteMetricsRate.Amount.Amount) - // FIXME: Don't use OneMillionInt derectly. issue #476 + // FIXME: Don't use OneMillionInt directly. issue #476 profitAndLoss := baseQuoteRate.Sub(m.OpenedPairRate()).Mul(sdk.NewDecFromInt(m.PositionInstance.SizeInDenomExponent(OneMillionInt))) if m.PositionInstance.PositionType == PositionType_LONG { return profitAndLoss @@ -313,19 +315,19 @@ func (m PerpetualFuturesPosition) ProfitAndLossInQuote(baseMetricsRate, quoteMet } func (m PerpetualFuturesPosition) ProfitAndLossInMetrics(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 損益(USD単位) = 損益(quote単位) * 現在のquote/USDレート + // Profit/Loss (in USD units) = Profit/Loss (in quote units) * Current quote/USD rate return m.ProfitAndLossInQuote(baseMetricsRate, quoteMetricsRate).Mul(quoteMetricsRate.Amount.Amount) } // position size takes 0 decimal although price takes 6 decimal (micro unit) func (m PerpetualFuturesPosition) MarginMaintenanceRate(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 証拠金維持率 = 有効証拠金(USD単位) ÷ 必要証拠金(USD単位) + // Maintenance Margin Ratio = Account Equity (in USD units) / Required Margin (in USD units) return m.EffectiveMarginInMetrics(baseMetricsRate, quoteMetricsRate).Quo(m.RequiredMarginInMetrics(baseMetricsRate, quoteMetricsRate)) } func (m PerpetualFuturesPosition) RemainingMarginInMetrics(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 残存証拠金(USD単位) = 残存証拠金(base単位) * 現在のbase/USDレート - // = 残存証拠金(quote単位) * 現在のquote/USDレート + // Remaining Margin (in USD units) = Remaining Margin (in base units) * Current base/USD rate + // = Remaining Margin (in quote units) * Current quote/USD rate remainingMarginAmountInDec := sdk.NewDecFromInt(m.RemainingMargin.Amount) if m.RemainingMargin.Denom == m.Market.BaseDenom { return remainingMarginAmountInDec.Mul(baseMetricsRate.Amount.Amount) @@ -337,9 +339,27 @@ func (m PerpetualFuturesPosition) RemainingMarginInMetrics(baseMetricsRate, quot } } +func (m PerpetualFuturesPosition) LeviedAmountInMetrics(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { + // Levy Fee (in USD units) = Levy Fee (in base units) * Current base/USD rate + // = Levy Fee (in quote units) * Current quote/USD rate + leviedAmountInDec := sdk.NewDecFromInt(m.LeviedAmount.Amount) + if m.LeviedAmount.Denom == m.Market.BaseDenom { + return leviedAmountInDec.Mul(baseMetricsRate.Amount.Amount) + } else if m.LeviedAmount.Denom == m.Market.QuoteDenom { + return leviedAmountInDec.Mul(quoteMetricsRate.Amount.Amount) + } else { + // not supported denom + return sdk.ZeroDec() + } +} + func (m PerpetualFuturesPosition) EffectiveMarginInMetrics(baseMetricsRate, quoteMetricsRate MetricsRateType) sdk.Dec { - // 有効証拠金(USD単位) = 残存証拠金(USD単位) + 損益(USD単位) - return m.RemainingMarginInMetrics(baseMetricsRate, quoteMetricsRate).Add(m.ProfitAndLossInMetrics(baseMetricsRate, quoteMetricsRate)) + // Effective Margin (in USD units) = Remaining Margin (in USD units) + Profit/Loss (in USD units) - Levy Fee (in USD units) + if m.LeviedAmountNegative { + return m.RemainingMarginInMetrics(baseMetricsRate, quoteMetricsRate).Add(m.ProfitAndLossInMetrics(baseMetricsRate, quoteMetricsRate)).Sub(m.LeviedAmountInMetrics(baseMetricsRate, quoteMetricsRate)) + } else { + return m.RemainingMarginInMetrics(baseMetricsRate, quoteMetricsRate).Add(m.ProfitAndLossInMetrics(baseMetricsRate, quoteMetricsRate)).Add(m.LeviedAmountInMetrics(baseMetricsRate, quoteMetricsRate)) + } } func NewMetricsRateType(unit string, denom string, amount sdk.Dec) MetricsRateType { diff --git a/x/pricefeed/keeper/params.go b/x/pricefeed/keeper/params.go index 0e8d3517f..b42df5ad7 100644 --- a/x/pricefeed/keeper/params.go +++ b/x/pricefeed/keeper/params.go @@ -28,7 +28,7 @@ func (k Keeper) GetTicker(ctx sdk.Context, denom string) (string, error) { if !exists { return "", sdkerrors.Wrap(types.ErrInternalDenomNotFound, denom) } - return metadata.Symbol, nil + return metadata.Base, nil } func (k Keeper) GetMarketId(ctx sdk.Context, lhsTicker string, rhsTicker string) string { diff --git a/x/pricefeed/types/msgs_test.go b/x/pricefeed/types/msgs_test.go index a4ce87952..8fc3de977 100644 --- a/x/pricefeed/types/msgs_test.go +++ b/x/pricefeed/types/msgs_test.go @@ -3,15 +3,15 @@ package types import ( "testing" - "github.com/stretchr/testify/require" - + tmtime "github.com/cometbft/cometbft/types/time" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" - tmtime "github.com/cometbft/cometbft/types/time" + "github.com/UnUniFi/chain/testutil/sample" ) -func TestMsgPlaceBid_ValidateBasic(t *testing.T) { - addr := "someName" +func TestMsgPostPrice_ValidateBasic(t *testing.T) { + addr := sample.AccAddress() price, _ := sdk.NewDecFromStr("0.3005") expiry := tmtime.Now() negativePrice, _ := sdk.NewDecFromStr("-3.05")