package
0.2.1-a20230808192317-m1unchained
Repository: https://github.com/merlins-labs/merlin.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AccumDiffDivDuration returns the accumulated difference divided by the the time delta, that is the spot price between the current and last TWAP record.
CanonicalTimeMs returns the canonical time in milliseconds used for twap math computations in UTC.
DefaultGenesis returns the default twap genesis state.
default twap module parameters.
No description provided by the author
No description provided by the author
No description provided by the author
TODO: Replace historical management with ORM, we currently accept 2x write amplification right now.
No description provided by the author
GetAllMostRecentTwapsForPool returns all of the most recent twap records for a pool id.
GetAllUniqueDenomPairs returns all unique pairs of denoms, where for every pair (X, Y), X < Y.
LexicographicalOrderDenoms takes two denoms and returns them to be in lexicographically ascending order.
NewGenesisState returns genesis state with the given parameters and twap records.
No description provided by the author
ParamTable for twap module.
No description provided by the author
SpotPriceMulDuration returns the spot price multiplied by the time delta, that is the spot price between the current and last TWAP record.
# Constants
Contract: Coin denoms cannot contain this character.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
this is silly we have to do this.
# Variables
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
format is pool id | denom1 | denom2 | time made for efficiently getting records given (pool id, denom1, denom2) and time bounds.
format is time | pool id | denom1 | denom2 made for efficiently deleting records by time in pruning.
Parameter store keys.
Parameter store keys.
No description provided by the author
# Structs
DenomPair contains pair of assetA and assetB denoms which belong to a pool.
No description provided by the author
GenesisState defines the twap module's genesis state.
No description provided by the author
No description provided by the author
No description provided by the author
Params holds parameters for the twap module.
No description provided by the author
No description provided by the author
A TWAP record should be indexed in state by pool_id, (asset pair), timestamp The asset pair assets should be lexicographically sorted.
No description provided by the author
# Interfaces
AmmInterface is the functionality needed from a given pool ID, in order to maintain records and serve TWAPs.