indra
indra copied to clipboard
Allow client to pay for gas
Is your feature request related to a problem? Please describe. Follow-up of https://github.com/connext/indra/issues/27: we'd want the client to be able to pay for gas costs of collateralization.
Describe the solution you'd like Node communicates that re-collateralization is necessary and the fee, client can choose to proceed (accept) or not, sends payment. Node keeps fee when forwarding payment.
Describe alternatives you've considered No alternatives.
Additional context Some thought should also be put in to evaluate if this can be used in a multi-hop future for intermediate forwarding nodes to keep a forwarding fee in lightning-style.
Hmm well I guess this is technically possible with fairly minimal changes. First pass at the flow:
- Node prepares a meta transaction to the multisig
- Node requests + gains deposit rights, including the meta tx in the deposit application meta
- Node sets up listener to watch multisig for deposit
- Client emits the
INSTALL_EVENT, which includes the metatx - XUD application has code to submit the deposit to the multisig from the users wallet
- Node finds tx and removes listener, then rescinds deposit rights
The tasks on our end for this would look like:
- allow node operators to specify if clients pay collateralization fees
- update node collateralization logic to include the above
- ensure clients emit install event (see #627 )
Alternatively, we could bake this into the fee structure (see #1139 )