keeper

package
v1.0.0-rc0.0...-401c594 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func (k Keeper) CreateNewMarketRevShare(ctx sdk.Context, marketId uint32)

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 (k Keeper) GetMarketMapperRevenueShareForMarket(ctx sdk.Context, marketId uint32) (
	address sdk.AccAddress,
	revenueSharePpm uint32,
	err error,
)

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 (k Keeper) GetOrderRouterRevShare(ctx sdk.Context, orderRouterAddr string) (uint32, error)

func (Keeper) GetUnconditionalRevShareConfigParams

func (k Keeper) GetUnconditionalRevShareConfigParams(ctx sdk.Context) (types.UnconditionalRevShareConfig, error)

func (Keeper) HasAuthority

func (k Keeper) HasAuthority(authority string) bool

func (Keeper) InitializeForGenesis

func (k Keeper) InitializeForGenesis(ctx sdk.Context)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

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 (k Keeper) SetOrderRouterRevShare(ctx sdk.Context, orderRouterAddr string, revSharePpm uint32) error

func (Keeper) SetUnconditionalRevShareConfigParams

func (k Keeper) SetUnconditionalRevShareConfigParams(ctx sdk.Context, config types.UnconditionalRevShareConfig)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL