evm/polycat/poolinfo.go

14 lines
269 B
Go
Raw Normal View History

2021-11-09 05:07:42 +00:00
package polycat
import "github.com/shopspring/decimal"
type PoolInfo struct {
LpToken *CatPair
Balance decimal.Decimal
TotalDeposited decimal.Decimal
}
func (pi *PoolInfo) BalanceRatio() decimal.Decimal {
return pi.Balance.Div(pi.TotalDeposited)
}