Are We Trustless Yet?
Dear Bankless Nation,
I recently had a Twitter conversation with Bankless citizen Above Average Joe about the definition of ‘trustless’.
But what ‘trustless’ means is actually difficult to pin down.
Because making something ‘trustless’ is difficult in the first place. There are virtually endless attack vectors that could potentially reduce the trustlessness of a smart contract on Ethereum.
This is what we narrowed in on:
The lack of required belief that another party will behave in the the manner specified beforehand.
I like AAJ’s definition because it emphasizes the intent of a protocol. Code is deployed on Ethereum with a specific purpose in mind.
Sometimes code on Ethereum can do things that are separate from its intended purpose. And the by-product of this are almost always things that go against the explicit goals of the code.
As we know, the DAO ‘hack’ wasn’t a true hack. Nothing on Ethereum can be ‘hacked’ because there’s no way to use code on Ethereum in an ‘unauthorized’ manner.
Either you can do it because the code allows for it, or you can’t because the code doesn’t allow for it. The DAO hack was an ‘unintended exploit’, which is appending a subjective rationale for how the DAO should have been used, versus how it was actually used.
I responded to Joe:
If we want a trustless economy in DeFi to exist, all subjectivity needs to be removed from the execution of code. If you, as a user, are making assumptions that the code will behave as intended, then it is not trustless.
There are no assumptions in trustless code.
A key component of a trustless economy is that we’re able to use smart contracts to remove assumptions about the intentions of other actors in the system. If using a smart contract requires assumptions of good faith from other actors in the system, then the system is not trustless.
John Adler really gets to the heart of the issue with his definition of ‘trustless’ with two rules:
So it boils down to this:
- You can always access your money
- No one else can access your money
Simple as that!
Using this framework for evaluating DeFi applications, the level of ‘trustlessness’ in the system extends far beyond ‘admin key risk’.
Admin key risk is the risk that the original deployers of a contract hold the admin keys to the contract, and thus aren’t trustless because it fails John Adlers rule #2: no one else can access your money.
Composability is the main reason why DeFi is so powerful, however it also means that simply removing admin keys does not mean that we have solved the second rule.
In other words, composability makes solving rule #2 much harder than simply removing admin keys—it adds a ton of new possible attack vectors that requires further hardening of a protocol in order to minimize user assumptions.
One More Time
We now see this conversation playing out once again with the Harvest.Finance attack that occurred last night.
Harvest.Finance—a yield aggregating protocol competing with yEarn—was a victim of an exploit that drained the contracts of $24M USD in stablecoins. The attacker then flushed these funds through RenBTC to wash the stolen funds.
Once again, we are now seeing this same conversation play out with the Farm exploit that occurred last night. But now, we can move though the regular BS of was it a hack? or an exploit? or arbitrage? and skip straight to it doesn’t matter, it wasn’t used as intended.
Scott Lewis of DeFi Pulse labels this as ‘a crime’.
While I agree with Scott here, I also want to de-emphasize the importance of it being ‘a crime’.
Courts and laws are for the world of subjectivity. Ethereum and smart contracts are for the world of objectivity.
According to Ethereum, code is law. Therefore, all protocols need operate under this assumption. If we want a trustless financial system to come to fruition, the only assumption that can be made is that openly-verifiable code is law, and that your protocol isn’t going to be protected by the social layer of the world.
No one is coming to save your contracts from exploits, so you better remove all possible trust assumptions before someone exploits all your value.
DeFi isn’t taking over the world until all assumptions have been removed.
Once this happens, then DeFi is truly unstoppable 🚀
-David