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

Recover unilateral deposit #21

Open
MatthiasLohr opened this issue Jan 10, 2022 · 3 comments
Open

Recover unilateral deposit #21

MatthiasLohr opened this issue Jan 10, 2022 · 3 comments

Comments

@MatthiasLohr
Copy link

Hi,

maybe this is very close to #4, however, maybe there is already a solution for the following problem:

Imagine two players A, B to agree (off-chain) on using a state channel for their business. If I understood everything correct, there is no "channel registration" in the smart contract, just a deposit call with the according channel ID, which results from the channel parameters. Since everything looks fine, A now will do a deposit. After the deposit, B decides not to proceed the state channel operations and just leaves. Is there any way for A to recover his deposit? Both, register and concludeFinal require a mutually signed state - since there is no such state, there is no way for A to conclude the dispute and settle the state channel, right?

Best regards
Matthias

@matthiasgeihs
Copy link
Contributor

Hi @MatthiasLohr ,

Our protocol requires that a client will only deposit after receiving a signature from all channel participants on the initial state (you can see that here in go-perun). Thus, in order to withdraw funds from a partially funded channel, you can use this initially signed state.

Our payout logic works like this: If the channel is underfunded, the payout will be done according to the deposits. Only if there is a enough funds available, the balances of the concluded state will be paid out.

@MatthiasLohr
Copy link
Author

@matthiasgeihs,

thank you very much for the reply!

Our payout logic works like this: If the channel is underfunded, the payout will be done according to the deposits.

I feel blind... where can I find this logic in the Solidity contracts?

@matthiasgeihs
Copy link
Contributor

@MatthiasLohr
This logic cannot be found in the contracts. It is part of the Perun protocols and described, for example, here: https://labs.hyperledger.org/perun-doc/concepts/protocols_phases.html. In order to use the contracts securely, you need to follow the protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants