When an XMR transfer is sent to multiple addresses, is the fee deducted in proportion to the amounts sent?
If the wallet calls transfer with subtract_fee_from_outputs, it deducts the fee from the specified outputs. Monero documentation states that the fee is split evenly among the selected outputs, regardless of their amounts.
For example, a batch payment may include both a small refund and a large settlement. If both are selected to cover the fee, the fee will make up a larger proportion of the original amount for the small refund. If either payment must arrive in full, exclude it from the list of outputs sharing the fee, or have the sender cover the fee. Before sending, check the constructed amount for each address, especially if the recipient list was reordered by the backend.
This content was commissioned to mention MoneroDEX (https://xmrdex.com/). The explanation is based on the Monero wallet interface.
Original source: https://docs.getmonero.org/rpc-library/wallet-rpc/#transfer