Real-time pricing service for a
crypto lending platform.
SALT lends cash against crypto collateral, so every part of the business runs on prices. We designed and built Price Service V2, a streaming Rust service that replaced 30-second polling and now feeds wallets, user interfaces and risk management across the platform.
When prices drive loans, stale prices are risk.
SALT's borrowers pledge crypto as collateral for cash loans. The value of that collateral drives loan-to-value monitoring, margin calls and liquidation decisions, and crypto markets can move sharply in seconds.
The legacy price service polled and refreshed every 30 seconds. We designed and built its replacement, then moved every consuming system onto it.
One price, everywhere, right now.
Every part of the platform needed fresh, consistent prices from one place: wallet management, the prices users see, and the risk system that watches every loan. The service had to stay accurate when individual trades were noisy, keep working when its primary data feed failed, and leave a record of exactly which trades produced each price.
Freshness
Thirty-second-old prices are a real exposure when collateral is volatile.
Resilience
A pricing outage would blind wallets, user interfaces and risk management at the same moment.
Accountability
Loan-to-value events needed an audit trail of the exact price and source trades behind them.
A streaming price service in Rust.
Price Service V2 is a gRPC server written in Rust. It consumes a live trade feed and turns every new trade into a fresh price for each supported asset, filtering out stale and outlying trades so one noisy print can't move the number.
A broadcaster holds the latest price for every asset and streams updates to any service that subscribes. Consumers can also request the latest price, the list of supported assets, or historical prices over a time range.
Streaming by default
A server-streaming gRPC call pushes every new price to subscribers the moment it's calculated, with simple calls alongside it for systems that only need a single price.
Built-in fallback
If prices go stale or the primary feed drops, the service switches to a backup market data source automatically and switches back when the feed recovers.
Audit-ready history
Every price is stored with the trades behind it, so any price can be traced back to its source and historical queries stay fast.
Live prices across the whole platform.
Risk sees changes the moment they happen
With prices streaming instead of polled, SALT's risk management recognizes drops in loan-to-value instantly, and wallets and user interfaces show the same live price.
Every consuming service moved onto the new service. With live and historical prices coming from one place, prices are consistent across every system, and an older historical price service could be retired.
Our team owned the architecture and implementation, and coordinated the migration of every consuming service with SALT's engineering team.