Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CreateNewMarketRevShare(ctx sdk.Context, marketId uint32)
- func (k Keeper) GetAllRevShares(ctx sdk.Context, fill clobtypes.FillForProcess, ...) (types.RevSharesForFill, error)
- func (k Keeper) GetMarketMapperRevShareDetails(ctx sdk.Context, marketId uint32) (params types.MarketMapperRevShareDetails, err error)
- func (k Keeper) GetMarketMapperRevenueShareForMarket(ctx sdk.Context, marketId uint32) (address sdk.AccAddress, revenueSharePpm uint32, err error)
- func (k Keeper) GetMarketMapperRevenueShareParams(ctx sdk.Context) (params types.MarketMapperRevenueShareParams)
- func (k Keeper) GetOrderRouterRevShare(ctx sdk.Context, orderRouterAddr string) (uint32, error)
- func (k Keeper) GetUnconditionalRevShareConfigParams(ctx sdk.Context) (types.UnconditionalRevShareConfig, error)
- func (k Keeper) HasAuthority(authority string) bool
- func (k Keeper) InitializeForGenesis(ctx sdk.Context)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MarketMapperRevShareDetails(ctx context.Context, req *types.QueryMarketMapperRevShareDetails) (*types.QueryMarketMapperRevShareDetailsResponse, error)
- func (k Keeper) MarketMapperRevenueShareParams(ctx context.Context, req *types.QueryMarketMapperRevenueShareParams) (*types.QueryMarketMapperRevenueShareParamsResponse, error)
- func (k Keeper) OrderRouterRevShare(ctx context.Context, req *types.QueryOrderRouterRevShare) (*types.QueryOrderRouterRevShareResponse, error)
- func (k Keeper) SetMarketMapperRevShareDetails(ctx sdk.Context, marketId uint32, params types.MarketMapperRevShareDetails)
- func (k Keeper) SetMarketMapperRevenueShareParams(ctx sdk.Context, params types.MarketMapperRevenueShareParams) (err error)
- func (k Keeper) SetOrderRouterRevShare(ctx sdk.Context, orderRouterAddr string, revSharePpm uint32) error
- func (k Keeper) SetUnconditionalRevShareConfigParams(ctx sdk.Context, config types.UnconditionalRevShareConfig)
- func (k Keeper) UnconditionalRevShareConfig(ctx context.Context, req *types.QueryUnconditionalRevShareConfig) (*types.QueryUnconditionalRevShareConfigResponse, error)
- func (k Keeper) ValidateRevShareSafety(ctx sdk.Context, unconditionalRevShareConfig types.UnconditionalRevShareConfig, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authorities []string, affiliatesKeeper affiliateskeeper.Keeper, feetiersKeeper feetierskeeper.Keeper, ) *Keeper
func (Keeper) CreateNewMarketRevShare ¶
Function to perform all market creation actions for the revshare module
func (Keeper) GetAllRevShares ¶
func (k Keeper) GetAllRevShares( ctx sdk.Context, fill clobtypes.FillForProcess, affiliatesWhitelistMap map[string]uint32, ) (types.RevSharesForFill, error)
func (Keeper) GetMarketMapperRevShareDetails ¶
func (k Keeper) GetMarketMapperRevShareDetails( ctx sdk.Context, marketId uint32, ) (params types.MarketMapperRevShareDetails, err error)
Function to retrieve marketmapper revshare details for a market from module store
func (Keeper) GetMarketMapperRevenueShareForMarket ¶
func (Keeper) GetMarketMapperRevenueShareParams ¶
func (k Keeper) GetMarketMapperRevenueShareParams( ctx sdk.Context, ) (params types.MarketMapperRevenueShareParams)
Function to get market mapper revenue share params from the module store
func (Keeper) GetOrderRouterRevShare ¶
func (Keeper) GetUnconditionalRevShareConfigParams ¶
func (Keeper) HasAuthority ¶
func (Keeper) InitializeForGenesis ¶
func (Keeper) MarketMapperRevShareDetails ¶
func (k Keeper) MarketMapperRevShareDetails( ctx context.Context, req *types.QueryMarketMapperRevShareDetails, ) (*types.QueryMarketMapperRevShareDetailsResponse, error)
func (Keeper) MarketMapperRevenueShareParams ¶
func (k Keeper) MarketMapperRevenueShareParams( ctx context.Context, req *types.QueryMarketMapperRevenueShareParams, ) (*types.QueryMarketMapperRevenueShareParamsResponse, error)
func (Keeper) OrderRouterRevShare ¶
func (k Keeper) OrderRouterRevShare( ctx context.Context, req *types.QueryOrderRouterRevShare, ) (*types.QueryOrderRouterRevShareResponse, error)
func (Keeper) SetMarketMapperRevShareDetails ¶
func (k Keeper) SetMarketMapperRevShareDetails( ctx sdk.Context, marketId uint32, params types.MarketMapperRevShareDetails, )
Function to serialize market mapper rev share details for a market and store in the module store
func (Keeper) SetMarketMapperRevenueShareParams ¶
func (k Keeper) SetMarketMapperRevenueShareParams( ctx sdk.Context, params types.MarketMapperRevenueShareParams, ) (err error)
Function to serialize market mapper revenue share params and store in the module store
func (Keeper) SetOrderRouterRevShare ¶
func (Keeper) SetUnconditionalRevShareConfigParams ¶
func (k Keeper) SetUnconditionalRevShareConfigParams(ctx sdk.Context, config types.UnconditionalRevShareConfig)
func (Keeper) UnconditionalRevShareConfig ¶
func (k Keeper) UnconditionalRevShareConfig( ctx context.Context, req *types.QueryUnconditionalRevShareConfig, ) (*types.QueryUnconditionalRevShareConfigResponse, error)
func (Keeper) ValidateRevShareSafety ¶
func (k Keeper) ValidateRevShareSafety( ctx sdk.Context, unconditionalRevShareConfig types.UnconditionalRevShareConfig, marketMapperRevShareParams types.MarketMapperRevenueShareParams, lowestTakerFeePpm int32, lowestMakerFeePpm int32, ) bool
Check two conditions to ensure rev shares are safe. 1. totalUnconditionalRevSharePpm + totalMarketMapperRevSharePpm < 100% 2. lowest_taker_fee + lowest_maker_fee >= Highest_affiliate_rev_share * lowest_taker_fee
Source Files
¶
- grpc_query.go
- grpc_query_marketmapper_revenue_params.go
- grpc_query_marketmapper_revshare_details.go
- grpc_query_order_router_revshare.go
- grpc_query_unconditional_revshare.go
- keeper.go
- msg_server.go
- msg_set_marketmapper_rev_share_details.go
- msg_set_marketmapper_revenue_share.go
- msg_set_order_router_rev_share.go
- msg_update_unconditional_revshare_config.go
- revshare.go