Reflecting on the Curve event why we need Runtime Protection

Original author: Carl Hua, partner and CTO of Shima Capital

After the recent Curve reentrancy exploit, I reflect on my time at JPL NASA, where I learned key principles of developing reliable and resilient software. For the crypto industry, these insights are now more important than ever, and here's why:

At the end of the day, there are only two types of software that people really care about: software that can kill you and software that can make you lose money.

The majority of the budget (80%+) of any aerospace machine's critical software is not allocated to development itself, but to integration and testing. If the software fails, flying vehicles fall from the sky — fighter jets, drones, spacecraft, etc.

Most code in aerospace software (if classified as a critical module) adheres to extremely stringent test/development standards, such as DO-178B Level A. Not only does every line of code need to be tested, but if there is nested logic, each logical condition is also specifically tested.

At JPL NASA, the philosophy of writing advanced spaceflight software is not to write the prettiest, cleanest code, but to write code that is easy to unit test. Why? It's simple: when you send a spacecraft into space, you only get one chance, and no one wants to take a risk with a high probability of failure. This is the same logic as blockchains, since immutable code is their important feature, and we only have one chance to spend our funds correctly in each transaction, so why don't we take the process of developing dApps more seriously?

Despite rigorous development, testing, and code auditing processes, these means are clearly not sufficient to mitigate all bugs and attacks, since in fact eliminating all runtime bugs through testing and auditing is next to impossible. So how do we protect our software from failure?

Runtime Protection

Runtime protection is a security technique that protects software applications from malicious attacks while they are running. Its principle is to perform real-time detection when the code is actually running, and analyze the actual behavior of the program to protect the program from malicious data and attacks.

Runtime protections for high-reliability software require significant effort and design because they are the last line of defense to ensure that software does not enter unknown states or fail. This is not just an argument, but decades of proven practice.

Today in Web3, I think DeFi applications need the same high reliability and should consider the same approach. However, due to its potential limitations, the EVM was not designed to handle complex tasks such as runtime protection. So, how do we provide runtime protection?

One way is through Aspect programming, Aspects is designed by the Artela blockchain network, which is able to switch the execution context during the life cycle of any smart contract transaction to perform advanced checks on the real-time state of the program. Artela provides a unique design of runtime protection through Aspect and EVM compatibility, and it has the opportunity to become the future foundation of encrypted smart contract security.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)