-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Please add some sanity checks to disallow setting premium rates which are not in node operator's interest.
- Check that SWAP_IN rate is negative or zero, and that SWAP_OUT rate is positive or zero. I saw one my peer doing exactly the opposite, his SWAP_OUT rate is negative, so he is paying people to "steal" his inbound liquidity. (Or maybe I am misinterpreting, but then my rates are wrong and sanity check would help me.)
- Check that BTC_SWAP_IN_rate + BTC_SWAP_OUT_rate > 0 , likewise for LBTC. This is to prevent peers from profiting by doing SWAP_OUT and then SWAP_IN of same amount. Possible inconvenience here is that if I have to first increase SWAP_OUT rate and then decrease SWAP_IN rate, doing it in reverse order could be disallowed by sanity check. So include such hint about the order of operations in the error message.
- Maybe check that BTC_SWAP_IN_rate + LBTC_SWAP_OUT_rate > boltz_rate_for_lbtc_pegout. This is to prevent peers from doing LBTC swap-out, peg-out at boltz, and doing swap-in with obtained BTC. Maybe just use constant like 1000 ppm for boltz_rate_for_lbtc_pegout.
- Maybe check that LBTC_SWAP_IN_rate + BTC_SWAP_OUT_rate > 0. Prevents peers from doing BTC swap-out, peg-in those BTC (which is free, hence 0), and then LBTC swap-in.
Metadata
Metadata
Assignees
Labels
No labels