vault

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkewAntiderivative

func SkewAntiderivative(
	skewFactorPpm uint32,
	leverage *big.Rat,
) *big.Rat

SkewAntiderivative returns the antiderivative of skew given a vault's skew factor and leverage. skew_antiderivative = skew_factor * leverage^2 + skew_factor^2 * leverage^3 / 3

func SpreadPpm

func SpreadPpm(
	quotingParams *types.QuotingParams,
	marketParam *pricestypes.MarketParam,
) uint32

SpreadPpm returns the spread that a vault should quote at given its quoting params and corresponding market param. spread_ppm = max(spread_min_ppm, spread_buffer_ppm + min_price_change_ppm)

Types

This section is empty.

Jump to

Keyboard shortcuts

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