Olzhas Koishybek
← All work

Auction

Real-estate and car auction — price steps of +3%, every bid resets a 50-second timer.

Auction
Built with
TypeScript
Year
2026
Status
Private

A real-time auction for fast sales of property and cars, built to a client's specification. A lot moves through listing and verification, then marketing and admitting participants with deposits, then bidding, and closes with a generated protocol. Bids go up in fixed 3% steps and every accepted bid resets a 50-second timer, so the end of an auction is decided by whoever is still there.

The interesting part is one Redis Lua script. A bid has to check the deadline, reject a self-outbid, confirm the price the bidder saw is still the current price, increment the sequence, set the new price and deadline, extend the expiry, schedule the finisher and write to an outbox stream — and if any of that is not atomic, two bids arriving in the same millisecond can both win. Doing it in one script closes the window entirely. The price steps are integer arithmetic on purpose; 3% in floating point is not a thing you want between you and someone's money.

A rejected bid comes back with the current price, the sequence and the next required price from the same script, so a client that lost a race can retry immediately instead of round-tripping to find out what it should have bid.

It's in active development and not in production. A recent audit found 96 issues, three of which stop it working in a real deployment — mostly configuration baked into builds rather than anything wrong with the trading core.

janjurekMCP Server for Kompra Group