monorepo icon indicating copy to clipboard operation
monorepo copied to clipboard

[node] Decouple deposit commitment from onchain transaction

Open rhlsthrm opened this issue 5 years ago • 2 comments

User story (Mosendo use case):

As a user, I need to have a deposit address that allows my money to be instantly spendable offchain when funds are transferred to it asynchronously. This is complicated by the fact that I might sometimes use Sendwyre and other services that can deposit at any time, any arbitrary amount into the address. I want to be able to log into my wallet and spend these funds instantly after the transaction is complete.

Proposed solution/discussion:

The prerequisite to making this work is to split up the deposit commitment from the deposit transaction.

However, this does not solve the case where funds are transferred to the deposit address asynchronously when the client is offline.

One thought to solve the above is to assume that any "unallocated" funds (i.e. not free balance, not in apps), can be "claimed" by either party. We can make this opinionated in our client-hub implementation by assuming that the hub will never asynchronously deposit, and we will always accept the client's request to claim the unallocated funds.

rhlsthrm avatar Oct 15 '19 13:10 rhlsthrm

Discussed this with @cf19drofxots and we think we have an approach, will put up a draft PR soon.

snario avatar Oct 18 '19 08:10 snario

@snario can we get a status update on this?

rhlsthrm avatar Oct 21 '19 08:10 rhlsthrm