livepeer / livepeer/clearinghouse

collector: eth price lookup failure can create null price calculation

Open
#54 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
1
Forks
3
Avg merge
1h 47m
Merged PRs (30d)
3

Description

The ETH/USD price pulled from the cache is only checked for null. If the oracle returns 0/negative (bad data or upstream bug), the pipeline will silently emit 0/negative USD micros, which is a correctness regression compared to the previous ETH_USD_PRICE validation.

_Originally posted by @eliteprox in https://github.com/livepeer/clearinghouse/pull/36#discussion_r3501566732_

We should cache the value on startup and fail fast if none available. If oracle refresh fails, continue using cached value

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the collector's ETH/USD cache lookup and trace the startup and oracle-refresh paths. Verify how missing, zero, and negative prices are handled, then confirm that startup fails without a cached value while refresh failures retain the cached value and valid prices produce non-null USD micros.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.