Does Ripple ever charge proportional transaction fees? I spotted this sentence in WeExchange (a ripple gateway):


  *: The ripple network may charge up to a 1% fee if you are withdrawing to an address that does not trust WeExchange for the amount.


What does it mean? Why can the fee reach 1%?
The network itself doesn't really ever charge proportional transaction fees. However, when you make a payment, that payment can take a path that can invoke any number of fees. These fees are charged by the individuals or companies who provide links in that path.

The four possible fees are:


Transfer fees: A transfer fee is a fee an IOU issuer can charge when their IOUs change hands. It is imposed by the issuer of the IOUs you hold. (This is one of the services your gateway can charge for.)
Quality fees: A quality fee is a fee someone who holds multiple IOUs can charge when you give them IOUs they consider less trustworthy in exchange for IOUs they consider more trustworthy. It is imposed by the entity that holds both IOUs. (This is a fee someone can charge if you use their liquidity to swap IOU issuers.)
Service fees: A service fee is a fee imposed on an IOU exchange in either direction as payment for the convenience of changing issuers. It is imposed by the entity that holds both IOUs. (This works the same as a quality fee except it can be charged in both directions and so doesn't necessarily reflect a change in quality.)
Exchange fees: An exchange fee is essentially the same as a service fee, but it can also occur when the currency is changed as well as the issuer.


When you form a transaction, the Ripple system finds the cheapest path taking these fees into account. Generally, the cost should be very close to the amount of money you are trying to deliver to the destination -- most of these fees are typically zero. If you hold IOUs from a gateway and are paying someone who trusts a gateway, these fees should total way under 1%.

These fees provide the incentive for people to provide liquidity and connectivity in the Ripple system. Competition should drive these fees to near zero for typical cases.

So, for example, if you hold IOUs for USD at two different gateways, you could offer to exchange between the two gateways at an exchange rate that makes you a modest profit. If you provide the best path between those gateways, then someone who holds IOUs from one gateway but needs to pay someone who only trusts the other gateway can take you up on your offer and you'll wind up imposing a fee on their transaction.

Ripple transactions can include multiple paths and a maximum amount to pay. At the instant the transaction is processed, the system will incrementally take from whichever path has the lowest cost. If the transaction cannot be completed at or below the specified maximum cost, it will return an error.

You might think it would be expensive to pay all these fees, but in practice, they'll be small or zero. Say you are at one exchange and you need to pay someone at another and the fee is high, say 1%. Someone with IOUs from both exchanges will see a profit opportunity -- just offer the IOUs at .9% instead. They can make money as the IOUs move back and forth and they won't have to do much. But then someone else will see an opportunity at .8% and so on. The price will get driven down to near zero unless there's some reason for the fee.

Some of these fees can apply in reverse and actually result in you paying less than the specified amount. If you're paying with IOUs that someone else needs, you may be able to give them the IOUs they want at a profit. So it could cost you $98 to pay me $100 if you hold IOUs that are needed and I'll accept IOUs you can get below face value.

The fees serve to cause transactions to do what people need done. If I have the "wrong" IOUs, I can just offer them in exchange for the IOUs I need at a good price and someone looking for the lowest fees will wind up fixing my problem for me. If I'm holding IOUs from someone I no longer trust, I just offer them at a discount and wait until they become someone else's cheapest path.

The 1% figure comes from the way WeExchange currently processes withdrawals from your exchange account to a Ripple account. If that Ripple account trusts WeExchange, they just issue that account IOUs. If not, some of the fees I mentioned above may be incurred. WeExchange currently will allow the withdrawal if it costs up to 1% more than the amount withdrawn. So if you order WeExchange to pay $100 to a Ripple account that won't take their IOUs, it may cost you more than $100 (up to $101) to do it. If it would cost more than that, WeExchange will report an error. (At least, this is my understanding. The details were relayed to me second hand and this is still subject to change.)