Blockchains like Ethereum undoubtedly pioneered the notion of running complex code or logic on blockchain ledgers such functionality, although greatly simplified, in fact can be found even in Bitcoin. Bitcoin includes what are known as Bitcoin Scripts. Bitcoin Scripts comprise a Turing-incomplete, or limited functionality, language that allows some forms of complex transactions such as multi-sig transfers.
Within the framework of a UTxO blockchain, the idea behind Bitcoin Scripts can be generalized with something known as extended-UTxOs. Extended-UTxOs represent a more granular implementation of a general-purpose blockchain state machine. In a blockchain that supports extended-UTxOs, users create complex locks, also called propositions, on a transaction output (like a box of tokens) that must be satisfied before this transaction output can be used as the input for a new transaction.
For example, let's imagine that Alice wishes to send Bob some tokens that can only be spent when the oracle, Olivia, confirms that it is currently raining. Alice can send her tokens to Bob, locking the output box with a proposition that can only be satisfied with a combination of (1) Bob's private key and (2) a signed message from Olivia stating that it was raining within the last k blocks.
We can take this example further if we imagine that Alice wishes to create a new variety of token that in general can only be spent when it is raining, a rainy day fund. To achieve this, Alice will send her tokens to Bob, this time locking the output box with a 3-fold proposition. The lock can satisfied by only the combination of (1) Bob's private key, (2) a signed message from Olivia stating that was raining within the last k blocks, and (3) a new output box locked with propositions identical to parts 2 and 3 of the original proposition. Using the above notion of a self-replicating lock, extended-UTxOs can even be used to execute multi-step smart contract style logic with each step being executed per lock.
While there are undoubtedly drawbacks to extended-UTxOs compared with traditional smart contracts, Topl is implementing such functionality as a complement to Chain Program Engine in order to provide our users with greater flexibility and choice in how to execute ledger logic on the Topl Blockchain. One benefit in particular granted is that extended-UTxOs can always be fully verified by a user locally with essentially no more resources or connectivity than are required to execute a simple token transfer.
Last modified 9d ago
Copy link