Documentation ¶
Index ¶
- type Config
- type Data
- type Parser
- func (p *Parser) Assets() map[string]*big.Int
- func (p *Parser) CalculateCurrentRates(asset string) (*Data, *big.Int, *big.Int)
- func (p *Parser) Config(asset string) *Config
- func (p *Parser) Data(asset string) *Data
- func (p *Parser) SetInfo(data *cell.Dictionary, config *cell.Dictionary) error
- func (p *Parser) UpdateCurrentRates(forward int64) *Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Oracle *big.Int Decimals *big.Int CollateralFactor *big.Int LiquidationThreshold *big.Int LiquidationBonus *big.Int BaseBorrowRate *big.Int BorrowRateSlopeLow *big.Int BorrowRateSlopeHigh *big.Int SupplyRateSlopeLow *big.Int SupplyRateSlopeHigh *big.Int TargetUtilization *big.Int OriginationFee *big.Int Dust *big.Int MaxTotalSupply *big.Int ReserveFactor *big.Int LiquidationReserveFactor *big.Int MinPrincipalForRewards *big.Int BaseTrackingSupplySpeed *big.Int BaseTrackingBorrowSpeed *big.Int }
Config represents the configuration for an asset
type Data ¶
type Data struct { SRate *big.Int BRate *big.Int TotalSupply *big.Int TotalBorrow *big.Int LastAccrual *big.Int Balance *big.Int TrackingSupplyIndex *big.Int TrackingBorrowIndex *big.Int AwaitedSupply *big.Int }
Data represents the structure of asset data
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) CalculateCurrentRates ¶
func (*Parser) SetInfo ¶
func (p *Parser) SetInfo(data *cell.Dictionary, config *cell.Dictionary) error
func (*Parser) UpdateCurrentRates ¶
Click to show internal directories.
Click to hide internal directories.