ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 49 forks source link

Configurable routing fee limit #1280

Open kilrau opened 4 years ago

kilrau commented 4 years ago

When executing a swap we want the user to be able to configure the currently 3% hardcoded routing fee cap. Currently only applicaple for lightning, we should wait with implementation until https://github.com/connext/vector supports routing fees too.

kilrau commented 4 years ago

The approach we discussed today:

wdyt? @sangaman

raladev commented 4 years ago

Can we add sort of option for user to regulate that? @kilrau @sangaman

For me 0.5 is to much if I use small margin option for arby.

So, it would be better to have the RouteFee option which i can set:

  1. Dont want to pay RouteFee (0%)
  2. Another value (0.5%) - All swaps with fee more then 0,5 of total trade amount should be dropped with RoutingFee error.

But it will work only if we can calculate RoutingFee before swap performing.

kilrau commented 4 years ago
  1. this will fail 100%, nobody routes for free
  2. 0.5% is just this is just the max cap, in practice your lnd will mostly choose the cheapest option for you automatically. Also, in practice total routing fees are that small that they don't matter so I wouldn't want to make this issue more complicated than it is.