cNGN
SDK Contributor
Refactored the oracle SDK, added failover resilience, resolved signer injection and improved security.
01 · Requirement Analysis
The oracle SDK returned prices through a single provider with no fallback — any outage or stale response propagated downstream. The refactor needed resilience, a clean signer surface, and tightened security.
02 · Architecture Discovery
Reviewed the existing fetch path and signer wiring; identified implicit state and a fragile provider singleton. Decided on a multi-provider failover layer with a pluggable signer injected via dependency injection.
03 · Software Architecture
A client walks an ordered provider list with healthy-provider selection and retry/backoff; an injected signer abstraction replaces direct key use; providers and signers sit behind interfaces.
04 · Development Principles
Failover / circuit-breaker pattern, dependency inversion for the signer, immutability of price responses, a narrow public API, and explicit error propagation rather than silent defaults.
05 · Impact
Price feeds now survive provider outages, signer injection is safe and testable, and the SDK has a smaller, audited attack surface.