Created on 10th June 2023
•
EVMMAX (Modular Arithmetic Extensions) is a small extension to the EVM, introducing only ~6 new instructions. These can be used to implement features in contracts which were not possible before, and were depending on the introduction of so-called precompiles.
Including a "precompile" in Ethereum mainnet is a very long and thorough process. For example the features for working with the BLS12-381 curve (a neccesity for many ZK projects and also used by the beacon chain) has been proposed in 2020 and heavily debated since, yet they are not even slated from the Cancun release.
With the simple instruction set of EVMMAX it is possible to implement them without requiring a protocol update. Furthermore, a number of other precompiles or useful features can be implemented too, to name a few: secp256k1 ecrecover, bn128/bn254 precompiles (used by mainnet zk projects), modexp (including rsa verification used by ENS), mimc/poseidon hashes (also used by zk projects), etc.
EVMMAX has been under discussion for a while with various improved versions. In early 2021 we have showcased a demo implementing BLS12 operations (but it was not design to be production ready) and later a MiMC hash, which was beating the existing implementations.
Over this weekend we worked on replacing the ecrecover precompile, which is heavily used for signature verification, to showcase the maturity of the EVMMAX design. The goal was to create a production grade implementation. This was accomplished over 2 days (Friday/Saturday) and by end of Saturday the implementation is able to pass all the Ethereum State Tests, officially marking it "production grade".
Tracks Applied (1)