raiden-contracts icon indicating copy to clipboard operation
raiden-contracts copied to clipboard

Supporting channel participants not holding ETH or ERC20 tokens

Open pirapira opened this issue 5 years ago • 8 comments

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 avatar Jul 12 '19 14:07 pirapira

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 avatar Jul 12 '19 15:07 pirapira

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

pirapira avatar Jul 18 '19 14:07 pirapira

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

pirapira avatar Jul 22 '19 08:07 pirapira

Related: #352

andrevmatos avatar Apr 06 '20 14:04 andrevmatos

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

christianbrb avatar Sep 23 '20 12:09 christianbrb

@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.

karlb avatar Sep 24 '20 14:09 karlb

Would it be worth to look into something like GSN?

fredo avatar Sep 24 '20 14:09 fredo

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.

palango avatar Feb 26 '21 10:02 palango