helium/blockchain-core

Support balance clearing / closing payments

abhay opened this issue · 0 comments

abhay commented

Spec: A payment_v2 transaction can contain a single payment instruction with a specified payee, an empty amount, and a max boolean set to true (default: false) in order to perform a balance clearing transaction. This transaction would implicit burn the appropriate amount of HNT for the fee and send the remaining balance to the payee.

Some Edge cases:

  • What if multiple payees exist? Transfer the specified amounts to their respective payees and send the remainder to the payee with the unspecified amount.
  • What if multiple payees exist with unspecified amounts? Reject the transaction.
  • What about HST? Defer. Only support HNT clearing transactions.