October 17, 2023

Becoming a Blockchain Security Engineer

EMURGO

Becoming-a-Blockchain-Security-Engineer-1

Overseeing blockchain security is another crucial part of blockchain development that is handled by blockchain security engineers and developers. After dApp developers have finished creating a product, the dApp product must go through an auditing process to check the dApp’s code for potential bugs and security flaws. This audit makes the dApp safer and more trustworthy for the general public to use upon release.

The engineers who do these security audits are some of the most specialized in the blockchain industry. As such, some of the highest paying jobs for a blockchain developer are as an auditing specialist or blockchain security engineer. 

In this blog as part of our Cardano blockchain developer roadmap series, we’ll go over why blockchain audits are needed and also how one becomes a blockchain security engineer. With demand for such roles having quickly grown in recent years, many opportunities have arisen for potential blockchain security engineers and developers specializing in smart contract audits.

Why are blockchain audits needed?
Becoming-a-Blockchain-Security-Engineer-3

Focusing on the Cardano blockchain ecosystem, a dApp built leveraging Cardano is public since the entire Cardano blockchain itself is also open-source and public. This means it can be accessed all year round, which also means it can also be attacked just as often. This has been a reality for most Web3 products such as DeFi and NFTs that utilize smart contracts on public, decentralized blockchains.

According to DeFiLlama, over seven billion dollars have been lost to hacks and exploits in the blockchain industry. This staggering figure serves as a reminder that blockchain networks need to be designed as critical infrastructure. This means projects and their developers need to prioritize security to create a safe experience for their users. 

TVL

Cardano as an open-source decentralized blockchain built with a research-first approach, has emphasized security since the beginning. Much of the reason to use Haskell as its programming language over other computer languages was due to the security properties inherent to functional programming.   

As with dApps on other public blockchains, security should be a foremost priority for any dApp built on Cardano. To achieve this, audits play a major role by identifying potential security vulnerabilities ahead of time to prevent the loss of user funds.

What is a blockchain security audit?
Becoming-a-Blockchain-Security-Engineer-2

A blockchain security audit can largely follow two approaches to verification:

  • Manual review processes
  • Formal verification processes

Manual Verification

In manual verification audits, human auditors review the smart contract’s code and documentation to identify potential vulnerabilities or issues. 

They rely on their expertise, best practices, and coding standards to evaluate the contract’s security. These audits rely heavily on human auditors and their judgment. While tools like static analysis may be used, the process is not entirely automated.

The focus is primarily on known security vulnerabilities, coding best practices, and issues that may arise during contract execution. The scope can be broader but may not cover all possible scenarios. While manual audits can uncover many issues, they cannot guarantee the absence of all vulnerabilities. The results are based on the auditor’s expertise and may be subjective to some extent. However, manual audit reviews are a very effective approach to ensuring security guarantees for the smart contract being audited.

Formal Verification

Formal verification is a process where the attributes of a piece of code are mathematically proven to have certain possible results. It takes a detailed specification of the logic behind the code and identifies security vulnerabilities and incorrect and inefficient coding. 

This method aims to ensure that the contract adheres to its specifications under all possible conditions within the specified constraints, and is free from certain types of bugs and vulnerabilities.

Formal verification relies on automated tools and mathematical proofs to verify the contract’s correctness. This approach can offer a higher degree of assurance in terms of contract behavior. It offers a more rigorous and objective assessment. Finally, it determines ways to resolve the problems.

These audits are very complex and take a deep knowledge of not only a computer language but also the compilation process. To verify the logic of a piece of code, security auditors use a special type of computer language. 

One example of this is Isabelle, a higher-order logic (HOL) theorem prover, written in standard Scala. It’s meant to take the logic of a smart contract and create formal methods that prove a certain piece of code can have many possible outcomes. 

This is then used to see which of the possible outcomes can have detrimental results. The idea is to eliminate or minimize the possibility of a smart contract ending in an outcome not desired by the developers. 

The Haskell language, since it is based on functional programming, lends itself well to these types of proofs. That’s why there is a good pairing of Isabelle and Haskell when it comes to audits for Cardano dApps and the Cardano network. 

How to become a blockchain security engineer
Becoming-a-Blockchain-Security-Engineer-4

The path to a blockchain security engineer or expert is longer and more demanding than any of the previous roles discussed (see on-chain Cardano developer; off-chain Cardano developer; Cardano frontend developer). 

Many blockchain security auditors began their careers as blockchain developers. It is important to first have a background in building dApps before jumping to analyzing their vulnerabilities.

The entry point can be any part of blockchain development from validators (on-chain), to off-chain code, backend, or even frontend development for Cardano. The main part is to be familiar with how dApps are designed and how they are brought into production. The auditor has to have developed a strong understanding of unit testing, property-based testing, and using tools like static security analysis tools where applicable during this process. They should also have a good understanding of production design patterns to achieve a clean, efficient design.

Another key aspect is understanding formal mathematical methods. The entire process of an audit is to take the logic from a piece of code and translate it into a formal language. The result is then analyzed for potential unforeseen outputs from the logic. 

There is a lot of formal logic and mathematics that is required to finish the audit. It’s important to know that to enter this field a developer needs to understand these principles. People aiming to become security auditors should start learning about these systems even before they attempt to make a career change. 

Acquire the skills to become a blockchain security engineer with EMURGO Academy
Blog CTA Banner EMURGO Academy Dark

EMURGO Academy is the education unit of Cardano blockchain founding entity EMURGO and has created a complete, tailored program for students to become specialized Cardano blockchain developers. The program has extensive coverage on unit testing, property-based testing, and security best practices and also has an introduction to Isabelle where participants are exposed to the the basic principles of a security audit. 

The introduction is meant to be a basic exposition of the concepts and application of security audits, not a complete program to become a security auditor. But by showing participants what are the possible uses and how the security industry is evolving, this experience can be used as a stepping stone to becoming a blockchain security engineer.

Enroll now with EMURGO Academy and embark on your journey to working in Cardano and Web3 as a blockchain security expert.

About EMURGO

Disclaimer 

You should not construe any such information or other material as legal, tax, investment, financial, or other advice. Nothing contained herein shall constitute a solicitation, recommendation, endorsement, or offer by EMURGO to invest.

Related articles