Documentation
¶
Index ¶
- type LendingPool
- func (p *LendingPool) Init(protocolBasic model.ProtocolBasic) error
- func (p *LendingPool) UpdateTokensByAToken(atoken string) error
- func (p *LendingPool) UpdateTokensByCToken(ctoken string) error
- func (p *LendingPool) UpdateTokensBySToken(stoken string) error
- func (p *LendingPool) UpdateTokensByUnderlying(underlying string) error
- func (p *LendingPool) UpdateTokensByVToken(vtoken string) error
- type LendingPoolStatus
- type LendingPoolType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LendingPool ¶
type LendingPool struct {
ProtocolBasic *model.ProtocolBasic // Protocol basic info.
UnderlyingBasic *erc.ERC20Info // The underlying erc20 info.
PoolType LendingPoolType // Only support aave-like and compound-like.
AToken lendingtoken.AToken // AToken info, if the protocol is aave-like.
VToken lendingtoken.VToken // VToken info, if the protocol is aave-like.
SToken lendingtoken.SToken // SToken info, if the protocol is aave-like.
CToken lendingtoken.CToken // CToken info, if the protocol is compound-like.
Status LendingPoolStatus // Pool status.
}
func (*LendingPool) Init ¶
func (p *LendingPool) Init(protocolBasic model.ProtocolBasic) error
Initialize the lend pool protocol basic and pool type.
func (*LendingPool) UpdateTokensByAToken ¶
func (p *LendingPool) UpdateTokensByAToken(atoken string) error
Update pool tokens info by a token.
func (*LendingPool) UpdateTokensByCToken ¶
func (p *LendingPool) UpdateTokensByCToken(ctoken string) error
Update pool tokens info by c token.
func (*LendingPool) UpdateTokensBySToken ¶
func (p *LendingPool) UpdateTokensBySToken(stoken string) error
Update pool tokens info by s token.
func (*LendingPool) UpdateTokensByUnderlying ¶
func (p *LendingPool) UpdateTokensByUnderlying(underlying string) error
Update pool tokens info by underlying token.
func (*LendingPool) UpdateTokensByVToken ¶
func (p *LendingPool) UpdateTokensByVToken(vtoken string) error
Update pool tokens info by v token.
type LendingPoolStatus ¶
type LendingPoolStatus struct {
CollateralFactor float64 // The maximum of collateral factor.
LiquidationLimit float64 // Liquidation will occur when liquidation limit is reached.
LiquidationPenalty float64 // Penalty when liquidation occurs.
AllowBorrow bool //
AllowCollateral bool //
BorrowLimit float64 // The borrow limit of the pool.
SupplyLimit float64 // The supply limit of the pool.
SupplyCapacity float64 // SupplyCapacity = SupplyLimit - TotalSupply.
TotalSupply float64 // Total amount supplied into the pool.
TotalVBorrow float64 // Total variable amount borrowed from the pool.
TotalSBorrow float64 // Total stable amount borrowed from the pool.
TotalCBorrow float64 // Total (compound like) amount borrowed from the pool.
UtilizationRate float64 // = TotalBorrow / TotalSupply
EModeCategoryId int
EModeCollateralFactor float64
EModeLiquidationLimit float64
BorrowableInIsolation bool
}
type LendingPoolType ¶
Click to show internal directories.
Click to hide internal directories.