Skip to content

Reject invalid price feed values#18

Open
samsamtrum wants to merge 1 commit into
SubzeroLabs:mainfrom
samsamtrum:reject-invalid-price-values
Open

Reject invalid price feed values#18
samsamtrum wants to merge 1 commit into
SubzeroLabs:mainfrom
samsamtrum:reject-invalid-price-values

Conversation

@samsamtrum

Copy link
Copy Markdown

The price alert example converted API prices with (price * 100.0).round() as u64. If the feed returned a negative, NaN, or infinite value, that cast could turn invalid data into a stored price and still run threshold checks.

This adds a small checked conversion helper and uses it in both immediate and scheduled price responses so invalid feed values are ignored instead.

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@samsamtrum is attempting to deploy a commit to the Subzero Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant