Skip to content

Commit

Permalink
Merge tag 'v0.12.1' into mainnet-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Apr 8, 2024
2 parents b4d4848 + 015f3d4 commit 05814cd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions oracle/provider/finv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ func (p *FinV2Provider) Poll() error {
base := strToDec(bookResponse.Data.Base[0].Price)
quote := strToDec(bookResponse.Data.Quote[0].Price)

var low, high sdk.Dec

if base.LT(quote) {
low = base
high = quote
} else {
low = quote
high = base
}

if high.GT(low.Mul(floatToDec(1.05))) {
p.logger.Error().Msg("spread too large")
continue
}

delta, err := p.getDecimalDelta(contract)
if err != nil {
continue
Expand Down

0 comments on commit 05814cd

Please sign in to comment.