Open mbg033 opened 5 years ago
I haven't looked into what is possible with transfer_split. However, the following is a similar idea I had: "Anyone looked at transfer_split to see if it can be used to create two separate transactions for stake_transfer? First transaction would have unlock_time and the stake amount. Second transaction would pay for the fees of the first transaction and contain the change." Maybe the 2nd doesn't need to pay for the fees of the 1st. But I thought splitting the change to a 2nd might be possible.
Jason: That solution won't work.
The sum of spent outputs + fee must equal the sum of outputs within every transaction.
Avastar: Can that must be modified, or is it possible to create a cascade transaction, one transaction followed by another, with the second transaction being the stake_transfer. Doesn't ETH allow two serial transactions (one dependent upon the other) in the memory pool at the same time?
Jason: It can, but it's not necessary; you can just build a transaction that supports per-transaction unlock times (loki has supported it for a long time).
That said, loki's current solution is much nicer: stakes don't use transaction locks at all; rather there is a whole separate mechanism that locks outputs that are part of a stake so long as the SN itself remains registered.
Possible solution: change should go in separate tx with the standard unlock time