How does Ripple decide which offer to fulfil if they offer the same rate?



If two offers have the same exchange rate, how does Ripple decide which one to fulfil first?


Posted 2013-03-04T14:23:22.770

Reputation: 5 220

1I guess, since it makes most sense to me, to fulfil the older one, but that's just a guess: I'd like to know for sure. – o0'. – 2013-03-04T14:23:51.850

It is possible that this hasn't been decided yet. – jtimon – 2013-03-11T14:47:53.117



If they're in the same order book (same currency/issuer pairs), it's the one that was placed first.

If they're in different order books (say because the source holds balances from more than one issuer) it's a bit more complex. Even if the offer rates are the same, the effective rate might not be the same. For example, if one issuer has a higher transfer fee, that can make the effective rate higher even if the offer rate is the same.

If the effective rate is the same, then it's the one specified first in the transaction's path set. Currently, the server sorts the path set when the transaction is formed based on an attempt to provide the most liquidity and any benefits that can be achieved. So, for example, if one path reduces a balance that's over its limit, that will be preferred.

David Schwartz

Posted 2013-03-04T14:23:22.770

Reputation: 48 957