Documentation ¶
Index ¶
- type AuctionState
- type Engine
- func (e *Engine) CheckLiquidity(as AuctionState, t time.Time, currentStake *num.Uint, trades []*types.Trade, ...) bool
- func (e *Engine) SetMinDuration(d time.Duration)
- func (e *Engine) UpdateParameters(params *types.LiquidityMonitoringParameters)
- func (e *Engine) UpdateTargetStakeTriggerRatio(ctx context.Context, ratio num.Decimal)
- type TargetStakeCalculator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuctionState ¶
type AuctionState interface { IsOpeningAuction() bool IsLiquidityAuction() bool IsLiquidityExtension() bool StartLiquidityAuctionUnmetTarget(t time.Time, d *types.AuctionDuration) StartGovernanceSuspensionAuction(t time.Time) EndGovernanceSuspensionAuction() SetReadyToLeave() InAuction() bool ExtendAuctionLiquidityUnmetTarget(delta types.AuctionDuration) ExpiresAt() *time.Time }
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func NewMonitor(tsCalc TargetStakeCalculator, params *types.LiquidityMonitoringParameters) *Engine
func (*Engine) CheckLiquidity ¶
func (e *Engine) CheckLiquidity(as AuctionState, t time.Time, currentStake *num.Uint, trades []*types.Trade, rf types.RiskFactor, refPrice *num.Uint, _, _ uint64, persistent bool, ) bool
CheckLiquidity Starts or Ends a Liquidity auction given the current and target stakes along with best static bid and ask volumes. The constant c1 represents the netparam `MarketLiquidityTargetStakeTriggeringRatio`, "true" gets returned if non-persistent order should be rejected.
func (*Engine) SetMinDuration ¶
func (*Engine) UpdateParameters ¶
func (e *Engine) UpdateParameters(params *types.LiquidityMonitoringParameters)
Click to show internal directories.
Click to hide internal directories.