lend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LendPool

type LendPool struct {
	ProtocolBasic   *model.ProtocolBasic
	UnderlyingBasic *erc.ERC20Info
	PoolType        LendPoolType
	AToken          lendaavelike.AToken
	VToken          lendaavelike.VToken
	SToken          lendaavelike.SToken
	CToken          lendcompoundlike.CToken
	Params          LendPoolParams
}

func (*LendPool) Init

func (p *LendPool) Init(protocolBasic model.ProtocolBasic) error

Initialize the lend pool protocol basic and pool type.

func (*LendPool) UpdatePoolParams

func (p *LendPool) UpdatePoolParams(params LendPoolParams) error

Update the pool params. Not sure how to read these params from contracts.

func (*LendPool) UpdateTokensByAToken

func (p *LendPool) UpdateTokensByAToken(atoken string) error

Update pool tokens info by a token.

func (*LendPool) UpdateTokensByCToken

func (p *LendPool) UpdateTokensByCToken(ctoken string) error

Update pool tokens info by c token.

func (*LendPool) UpdateTokensBySToken

func (p *LendPool) UpdateTokensBySToken(stoken string) error

Update pool tokens info by s token.

func (*LendPool) UpdateTokensByUnderlying

func (p *LendPool) UpdateTokensByUnderlying(underlying string) error

Update pool tokens info by underlying token.

func (*LendPool) UpdateTokensByVToken

func (p *LendPool) UpdateTokensByVToken(vtoken string) error

Update pool tokens info by v token.

type LendPoolParams

type LendPoolParams struct {
	CollateralFactor   float64
	LiquidationLimit   float64
	LiquidationPenalty float64
	AllowBorrow        int
	AllowCollateral    int
}

type LendPoolType

type LendPoolType struct {
	IsAaveLike     bool
	IsCompoundLike bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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