evm/polycat/poolinfo.go
2021-11-09 09:07:42 +04:00

14 lines
269 B
Go

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)
}