types

package
v0.0.0-...-3be5031 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviationPoint

type DeviationPoint struct {
	Point     time.Time       `json:"point"`
	Deviation decimal.Decimal `json:"deviation"`
}

type ETokenPricePoint

type ETokenPricePoint struct {
	Point       time.Time       `json:"point"`
	ETokenPrice decimal.Decimal `json:"eTokenPrice"`
}

type LiquidityPoint

type LiquidityPoint struct {
	Point           time.Time       `json:"point"`
	TokenALiquidity decimal.Decimal `json:"tokenALiquidity"`
	TokenBLiquidity decimal.Decimal `json:"tokenBLiquidity"`
}

type Pool

type Pool struct {
	PoolAddress string `json:"poolAddress"`
	PoolName    string `json:"poolName"`

	TokenA globalTypes.Token `json:"tokenA"`
	TokenB globalTypes.Token `json:"tokenB"`

	State PoolState `json:"state,omitempty"`
}

type PoolState

type PoolState struct {
	PoolLiquidity        decimal.Decimal `json:"poolLiquidity"`
	LastRebalance        int64           `json:"lastRebalance"`
	RebalancingInterval  int64           `json:"rebalancingInterval"`
	RebalancingCondition decimal.Decimal `json:"rebalancingCondition"`
	BlockNumber          int64           `json:"blockNumber"`
	BlockTimestamp       time.Time       `json:"blockTimestamp"`
}

type PriceTrendPoint

type PriceTrendPoint struct {
	Point       time.Time       `json:"point"`
	TokenAPrice decimal.Decimal `json:"tokenAPrice"`
	TokenBPrice decimal.Decimal `json:"tokenBPrice"`
}

type Tranche

type Tranche struct {
	PoolAddress string `json:"poolAddress,omitempty"`

	ETokenAddress string `json:"eTokenAddress,omitempty"`
	ETokenSymbol  string `json:"eTokenSymbol,omitempty"`

	SFactorE decimal.Decimal `json:"sFactorE,omitempty"`

	TargetRatio decimal.Decimal `json:"targetRatio,omitempty"`
	TokenARatio decimal.Decimal `json:"tokenARatio,omitempty"`
	TokenBRatio decimal.Decimal `json:"tokenBRatio,omitempty"`

	TokenA types.Token `json:"tokenA,omitempty"`
	TokenB types.Token `json:"tokenB,omitempty"`

	RebalancingInterval  int64  `json:"rebalancingInterval,omitempty"`
	RebalancingCondition string `json:"rebalancingCondition,omitempty"`

	State TrancheState `json:"state,omitempty"`
}

type TrancheState

type TrancheState struct {
	TokenALiquidity decimal.Decimal `json:"tokenALiquidity,omitempty"`
	TokenBLiquidity decimal.Decimal `json:"tokenBLiquidity,omitempty"`

	ETokenPrice decimal.Decimal `json:"eTokenPrice,omitempty"`

	CurrentRatio       decimal.Decimal `json:"currentRatio,omitempty"`
	TokenACurrentRatio decimal.Decimal `json:"tokenACurrentRatio,omitempty"`
	TokenBCurrentRatio decimal.Decimal `json:"tokenBCurrentRatio,omitempty"`

	LastRebalance int64 `json:"lastRebalance,omitempty"`

	BlockNumber    int64     `json:"blockNumber,omitempty"`
	BlockTimestamp time.Time `json:"blockTimestamp,omitempty"`
}

type Transaction

type Transaction struct {
	ETokenAddress   string            `json:"eTokenAddress"`
	AccountAddress  string            `json:"accountAddress"`
	TokenA          globalTypes.Token `json:"tokenA"`
	TokenB          globalTypes.Token `json:"tokenB"`
	AmountA         decimal.Decimal   `json:"amountA"`
	AmountB         decimal.Decimal   `json:"amountB"`
	AmountEToken    decimal.Decimal   `json:"amountEToken"`
	TransactionType string            `json:"transactionType"`
	TransactionHash string            `json:"transactionHash"`
	BlockTimestamp  int64             `json:"blockTimestamp"`
	BlockNumber     int64             `json:"blockNumber"`
	SFactorE        decimal.Decimal   `json:"sFactorE"`
	TokenAPrice     decimal.Decimal   `json:"tokenAPrice"`
	TokenBPrice     decimal.Decimal   `json:"tokenBPrice"`
	ETokenPrice     decimal.Decimal   `json:"eTokenPrice"`
	ETokenSymbol    string            `json:"eTokenSymbol"`
}

type UserPortfolioValuePoint

type UserPortfolioValuePoint struct {
	Point          time.Time       `json:"point"`
	PortfolioValue decimal.Decimal `json:"portfolioValueSE,omitempty"`
}

Jump to

Keyboard shortcuts

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