ExchangeUnion / xud

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

Check total reserved balance before placing new orders #1947

Closed sangaman closed 4 years ago

sangaman commented 4 years ago

Offshoot from #1678.

Reject orders that would put our total reserved balance over our total capacity. An exception to this would be for inbound limits for Connext currencies, since we have the ability to dynamically request additional inbound collateral via our "lazy collateral" approach.

Revisit the logic used for accepting market orders as it pertains to our trading limits, we want to ensure that market orders won't make it so that they don't leave us with insufficient balance to cover our outstanding orders.