Smart contracts execute automatically, but what happens when the code has a bug, and someone loses money?
Genuine question I've been thinking about.
Smart contracts are self-executing — once deployed on a blockchain, they run automatically based on coded conditions with no human intervention possible. That's the whole point. But what happens when the code has a bug that causes unintended execution, and someone loses significant money as a result?
A few scenarios I'm curious about from a legal standpoint:
The developer wrote the code in good faith but made an error. The user read the contract terms and agreed to them. The bug triggers, and funds are lost. Is the developer liable?.
And what jurisdiction even applies? The developer might be in Germany, the user in Brazil, the blockchain nodes distributed globally, and the loss denominated in a token issued by a foundation in the Cayman Islands.
Curious whether anyone with a legal background has seen cases like this or has a view on how existing contract law frameworks apply to code that executes without any human in the loop.