I don't stand by the smart contract principle that is espoused by some, that is summed up in three words: code is law.


As a former test engineer, it's all to clear to me that there will always be bugs in any computer program that does something complicated or contains more than ten lines of code. Or in the platform, interpreter, or operating system running underneath it.


Behind all computer programs there is an intent, and the code is an attempt to capture that intent.


In specific cases where DeFi protocols move large amounts of digital assets to a particular wallet following some contract interaction, of course there are grey areas, and there is room for arguing whether or not the interaction was "reasonable" or not.


But if the conclusion is that it's not reasonable, and that this was understood prior to the interaction, then I don't see "code as law" as a defense.


What do you think?