The account abstraction layer is a way for EVM contracts to work on the UTXO based blockchain. This story should cover nearly the entire module.
Funds can be sent to a contract using OP_CALL. When a contract receives or sends funds, it should result in a "condensing transaction". This condensing transaction will spend any existing contract vouts which require their balance to be changed, and the outputs will be the new balance of the contracts.
The condensing transaction is created so that a contract never owns more than 1 UTXO. This significantly simplifies coin picking, and prevents many attack vectors with filling up a block.
There can be more than 1 condensing transaction per block. In the case of a single contract having multiple balance changes in a block, a condensing transaction might spend a previous condensing transaction's outputs in the same block. This is slightly wasteful but reduces the complexity of logic required, and allows for easily adding more contract execution transactions without needing to rewrite any previous transactions.
An ITD for the full behavior with all known edge cases is here: https://github.com/qtumproject/qtum-itds/blob/master/aal/condensing-transaction.md
The account abstraction layer is a way for EVM contracts to work on the UTXO based blockchain. This story should cover nearly the entire module. Funds can be sent to a contract using OP_CALL. When a contract receives or sends funds, it should result in a "condensing transaction". This condensing transaction will spend any existing contract vouts which require their balance to be changed, and the outputs will be the new balance of the contracts. The condensing transaction is created so that a contract never owns more than 1 UTXO. This significantly simplifies coin picking, and prevents many attack vectors with filling up a block. There can be more than 1 condensing transaction per block. In the case of a single contract having multiple balance changes in a block, a condensing transaction might spend a previous condensing transaction's outputs in the same block. This is slightly wasteful but reduces the complexity of logic required, and allows for easily adding more contract execution transactions without needing to rewrite any previous transactions. An ITD for the full behavior with all known edge cases is here: https://github.com/qtumproject/qtum-itds/blob/master/aal/condensing-transaction.md