How to set rates in an exchange: sources, markup and rounding
What a crypto exchange's rate is made of, how to choose sources, work out markup and rounding, and what to do when a rate source stops responding.
A client picks an exchange on a rate monitor by one number: how much they'll receive. That makes the rate both your main sales tool and the easiest place to lose money. A rounding mistake or a stale exchange price can eat a week's profit in a day.
It helps to think of the rate as a chain where each link does one thing.
1. The source price
The first link is the market price, usually from an exchange. A single source is a risk: the exchange can lag, stop responding for a while, or show a sharp spike on a thin market.
So it's better to have several sources and a rule for combining them:
- an average of several exchanges smooths out a random spike on one of them;
- a priority: a main source, with a backup that only takes over when the main one goes quiet;
- a custom rate for directions with no reliable market source.
2. Cross rates
Many directions have no direct pair on an exchange, or it's illiquid. Then the rate is worked out through an intermediate currency: for example, BTC → UAH as BTC/USDT × USDT/UAH. Every such step adds error, so build cross rates through the most liquid pairs.
3. Markup
Markup covers your costs and makes your profit. Set it separately for each direction and take into account:
- fees: the payment gateway's, the network's for crypto payouts, the exchange's for trades;
- risk: volatile coins and directions with frequent disputed payments need a bigger buffer;
- competition: the monitor shows other exchanges' rates, and a tenth of a percent decides who gets picked.
On small amounts, a percentage markup may not cover fixed fees. A minimum amount for the direction helps there.
4. Rounding
The last step is rounding to a few decimal places. Always round the same way, in your favour, and identically across every channel: the website, the Telegram bot and the rates file for monitors.
A made-up example: the exchange shows UAH 41.95 per 1 USDT, and the markup is 1.4%. 41.95 × (1 − 0.014) = 41.3627, which rounds down to 41.36. A client who sends 500 USDT receives UAH 20,680.
5. Locking the rate for the payment
Once a client creates an order, the rate is locked for the payment window, for example 15 minutes. The market can move in that time, and the exchange carries that risk. The more volatile the coin, the shorter that window should be, or the bigger the buffer in the markup.
6. When a source goes quiet
The most expensive mistake is to keep taking orders at a price that's no longer updating. Set a threshold: if a source doesn't respond for longer than that, the direction is paused and an operator is notified. When the source is back, the direction resumes.
7. Who changed the markup, and when
The rate is money, so every change to markup, sources or rounding should be written to a log with its author and time. When a day's profit suddenly drops, you'll see in a minute whether someone changed the settings.
In Obminly, the rate is built as exactly this chain: exchanges, cross rates, your markup and rounding. If a source goes quiet, the direction is paused, and every change is written to the action log.