package
0.2.1-a20230808192317-m1unchained
Repository: https://github.com/merlins-labs/merlin.git
Documentation: pkg.go.dev
# Functions
createRouteFromKey creates a route from a key.
createRouteKey creates a key for the given route.
DefaultGenesis returns the default genesis state.
DefaultParams returns a default set of parameters.
Returns the key needed to fetch info about base denoms.
Returns the key needed to fetch the pool id for a given denom.
Returns the key needed to fetch the developer fees by coin.
Returns the key needed to fetch the profit by coin.
Returns the key needed to fetch the profits by route.
Returns the key needed to fetch the tokenPair routes for a given pair of tokens.
Returns the key needed to fetch the number of trades by route.
No description provided by the author
---------------------- Interface for MsgSetBaseDenoms ---------------------- // NewMsgSetBaseDenoms creates a new MsgSetBaseDenoms instance.
---------------------- Interface for MsgSetDeveloperAccount ---------------------- // NewMsgSetDeveloperAccount creates a new MsgSetDeveloperAccount instance.
---------------------- Interface for MsgSetHotRoutes ---------------------- // NewMsgSetHotRoutes creates a new MsgSetHotRoutes instance.
---------------------- Interface for MsgSetMaxPoolPointsPerBlock ---------------------- // NewMsgSetMaxPoolPointsPerBlock creates a new MsgSetMaxPoolPointsPerBlock instance.
---------------------- Interface for MsgSetMaxPoolPointsPerTx ---------------------- // NewMsgSetMaxPoolPointsPerTx creates a new MsgSetMaxPoolPointsPerTx instance.
---------------------- Interface for MsgSetPoolWeights ---------------------- // NewMsgSetPoolWeights creates a new MsgSetPoolWeights instance.
NewParams creates a new Params instance.
No description provided by the author
No description provided by the author
---------------- Interface for SetProtoRevAdminAccountProposal ---------------- //.
---------------- Interface for SetProtoRevEnabledProposal ---------------- //.
Creates a new TokenPairArbRoutes object.
No description provided by the author
ParamKeyTable the param key table for launch module.
No description provided by the author
No description provided by the author
RegisterMsgHandler registers the http handlers for service Msg to "mux".
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux".
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
No description provided by the author
RegisterQueryHandler registers the http handlers for service Query to "mux".
RegisterQueryHandlerClient registers the http handlers for service Query to "mux".
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
No description provided by the author
No description provided by the author
ValidateBaseDenoms validates the base denoms that are used to generate highest liquidity routes.
No description provided by the author
---------------------- DeveloperFee Validation ---------------------- // ValidateDeveloperFees does some basic validation on the developer fees passed into the module genesis.
---------------------- Pool Point Validation ---------------------- // ValidateMaxPoolPointsPerBlock validates the max pool points per block.
ValidateMaxPoolPointsPerTx validates the max pool points per tx.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Max iterations for binary search (log2(131_072) = 17).
Max number of pool points that can be consumed per block (default of 100).
Max number of pool points that can be consumed per tx.
ModuleName defines the module name.
Year 1 (20% of total profit).
Year 2 (10% of total profit).
Year 1 (20% of total profit).
Year 2 (10% of total profit).
All other years (5% of total profit).
No description provided by the author
No description provided by the author
RouterKey defines the module's message routing key.
StoreKey defines the primary module store key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
Currently configured to be the Skip dev team's address See https://github.com/merlins-labs/merlin/issues/4349 for more details Note that governance has full ability to change this live on-chain, and this admin can at most prevent protorev from working.
Configure the initial base denoms used for cyclic route building.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Configuration of the default genesis state for the module.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExtendedMaxInputAmount is the upper bound index for finding the optimal in amount when determining route profitability for an arb that's above the default range (2 ^ 17) = 131,072.
KeyPrefixBaseDenoms is the prefix that is used to store the base denoms that are used to create cyclic arbitrage routes.
KeyPrefixDaysSinceGenesis is the prefix for store that keeps track of the number of days since genesis.
KeyPrefixDenomPairToPool is the prefix that is used to store the pool id for a given denom pair (baseDenom, otherDenom).
-------------- Keys for configuration/admin stores -------------- // KeyPrefixDeveloperAccount is the prefix for store that keeps track of the developer account.
KeyPrefixDeveloperFees is the prefix for store that keeps track of the developer fees.
KeyPrefixLatestBlockHeight is the prefix for store that keeps track of the latest recorded block height.
KeyPrefixMaxPointsPerBlock is the prefix for store that keeps track of the max number of pool points that can be consumed per block.
KeyPrefixMaxPointsPerTx is the prefix for store that keeps track of the max number of pool points that can be consumed per tx.
-------------- Keys for statistics stores -------------- // KeyPrefixNumberOfTrades is the prefix for the store that keeps track of the number of trades executed.
KeyPrefixPointCountForBlock is the prefix for store that keeps track of the number of pool points that have been consumed in the current block.
KeyPrefixPoolWeights is the prefix for store that keeps track of the weights for different pool types.
KeyPrefixProfitByDenom is the prefix for the store that keeps track of the profits.
KeyPrefixProfitsByRoute is the prefix for the store that keeps track of the profits made by route.
KeyPrefixSwapsToBackrun is the prefix for store that keeps track of the swaps that need to be backrun for a given tx.
-------------- Keys for trading stores -------------- // KeyPrefixTokenPairRoutes is the prefix for the TokenPairArbRoutes store.
KeyPrefixTradesByRoute is the prefix for the store that keeps track of the number of trades executed by route.
MaxInputAmount is the upper bound index for finding the optimal in amount when determining route profitability (2 ^ 14) = 16,384.
MerlinDenomination stores the native denom name for Merlin on chain used for route building.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
BaseDenom represents a single base denom that the module uses for its arbitrage trades.
GenesisState defines the protorev module's genesis state.
MsgSetBaseDenoms defines the Msg/SetBaseDenoms request type.
MsgSetBaseDenomsResponse defines the Msg/SetBaseDenoms response type.
MsgSetDeveloperAccount defines the Msg/SetDeveloperAccount request type.
MsgSetDeveloperAccountResponse defines the Msg/SetDeveloperAccount response type.
MsgSetHotRoutes defines the Msg/SetHotRoutes request type.
MsgSetHotRoutesResponse defines the Msg/SetHotRoutes response type.
MsgSetMaxPoolPointsPerBlock defines the Msg/SetMaxPoolPointsPerBlock request type.
MsgSetMaxPoolPointsPerBlockResponse defines the Msg/SetMaxPoolPointsPerBlock response type.
MsgSetMaxPoolPointsPerTx defines the Msg/SetMaxPoolPointsPerTx request type.
MsgSetMaxPoolPointsPerTxResponse defines the Msg/SetMaxPoolPointsPerTx response type.
MsgSetPoolWeights defines the Msg/SetPoolWeights request type.
MsgSetPoolWeightsResponse defines the Msg/SetPoolWeights response type.
Params defines the parameters for the module.
PoolWeights contains the weights of all of the different pool types.
QueryGetProtoRevAdminAccountRequest is request type for the Query/GetProtoRevAdminAccount RPC method.
QueryGetProtoRevAdminAccountResponse is response type for the Query/GetProtoRevAdminAccount RPC method.
QueryGetProtoRevAllProfitsRequest is request type for the Query/GetProtoRevAllProfits RPC method.
QueryGetProtoRevAllProfitsResponse is response type for the Query/GetProtoRevAllProfits RPC method.
QueryGetProtoRevAllRouteStatisticsRequest is request type for the Query/GetProtoRevAllRouteStatistics RPC method.
QueryGetProtoRevAllRouteStatisticsResponse is response type for the Query/GetProtoRevAllRouteStatistics RPC method.
QueryGetProtoRevBaseDenomsRequest is request type for the Query/GetProtoRevBaseDenoms RPC method.
QueryGetProtoRevBaseDenomsResponse is response type for the Query/GetProtoRevBaseDenoms RPC method.
QueryGetProtoRevDeveloperAccountRequest is request type for the Query/GetProtoRevDeveloperAccount RPC method.
QueryGetProtoRevDeveloperAccountResponse is response type for the Query/GetProtoRevDeveloperAccount RPC method.
QueryGetProtoRevEnabledRequest is request type for the Query/GetProtoRevEnabled RPC method.
QueryGetProtoRevEnabledResponse is response type for the Query/GetProtoRevEnabled RPC method.
QueryGetProtoRevMaxPoolPointsPerBlockRequest is request type for the Query/GetProtoRevMaxPoolPointsPerBlock RPC method.
QueryGetProtoRevMaxPoolPointsPerBlockResponse is response type for the Query/GetProtoRevMaxPoolPointsPerBlock RPC method.
QueryGetProtoRevMaxPoolPointsPerTxRequest is request type for the Query/GetProtoRevMaxPoolPointsPerTx RPC method.
QueryGetProtoRevMaxPoolPointsPerTxResponse is response type for the Query/GetProtoRevMaxPoolPointsPerTx RPC method.
QueryGetProtoRevNumberOfTradesRequest is request type for the Query/GetProtoRevNumberOfTrades RPC method.
QueryGetProtoRevNumberOfTradesResponse is response type for the Query/GetProtoRevNumberOfTrades RPC method.
QueryGetProtoRevPoolRequest is request type for the Query/GetProtoRevPool RPC method.
QueryGetProtoRevPoolResponse is response type for the Query/GetProtoRevPool RPC method.
QueryGetProtoRevPoolWeightsRequest is request type for the Query/GetProtoRevPoolWeights RPC method.
QueryGetProtoRevPoolWeightsResponse is response type for the Query/GetProtoRevPoolWeights RPC method.
QueryGetProtoRevProfitsByDenomRequest is request type for the Query/GetProtoRevProfitsByDenom RPC method.
QueryGetProtoRevProfitsByDenomResponse is response type for the Query/GetProtoRevProfitsByDenom RPC method.
QueryGetProtoRevStatisticsByPoolRequest is request type for the Query/GetProtoRevStatisticsByRoute RPC method.
QueryGetProtoRevStatisticsByRouteResponse is response type for the Query/GetProtoRevStatisticsByRoute RPC method.
QueryGetProtoRevTokenPairArbRoutesRequest is request type for the Query/GetProtoRevTokenPairArbRoutes RPC method.
QueryGetProtoRevTokenPairArbRoutesResponse is response type for the Query/GetProtoRevTokenPairArbRoutes RPC method.
QueryParamsRequest is request type for the Query/Params RPC method.
QueryParamsResponse is response type for the Query/Params RPC method.
Route is a hot route for a given pair of tokens.
RouteStatistics contains the number of trades the module has executed after a swap on a given route and the profits from the trades.
SetProtoRevAdminAccountProposal is a gov Content type to set the admin account that will receive permissions to alter hot routes and set the developer address that will be receiving a share of profits from the module.
SetProtoRevEnabledProposal is a gov Content type to update whether the protorev module is enabled.
TokenPairArbRoutes tracks all of the hot routes for a given pair of tokens.
Trade is a single trade in a route.
UnimplementedMsgServer can be embedded to have forward compatible implementations.
UnimplementedQueryServer can be embedded to have forward compatible implementations.
# Interfaces
AccountKeeper defines the account contract that must be fulfilled when creating a x/protorev keeper.
BankKeeper defines the banking contract that must be fulfilled when creating a x/protorev keeper.
EpochKeeper defines the Epoch contract that must be fulfilled when creating a x/protorev keeper.
GAMMKeeper defines the Gamm contract that must be fulfilled when creating a x/protorev keeper.
MsgClient is the client API for Msg service.
MsgServer is the server API for Msg service.
PoolManagerKeeper defines the PoolManager contract that must be fulfilled when creating a x/protorev keeper.
QueryClient is the client API for Query service.
QueryServer is the server API for Query service.