Set an XMR Bridge Minimum After Rounding
A bridge should compare its payout floor with the amount left after fees and destination-unit rounding, so a valid quote cannot become an undersized transfer.
By Crypto Readout Editorial3 min read#ef7283

An XMR bridge should enforce its minimum payout against the amount it can actually send after fees and rounding. The bridge first converts the deposit at the quoted rate, then applies any fee taken from the payout, then rounds the result to a whole number of the destination asset’s smallest units. A minimum checked before those steps can approve a payout that falls below the floor once sent.
The moving parts are the quote, fee rule, destination precision and minimum. For XMR, the smallest unit is 0.000000000001 XMR; other assets can use different precision. A xmr bridge can involve several conversion steps, so that fuller explanation helps show where the payout calculation fits. The key is to compare like with like: the minimum and the final payout must use the same asset and unit.
When should a bridge check its minimum payout?
It should check after every adjustment that changes what the recipient receives. Start with the converted amount, subtract any fee deducted from that amount, and round to the destination’s supported precision. Then compare the resulting net payout with the configured minimum. If the fee is collected separately, it should not be subtracted from the payout; the fee rule must match the amount the recipient is promised.
Rounding is the last measurement before the threshold check, much like weighing a parcel after packing it. Checking the unrounded estimate is not enough. A small fraction can disappear when the bridge rounds down, and a payout that looked eligible can end up one destination unit short.
How should the minimum be set?
Set the floor in the destination asset, at a precision that asset can represent, and define whether it means the net amount received. If the business rule has a threshold that falls between destination units, round the threshold up to the next representable unit. Then require the rounded net payout to meet or exceed it.
- Keep calculations in integer base units where possible, rather than relying on binary floating-point values.
- Specify the rounding method, such as rounding down, and use it consistently in quotes and execution.
- Apply fees in the documented order, especially when a fee comes out of the recipient’s amount.
- Recalculate the check when the execution amount or rate changes.
Rounding up a payout to force it over the minimum changes the amount the bridge owes and can draw on its reserves. A cleaner rule is to reject or requote a payout below the floor, then let the sender choose whether to increase the deposit. State whether the minimum applies to the quoted amount or the final amount received; for a payout floor, the final net amount is the useful measure.
What should happen when rounding leaves a payout short?
The bridge should stop the payout and return a clear result: the expected net amount is below the minimum after rounding. It can then offer a new quote for a larger deposit, or follow a disclosed refund process. It should not silently raise the payout, waive the floor, or report the pre-rounded estimate as the amount sent.
For operators, the practical test is simple: run the minimum check on the exact integer amount passed to the destination transfer. For users, compare the displayed net payout—not just the deposit or exchange rate—with the stated floor. That makes the rule predictable even when a conversion produces fractional destination units.