Skip to content

Demo: This is a demo template by Ruji Labs. The business, people, products, prices and reviews on this page are fictional and do not represent any real company.

zahin ooi
menu

FX quote engine for Lintasan

A rate service that locks a quote for 90 seconds without letting the company eat the market move. Lintasan: remittance from Malaysia to Indonesia, the Philippines and Bangladesh.

0.3%

failed quotes, down from 3.2%

Client
Lintasan
Role
Contract engineer, solo build
Duration
10 weeks
Shipped
2025.01, v1.0
Stack
Go, Redis, PostgreSQL, gRPC

Problem

Lintasan's senders are mostly workers sending part of their pay home on a Sunday. The app showed a rate, the sender typed an amount, and by the time they confirmed, the rate had often moved. The app then showed a new rate and asked again. 3.2% of transfers failed at this step, and app reviews said the price was a trick.

The finance lead wanted longer quote holds. The treasury lead did not, because every second of hold is market risk the company carries.

Constraints

3 that shaped the design

  • Rates from two liquidity providers that disagree, update at different speeds and sometimes go silent.
  • A hard cap on the company's open FX exposure per corridor, set by treasury each morning.
  • Every shown rate has to be reproducible later for complaints and audits.

Architecture

scroll sideways to see all of it

Quotes are priced from a blended mid plus a spread that widens with hold time and current exposure.
quoteheadroomprovider Astreamprovider Bpoll, 2 sblended midstale guardquote engine90 s locksexposure bookper corridorquote log7 yearssender app

boxes are servicesdouble top rule is a storedashed is async or advisorygreen is what this project built

Code

excerpt, lightly trimmed

Spread is a small, testable function. Treasury can read it, which is why they agreed to the longer hold.

quote/spread.gogo
// Spread returns basis points to add to the mid for a quote held holdSec seconds.func Spread(base, holdSec int, used, limit float64) int {    bps := base    bps += holdSec / 30             // 1 bp per 30 s of hold    if limit > 0 && used/limit > 0.8 {        bps += int((used/limit - 0.8) * 50) // lean against a full book    }    return min(bps, base*3)}

Result

measured, not estimated

quote holdwas 30 s
90 s
transfers failing at confirmwas 3.2%
0.3%
exposure cap breaches in 9 months
0
average spread change
+0.4 bp

The quote log turned out to be the most used part: support can now show a sender exactly what they saw and when.

Demo only

This button is part of a demo template. Nothing was sent, booked or charged, and there is no real business behind this page.

Want a page like this for your business?

QR code: Darus Ishak, Ruji Labs contact cardScan or tap to get the contact card of Darus Ishak, Ruji Labs.Open contact card ↗