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

Supporting channel participants not holding ETH or ERC20 tokens #1123

Open
pirapira opened this issue Jul 12, 2019 · 8 comments
Open

Supporting channel participants not holding ETH or ERC20 tokens #1123

pirapira opened this issue Jul 12, 2019 · 8 comments
Labels
efforts: a few days hack P2 demanded by somebody

Comments

@pirapira
Copy link
Contributor

pirapira commented Jul 12, 2019

In some use-cases (for example light client), the channel participants do not control ETH or the transferred ERC20 tokens. In those use-cases, the channel participants only sign balance proofs (withdraw proofs, etc) and delegate the Ethereum transaction signature to other parties.

This issue keeps track of

  • modifying settleChannel() so that the tokens can be transferred to other accounts that the token owners specify
    • this modifies the balance proof signature scheme. When a participant signs a balance proof, the participant needs to add one field address beneficiary.
  • modifying setTotalWithdraw() so that the tokens can be transferrred to another acccount
  • modifying unlock() so that the tokens can be sent to another account
    • use the same addresses provided in settleChannel()?
  • modifying closeChannel() so that the function can be called by a third-party
@pirapira pirapira added P2 demanded by somebody efforts: a few days hack labels Jul 12, 2019
@pirapira
Copy link
Contributor Author

pirapira commented Jul 12, 2019

When we modify closeChannel(), we need to be careful in the client once it signs the close proof.

Currently, in the client, the channel is assumed to be closed before the closeChannel() transaction is sent out to the Ethereum network. After the change, the client needs to assume that the channel is closed, once the client signs the signature for closing the channel.

@pirapira
Copy link
Contributor Author

Modifying unlock() alone is no good because the not-unlocked tokens go back to the sender (subkey).

@pirapira
Copy link
Contributor Author

The settlement function takes too many arguments after this. The settlement function has to use the V2 ABI first (#1129).

@andrevmatos
Copy link
Contributor

Related: #352

@christianbrb
Copy link

@andrevmatos @karlb Would this need changes to the Python client?

@karlb
Copy link
Contributor

karlb commented Sep 24, 2020

@christianbrb: If the python client is supposed to support ETHless operation then it does need changes. But it should be possible to add support for this in the contracts (so that the light client can use it) without breaking backwards compatibility by providing two separate functions (the old ones and the new ones that can delegated) for each operation. I can't tell how easy that would be without looking into this longer.

@fredo
Copy link

fredo commented Sep 24, 2020

Would it be worth to look into something like GSN?

@karlb karlb added this to the Coruscant milestone Oct 12, 2020
@palango
Copy link
Contributor

palango commented Feb 26, 2021

UserDeposit.planWithdraw should allow to withdraw to a different account. This would make it possible to avoid some confusion in the light client, where the deposit is handled by the subkey account, but withdrawn deposits should be going back the the master key.

@karlb karlb removed this from the Coruscant milestone Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efforts: a few days hack P2 demanded by somebody
Projects
None yet
Development

No branches or pull requests

6 participants