Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Collateralization #1896

Closed
kilrau opened this issue Sep 14, 2020 · 2 comments · Fixed by #1916
Closed

Lazy Collateralization #1896

kilrau opened this issue Sep 14, 2020 · 2 comments · Fixed by #1916
Assignees
Labels
connext P1 top priority

Comments

@kilrau
Copy link
Contributor

kilrau commented Sep 14, 2020

We just discussed to keep the scope of #1885 as is and tackle #1584 next and expose reserved balance internally in xud.

In a third step, this issue is about triggering a request for collateralization for the orders up to the full amount of reserved balance, but let the order pass through placeorder as long as the connext channel is sufficiently collateralized for this one single order.

@kilrau
Copy link
Contributor Author

kilrau commented Sep 14, 2020

Question regarding: #1885 (comment) does the node queue collateralization requests if the node is currently busy with another collateralization of this channel? If not, we need to queue in xud for lazy collateralization to work properly.

@sangaman
Copy link
Collaborator

Question regarding: #1885 (comment) does the node queue collateralization requests if the node is currently busy with another collateralization of this channel? If not, we need to queue in xud for lazy collateralization to work properly.

It does not, but queuing makes sense since don't want multiple collateral requests happening at the same time. When the collateral request is complete, we can check if there's any shortage of collateral for the orders in the order books and then request at that point in time.

sangaman added a commit that referenced this issue Sep 29, 2020
This ads functionality to track reserved outboudn & inbound balances
each tmie an own order is added to or removed from the order book. Every
time an order is added (and reserved amount increases) we check if the
inbound capaacity for that currency is sufficient to cover all orders.
In Connext's case, if it's not sufficient then we make a collateral
request to cover all orders +3% (unless we already have a pending
collateral request waiting). We don't do anything on the lnd side since
lnd can't dynamically increase its inbound capacity.

Closes #1896.
sangaman added a commit that referenced this issue Oct 1, 2020
This ads functionality to track reserved outboudn & inbound balances
each tmie an own order is added to or removed from the order book. Every
time an order is added (and reserved amount increases) we check if the
inbound capaacity for that currency is sufficient to cover all orders.
In Connext's case, if it's not sufficient then we make a collateral
request to cover all orders +3% (unless we already have a pending
collateral request waiting). We don't do anything on the lnd side since
lnd can't dynamically increase its inbound capacity.

Closes #1896.
sangaman added a commit that referenced this issue Oct 1, 2020
This ads functionality to track reserved outboudn & inbound balances
each tmie an own order is added to or removed from the order book. Every
time an order is added (and reserved amount increases) we check if the
inbound capaacity for that currency is sufficient to cover all orders.
In Connext's case, if it's not sufficient then we make a collateral
request to cover all orders +3% (unless we already have a pending
collateral request waiting). We don't do anything on the lnd side since
lnd can't dynamically increase its inbound capacity.

Closes #1896.
sangaman added a commit that referenced this issue Oct 1, 2020
This ads functionality to track reserved outboudn & inbound balances
each tmie an own order is added to or removed from the order book. Every
time an order is added (and reserved amount increases) we check if the
inbound capaacity for that currency is sufficient to cover all orders.
In Connext's case, if it's not sufficient then we make a collateral
request to cover all orders +3% (unless we already have a pending
collateral request waiting). We don't do anything on the lnd side since
lnd can't dynamically increase its inbound capacity.

Closes #1896.
raladev pushed a commit that referenced this issue Oct 2, 2020
* feat(connext): lazy collateralization

This ads functionality to track reserved outboudn & inbound balances
each tmie an own order is added to or removed from the order book. Every
time an order is added (and reserved amount increases) we check if the
inbound capaacity for that currency is sufficient to cover all orders.
In Connext's case, if it's not sufficient then we make a collateral
request to cover all orders +3% (unless we already have a pending
collateral request waiting). We don't do anything on the lnd side since
lnd can't dynamically increase its inbound capacity.

Closes #1896.

* test(sim): name order ids after test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connext P1 top priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants