ELA Locking Transaction Recognition


The UTXO lock is similar to CLTV of Bitcoin (Check Lock Time Verify), which is a more flexible timing lock that locks one or more outputs during a transaction. The UTXO Lock adds a field to the output structure of the transaction. The OutputLock and LockTime are used in combination to only lock UTXO but not the transaction itself.
  1. 1.
    After the sender creates a transaction, UTXO will be locked by setting OutputLock to a certain height in the future - this means that UTXO can be spent only after the height of the block reaches the OutputLock limit.
  2. 2.
    When the recipient creates a transaction that costs UTXO (which includes OutputLock) the LockTime will need to be set to a higher value than OutputLock to spend the UTXO. This forces the recipient to create a transaction with a transaction lock in order to spend the UTXO locked by the UTXO lock, which limits the time spending the UTXO.

Verification of the UTXO Lock

  1. 1.
    To determine whether all inputs referred to UTXO, which includes the UTXO LOCK, (OutputLock>0). If there are no references, return true;
  2. 2.
    Judge whether the sequence that referred to the UTXO Lock's input is equal to 0xfffffffe; if it's not equal, return to false;
  3. 3.
    Determine whether the TimeLock of the transaction is greater than the value of all UTXO OutputLock; if it's not greater, return false;
  4. 4.
    Return true after passing validation.