Documentation ¶
Index ¶
- Variables
- func BorrowRateCacl(account *goSdk.Account, marketName, configFlash, configIFPool string)
- func BorrowWithNewAddr(account *goSdk.Account, marketName, configFlash, configIfPool string, ...) string
- func GetExpUserRate(interestDay, normal, grace, borrowAmount uint64, userRateLevel uint8) uint64
- func GetGovPoolWeights(account *goSdk.Account, configFlash, configIfPool string) (*big.Int, *big.Int)
- func GetIfPool(account *goSdk.Account, marketName, configFlash, configIfPool string) (*IFPool, *IFPool)
- func GetIfTokenConfig(marketName string, cfg *if_config.IfConfig) *if_config.IfToken
- func Insurance(account *goSdk.Account, marketName, configFlash, configIfPool string)
- func Liquidate(liquidate, account *goSdk.Account, ...)
- func NewMarkets(cfg *config.Config, account *ontSDK.Account, sdk *ontSDK.OntologySdk, ...) (*ftoken.FlashToken, error)
- func RedeemAllInsurance(account *goSdk.Account, marketName, configFlash, configIfPool string)
- func RedeemAllSupply(account *goSdk.Account, marketName, configFlash, configIfPool string)
- func ReduceCollateralAll(account *goSdk.Account, marketName, configFlash, configIfPool string)
- func RepayBorrowAll(account *goSdk.Account, marketName, configFlash, configIfPool string) string
- func Supply(account *goSdk.Account, marketName, configFlash, configIfPool string)
- type AllPoolWeight
- type IFPool
- type PoolWeight
- type UserRateDay
Constants ¶
This section is empty.
Variables ¶
View Source
var DayRatePrecision = uint64(600)
View Source
var DecimalMap = map[string]uint64{
"DAI": 18,
"USDT": 6,
"USDC": 6,
}
View Source
var MarketAddrMap = map[string]string{
"DAI": "96cf88356123592835a2fa75068a242260be1791",
"USDT": "c6f91c11d740d39943b99a6b1c6fd2b5f476e2a3",
"USDC": "07a12c0a6bdce4df04ef4b2045d1b0fd63a56e25",
}
View Source
var MarketNames = map[int]string{
0: "DAI",
1: "USDT",
2: "USDC",
}
View Source
var OscLevelMap = map[uint8]uint64{
0: 5,
1: 5,
2: 4,
3: 3,
4: 8,
5: 10,
}
View Source
var RatePrecision = uint64(10000)
Functions ¶
func BorrowRateCacl ¶
func BorrowWithNewAddr ¶
func BorrowWithNewAddr(account *goSdk.Account, marketName, configFlash, configIfPool string, level uint64) string
足额借贷、根据leve的等级0-1 压1贷1.1、依次类推
func GetExpUserRate ¶
func GetGovPoolWeights ¶
func GetIfTokenConfig ¶
func NewMarkets ¶
func NewMarkets(cfg *config.Config, account *ontSDK.Account, sdk *ontSDK.OntologySdk, makretAddr string) (*ftoken.FlashToken, error)
func RedeemAllInsurance ¶
func RedeemAllSupply ¶
func ReduceCollateralAll ¶
func RepayBorrowAll ¶
Types ¶
type AllPoolWeight ¶
type AllPoolWeight struct { FlashPoolWeights PoolWeight IFPoolWeights PoolWeight }
func GetPoolWeights ¶
func GetPoolWeights(account *goSdk.Account, configFlash, configIfPool string) *AllPoolWeight
type IFPool ¶
type UserRateDay ¶
Click to show internal directories.
Click to hide internal directories.