Skip to content
Work

Lunar Finance

Backend and infrastructure for a DEX aggregator — routing, quoting and settlement against on-chain liquidity, built for throughput and correctness under volatile conditions.

Client
Lunar Finance
Role
Backend and infrastructure engineering
Outcome
Live

Backend and infrastructure for a decentralised exchange aggregator: taking a request to swap one asset for another and finding the best route across on-chain liquidity.

The constraint that shapes everything

In a DEX aggregator, a quote is a promise about a market that is moving while you compute. Every millisecond between quoting and settling is a millisecond the price can move against the user. The system is therefore built around two properties that usually trade off against each other — throughput and correctness — and refuses to sacrifice the second for the first.

What that meant in practice

  • Routing across multiple liquidity sources, scored rather than first-match.
  • Quoting that is honest about its own staleness rather than optimistic.
  • Settlement that fails loudly and recoverably instead of half-completing.

Written in Rust against Solana, because the correctness guarantees and the throughput requirements both pointed the same way.

Visit the live system