Introduction

Learn how to customize the Ethereum Virtual Machine with EVM and Precompiles.

Welcome to the EVM customization guide. This documentation provides an overview of EVM, the purpose of Validator Manager Contracts, the capabilities of precompiles, and how you can create custom precompiles to extend the functionality of the Ethereum Virtual Machine (EVM).

Overview of EVM

EVM is Avalanche's customized version of the Ethereum Virtual Machine, tailored to run on Avalanche L1s. It allows developers to deploy Solidity smart contracts with enhanced capabilities, benefiting from Avalanche's high throughput and low latency. EVM enables more flexibility and performance optimizations compared to the standard EVM.

Validator Manager Contracts

Validator Manager Contracts (VMCs) are smart contracts that manage the validators of an L1. They allow you to define rules and criteria for validator participation directly within smart contracts. VMCs enable dynamic validator sets, making it easier to add or remove validators without requiring a network restart. This provides greater control over the L1's validator management and enhances network governance.

Precompiles

Precompiles are specialized smart contracts that execute native Go code within the EVM context. They act as a bridge between Solidity and lower-level functionalities, allowing for performance optimizations and access to features not available in Solidity alone.

Default Precompiles in EVM

EVM comes with a set of default precompiles that extend the EVM's functionality. For detailed documentation on each precompile, visit the Avalanche L1s Precompiles section:

Custom Precompiles

One of the powerful features of EVM is the ability to create custom precompiles. By writing Go code and integrating it as a precompile, you can extend the EVM's functionality to suit specific use cases. Custom precompiles allow you to:

  • Achieve higher performance for computationally intensive tasks.
  • Access lower-level system functions not available in Solidity.
  • Implement custom cryptographic functions or algorithms.
  • Interact with external systems or data sources.

Creating custom precompiles opens up a wide range of possibilities for developers to optimize and expand their decentralized applications on Avalanche L1s.

By leveraging EVM, Validator Manager Contracts, and precompiles, you can build customized and efficient decentralized applications with greater control and enhanced functionality. Explore the following sections to learn how to implement and utilize these powerful features.

Is this guide helpful?

On this page