Skip to main content

Builder solidity

Builder solidity is solidity with some additional precompiles intended to support MEV applications. Using these precompiles, builder solidity contracts can define how SUAVE nodes run computation, without that computation being done on chain. That is, SUAVE nodes can accept encrypted data from users, do stuff with it privately and only reveal the results, not the inputs.

Why is this cool?​

Builders have no incentive to share the algorithms by which they currently build blocks, so it is hard for searchers to know whether their bundles will be built in the order they submit them, or manipulated. This means that searchers are more likely to send their bundles to the few builders they trust, or only those who consistently build winning blocks (in order to avoid leaking alpha to everyone). This results in block builder centralization over time.

Builders can now use builder solidity to create contracts that specify exactly how they will order bundles (and transactions) sent to them. However, those bundles can be kept confidential: encrypted to the SUAVE node that the builder in question runs. This way, builders can receive bundles and order them in a verifiable and public manner, without ever revealing sensitive transaction data.

Builder solidity is for all kinds of builders though, not just block builders. Builder solidity contracts are a uniform programming model for implementing every component of the transaction supply chain, such that we can ensure that any value created is distributed fairly.

Fairier Transformers

By crafting a network in which the interactions between each participant in the chain above can be encoded in builder solidity contracts, SUAVE becomes open and contestable marketplace for mechanisms. This is because Flashbots need not design the perfect auction structures or fair ordering schemes; smart contract designers are now empowered to, using familiar and open source tools.

The result should be continuous improvement of mechanisms which compete for orderflow, and do so by virtue of the efficiency of their implementation combined with the guarantees their contracts make about how they will distribute value.

This enables us to combine the collective verifiability we expect from public blockchains with the individual privacy we need in order to protect users, defend against malicious MEV, and create provably fair systems which are resilient to economic centralization pressures across time.

Worked examples​

To understand how builder solidity actually works, we recommend that you begin with our MEV-Share worked example.

Further context​

We recommend this early research talk from Andrew Miller to get a sense of the ideas from which builder solidity has grown.

Please note that the pseudo code he shows is now outdated and you are better off learning from our MEV-Share worked example above, or looking directly at our list of available precompiles. That said, the framework he uses in this talk and the background he provides should still prove very useful when writing your own builder solidity contracts.