Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions solana/spl/programs/meteora_dbc/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (p Pool) GetMigrationProgress(migrationQuoteThreshold uint64) float64 {
quotient := new(big.Rat).SetFrac(quoteReserve, migrationQuoteThresholdBig)
progress, _ := quotient.Float64()

return progress
return math.Min(progress, 1.0)
}

func (p Pool) GetQuotePrice(tokenBaseDecimals int, tokenQuoteDecimals int) float64 {
Expand All @@ -60,5 +60,5 @@ func (p Pool) GetQuotePrice(tokenBaseDecimals int, tokenQuoteDecimals int) float

price, _ := quotient.Float64()

return math.Min(price, 1.0)
return price
}
Loading