Documentation ¶
Index ¶
- Variables
- func BorrowRateCacl(account *goSdk.Account, marketName, configFlash, configIFPool string)
- func BorrowWithNewAddr(account *goSdk.Account, marketName, configFlash, configIfPool string, ...)
- func GetExpUserRate(interestDay, normal, grace, borrowAmount uint64, userRateLevel uint8) uint64
- 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 RepayBorrowAll(account *goSdk.Account, marketName, configFlash, configIfPool string)
- func Supply(account *goSdk.Account, marketName, configFlash, configIfPool string)
- type IFPool
- type UserRateDay
Constants ¶
This section is empty.
Variables ¶
View Source
var DayRatePrecision = uint64(1800)
View Source
var DecimalMap = map[string]uint64{
"DAI": 18,
"USDT": 8,
"USDC": 4,
}
View Source
var MarketAddrMap = map[string]string{
"DAI": "96cf88356123592835a2fa75068a242260be1791",
"USDT": "c6f91c11d740d39943b99a6b1c6fd2b5f476e2a3",
"USDC": "07a12c0a6bdce4df04ef4b2045d1b0fd63a56e25",
}
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)
足额借贷、根据leve的等级0-1 压1贷1.1、依次类推
func GetExpUserRate ¶
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 RepayBorrowAll ¶
Types ¶
type IFPool ¶
type UserRateDay ¶
Click to show internal directories.
Click to hide internal directories.