If we’re using Bitcoin’s nLocktime to make complex contracts, how do they handle situations where time-based transactions might conflict with each other? It’s not as much of a problem as it might look at first, says Dr. Craig Wright in session 3 of the latest The Bitcoin Masterclasses series in London.
“Remember, Bitcoin is not just a signature system—it’s script,” he says. Even automated payments and processes can be built to accommodate changing conditions.
Ultimately, a UTXO can only be spent once, and the transaction is then “locked” and recorded on the blockchain. This changes the contract state. As actions in the real world affect scripted conditions in the contract, the script can remove certain nLocktime transactions from the process, preventing a potential double-spend.
You might even deliberately build conflicting nLocktime payments into the script, with previous outcomes triggering one and eliminating the other.
Dr. Wright says that, in a contract structured as a “tree” of various conditions and possibilities, it’s possible to eliminate some branches or adjust paths, just as a video game adjusts its scenario depending on a player’s actions. He notes that computers are good at this kind of thing and can even pre-empt some potential moves if they’re predictable. nLocktime can handle all this.
“If we don’t plan, we don’t have a response.” All kinds of events can take place in the real world that might affect the outcome of a contract. One of the contractors might die or become incapacitated. There may be a natural disaster, terrorist attack, war, or other events beyond the parties’ control. It’s neither necessary nor possible to think of every potential outcome, but a contract could still account for a broad range of them.
‘Unknown-unknowns’ and other things you didn’t think of
The video game example is a good one—some of the worlds they’ve created are highly complex, with thousands (or more) players interacting every second. A contract can be similar. For those “unknown-unknowns,” as Dr. Wright mentioned in the previous session, there could be a clause coded into the contract that triggers arbitration or insurance. Or it could void whole sections of the contract altogether.
There’s an interesting tangent from a breakout session in this part, where Dr. Wright and audience members discuss whether corporations would willingly adopt an efficiency that automated complaint compensation to customers. Dr. Wright suggests it could make them more responsible, but the audience questions if it would discourage them from implementing such a system in the first place. This is just one specific example, but it’s an excellent question to ask more broadly about introducing blockchain efficiencies and transparency to how businesses and governments often operate.
No one should be intimidated by the prospect of complexities and unexpected outcomes. They’re part of real life. Often, the most thought-provoking elements of The Bitcoin Masterclasses sessions are not part of their title or description. Developers of the future will need to think about these as well, so it’s well worth watching every session—there’s bound to be an idea you haven’t considered yet.
Watch: Party-to-party is revolutionary, and that’s because Bitcoin is traceable
New to Bitcoin? Check out CoinGeek’s Bitcoin for Beginners section, the ultimate resource guide to learn more about Bitcoin—as originally envisioned by Satoshi Nakamoto—and blockchain.