Part of the Ashva module inventory — a multi-tenant tote and fixed-odds betting platform we built and operate. The engineering practice behind it is our platform build and integration service line.
Most of the bet lifecycle is deterministic. Markets should open when the fields are published, suspend when a runner is scratched, close at the jump, and settle when the results are official. Where operators lose money and goodwill is in the exceptions, and in the manual work that exceptions generate when the routine path is also manual.
This module automates the deterministic parts so the exceptions get attention.
Lifecycle triggers
Market state changes on schedule and on event. A scratching suspends the affected markets and triggers the refund and re-settlement path. A delayed start moves the close. An abandoned meeting voids and refunds rather than leaving markets open against an event that will not run. Manual control remains available; it is the exception path, not the operating model.
Settlement is a ledger problem
Resulting reads official results and amendment feeds. Settlement writes to the ledger as a transaction set per bet, so a customer’s balance movement can be traced to the specific bet, leg and dividend that caused it. Netting settlements into a single balance adjustment is faster to build and impossible to defend when it is queried.
The cases that break naive systems
Dead heats, protests that reverse a placing after payouts have run, late scratchings after a market has traded, and combination bets with a leg affected by any of the above. Each is handled as a defined case with re-settlement, including reversal of amounts already paid, and each leaves an audit trail rather than a corrected figure.
Automation needs to fail loudly
Every scheduled job has monitoring and a defined behaviour when its input is late or missing. A resulting job that silently does nothing because a feed did not arrive is worse than one that stops and raises an alert to the Operations Desk.
What this module does not do
It does not price and it does not set limits. It executes the lifecycle against the prices from the odds module and the rules from the risk module.