model

package
v0.0.0-...-09f7846 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	ID            uint32 `json:"id"`
	Base58        string `json:"base58"`
	Wif           string `json:"wif"`
	BalanceOnt    string `json:"balance_ont"`
	BalanceWing   string `json:"balance_wing"`
	StakingAmount int32  `json:"staking_amount"`
	StakingTime   int32  `json:"staking_time"`
}

type BorrowRateSupply

type BorrowRateSupply struct {
	gorm.Model
	MarketName            string `json:"market_name"`
	UserAddr              string `json:"user_addr"`
	MarketAddr            string `json:"market_addr"`
	BorrowRatePerBlock    string `json:"borrow_rate_per_block"`
	SupplyingRatePerBlock string `json:"supplying_borrow_rate_per_block"`
	UserUnderlyingAdd     string `json:"user_underlying_add"`
	TotalBorrowBefore     string `json:"total_borrow_before"`
	TotalBorrowAfter      string `json:"total_borrow_after"`
	ReserveFactor         string `json:"reserve_factor"`
	ReservesAdd           string `json:"reserves_add"`
	ExpReservesAdd        string `json:"exp_reserves_add"`
	TotalInterestAdd      string `json:"total_interest_add"`
	ExpTotalInterestAdd   string `json:"exp_total_interest_add"`
	ExpUserUnderlyingAdd  string `json:"exp_user_underlying_add"`
	UserSupply            string `json:"user_supply"`
	TotalSupply           string `json:"total_supply"`
	StartTime             uint32 `json:"start_time"`
	EndTime               uint32 `json:"end_time"`
	ErrRateTotalInterest  string `json:"err_rate_total_interest"`
	ErrRateReserves       string `json:"err_rate_reserves_interest"`
	ErrRateUser           string `json:"err_rate_user_interest"`
}

func NewBorrowRate

func NewBorrowRate(marketName string, userAddr string, marketAddr string, borrowRatePerBlock string, supplyingRatePerBlock string, userUnderlyingAdd string, totalBorrowBefore string, totalBorrowAfter string, reserveFactor string, reservesAdd string, expReservesAdd string, totalInterestAdd string, expTotalInterestAdd string, expUserUnderlyingAdd string, userSupply string, totalSupply string, startTime uint32, endTime uint32, errRateTotalInterest string, errRateReserves string, errRateUser string) *BorrowRateSupply

func NewBorrowRateSupply

func NewBorrowRateSupply(marketName string, userAddr string, marketAddr string, borrowRatePerBlock string, supplyingRatePerBlock string, userUnderlyingAdd string, totalBorrowBefore string, totalBorrowAfter string, reserveFactor string, reservesAdd string, expReservesAdd string, totalInterestAdd string, expTotalInterestAdd string, expUserUnderlyingAdd string, userSupply string, totalSupply string, startTime uint32, endTime uint32, errRateTotalInterest string, errRateReserves string, errRateUser string) *BorrowRateSupply

type IfBorrowRate

type IfBorrowRate struct {
	MarketName                 string
	UserAddr                   string
	BorrowAmount               uint64
	AccrueInterestTimeInterval uint64
	DayRatePrecision           uint64 // day for second
	InterestDay                uint64
	UserOscoreLevel            uint8
	RelUserRate                uint64
	ExpUserRate                uint64
	ErrRate                    float64
	gorm.Model
}

type PoolAddrees

type PoolAddrees struct {
	ID            uint32 `json:"id"`
	Base58        string `json:"base58"`
	Wif           string `json:"wif"`
	BalanceOnt    string `json:"balance_ont"`
	BalanceWing   string `json:"balance_wing"`
	StakingAmount int32  `json:"staking_amount"`
	StakingTime   int32  `json:"staking_time"`
}

type WingDisResultBorrow

type WingDisResultBorrow struct {
	gorm.Model
	MarketName       string `json:"market_name"`
	UserAddr         string `json:"user_addr"`
	MarketAddr       string `json:"market_addr"`
	TotalValidBorrow string `json:"total_valid_borrow"`
	UserValidBorrow  string `json:"user_valid_borrow"`
	WingSpeed        string `json:"wing_speed"`
	ExpRes           string `json:"exp_res"`
	RelRes           string `json:"rel_res"`
	StartTime        uint32 `json:"start_time"`
	EndTime          uint32 `json:"end_time"`
	ErrRate          string `json:"err_rate"`
}

func NewWingDisResultBorrow

func NewWingDisResultBorrow(market_name, user_addr, market_addr string, total_valid_borrow, user_valid_borrow, wing_speed, exp_res, rel_res *big.Int, start_time, end_time uint32, err_rate *big.Float) *WingDisResultBorrow

type WingDisResultSupply

type WingDisResultSupply struct {
	gorm.Model
	MarketName  string `json:"market_name"`
	UserAddr    string `json:"user_addr"`
	MarketAddr  string `json:"market_addr"`
	TotalSupply string `json:"total_supply"`
	UserSupply  string `json:"user_supply"`
	WingSpeed   string `json:"wing_speed"`
	ExpRes      string `json:"exp_res"`
	RelRes      string `json:"rel_res"`
	StartTime   uint32 `json:"start_time"`
	EndTime     uint32 `json:"end_time"`
	ErrRate     string `json:"err_rate"`
}

func NewWingDisResultSupply

func NewWingDisResultSupply(market_name, user_addr, market_addr string, total_valid_borrow, user_valid_borrow, wing_speed, exp_res, rel_res *big.Int, start_time, end_time uint32, err_rate *big.Float) *WingDisResultSupply

Jump to

Keyboard shortcuts

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