Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

Launching a Validator Code of Conduct for MEV Ethics

A framework for creating and implementing a formal code of conduct for validators to govern MEV extraction practices, including drafting, socialization, and integration into reputation systems.
Chainscore © 2026
introduction
ETHICS

Introduction to MEV and Validator Responsibility

This guide explains the role of validators in the context of Maximal Extractable Value (MEV), detailing the ethical considerations and proposing a framework for a Validator Code of Conduct.

Maximal Extractable Value (MEV) refers to the profit that can be extracted by reordering, including, or censoring transactions within a block. While often associated with arbitrage and liquidations, MEV also enables harmful practices like frontrunning and sandwich attacks, which degrade the user experience and can be considered a form of theft. As the entities responsible for block production, validators on networks like Ethereum are the ultimate arbiters of transaction ordering and inclusion, placing them at the center of the MEV supply chain. Their technical capabilities grant them significant power, which comes with a responsibility to the health of the network and its users.

A validator's primary duty is to secure the network by honestly following the consensus protocol. However, the protocol is largely agnostic to how transactions within a block are ordered. This creates an ethical gray area. Validators can choose to run MEV-Boost software to outsource block building to a competitive marketplace of builders, often capturing more rewards. The builders, in turn, may employ searchers who use sophisticated algorithms to identify and exploit MEV opportunities. While this ecosystem can increase validator revenue and network efficiency, it also means validators are financially incentivizing potentially harmful extraction strategies by selecting the most profitable block.

This conflict of interest necessitates a Validator Code of Conduct. Such a code is not a protocol rule but a social and operational framework adopted by solo stakers, staking pools, and institutional operators. It serves to align validator actions with the long-term health of the ecosystem. Key pillars of a responsible code include: transparency (disclosing MEV strategies and relay usage), user protection (avoiding or mitigating harmful MEV like sandwich attacks), censorship resistance (committing to including valid transactions regardless of origin), and decentralization (supporting a diverse set of block builders and relays to avoid centralization risks).

Implementing this code involves concrete technical and operational choices. Validators can configure their MEV-Boost relay list to exclude relays that are known to facilitate harmful MEV or that have excessive market share. They can also run mev-geth or similar software with modified transaction ordering policies (like first-come-first-served) for their local block production. Furthermore, committing to these principles publicly—for example, by signing a message like "I am a neutral validator"—builds trust with users and delegators. Projects like Ethereum's Pledge provide a template for such commitments.

The economic argument for ethical validation is strong. While exploiting every MEV opportunity might maximize short-term revenue, it erodes user trust and network value over time. Networks perceived as unfair or predatory will struggle to attract and retain users and developers. By adopting a code of conduct, validators invest in the sustainability and credible neutrality of the platform, which supports higher long-term token value and staking rewards. It shifts the focus from pure extraction to being a steward of public infrastructure.

Ultimately, validator responsibility in the age of MEV is about recognizing that technical capability does not equate to ethical permission. The community-driven development of norms and codes, supported by tools like SUAVE for fairer transaction ordering and MEV smoothing via proposer-builder separation (PBS), points toward a future where block production can be both profitable and principled. Validators have the unique power to shape this future by the choices they make in their node configurations and their alliances within the MEV supply chain.

prerequisites
MEV ETHICS

Prerequisites and Stakeholder Alignment

Before drafting a validator code of conduct, establish a clear foundation of technical understanding and consensus among key participants.

A validator's ability to extract MEV is a direct function of its technical stack and operational practices. The first prerequisite is a thorough audit of your infrastructure. This includes the execution client (e.g., Geth, Nethermind), consensus client (e.g., Lighthouse, Teku), and any MEV-boost relay integrations. You must understand the exact data flow: how transactions are received from the public mempool or private channels, how blocks are proposed, and which software components have the final authority to reorder or censor transactions. Documenting this architecture is essential for identifying ethical decision points.

Stakeholder alignment is critical, as MEV decisions impact more than just the validator operator. Key groups include the validator entity's governance (e.g., DAO, foundation, corporate board), its delegators or stakers who provide capital, and the broader protocol community. Each group may have different risk tolerances and ethical priorities. Formalize this alignment through internal proposals, governance votes, or explicit delegation of authority. For example, a decentralized autonomous organization (DAO) running validators might pass a snapshot vote to prohibit participating in sandwich attacks, binding the operator team to that policy.

Finally, establish a baseline of MEV literacy. The code of conduct should define the specific MEV strategies it addresses, using clear, technical terminology. Distinguish between permissionless MEV (e.g., arbitrage, liquidations) and malicious MEV (e.g., time-bandit attacks, consensus-level manipulation). Reference existing frameworks like the Flashbots Pledge or Ethereum's Builder Guidelines to ground your principles in community efforts. This shared understanding ensures that when the code prohibits "exploitative MEV," all stakeholders and the public interpret it consistently, based on the predefined technical criteria.

key-concepts
MEV ETHICS

Core Concepts for a Code of Conduct

Key principles and technical frameworks for validators to establish ethical guidelines around Maximal Extractable Value (MEV).

01

Understanding MEV and Validator Roles

Maximal Extractable Value (MEV) is profit validators can earn by reordering, including, or censoring transactions. A code of conduct defines a validator's stance on these actions. Key concepts include:

  • Proposer-Builder Separation (PBS): Separates block building from block proposing.
  • MEV-Boost: A middleware that allows validators to outsource block building to specialized searchers.
  • Censorship Resistance: The principle of not excluding valid transactions based on origin or content. A clear policy helps validators navigate the trade-offs between profit, network health, and decentralization.
02

The Builder Ecosystem and OFAC Compliance

Validators using MEV-Boost receive blocks from a competitive builder market. Some builders filter transactions to comply with sanctions lists (e.g., OFAC). A code of conduct must address this:

  • OFAC-compliant Builders: Builders like BloXroute Max Profit and Titan Builder may censor specific addresses.
  • Neutral Builders: Builders like rsync and ultrasound.money typically do not apply censorship.
  • Relay Policies: Relays (e.g., Flashbots Protect, Agnostic Gnosis) enforce builder rules. Validators must choose relays aligned with their ethics.
03

Commitment to Censorship Resistance

A strong ethical stance prioritizes transaction inclusion. Technical implementations include:

  • Running a Neutral Builder: Operating your own MEV-Boost builder (e.g., using mev-boost software) to create uncensored blocks.
  • Relay Selection: Configuring your validator client to only connect to relays that do not enforce censorship, such as the Agnostic Gnosis Relay.
  • Fallback Mechanisms: Setting a local block production fallback in your execution client (e.g., Geth, Nethermind) to propose a block if all received bids are censored.
04

Transparency and Public Commitment

Publicly declaring your validator's MEV policy builds trust. This involves:

  • On-Chain Registration: Using the Ethereum Attestation Service (EAS) to create a verifiable, timestamped attestation of your code of conduct.
  • Client Configuration Transparency: Publishing your mev-boost and validator client settings (e.g., relay URLs) in a public repository.
  • Monitoring and Reporting: Using tools like mevwatch.info to audit your proposed blocks for censorship and publishing regular reports. Transparency allows delegators and the community to hold validators accountable.
05

Economic Incentives and Slashing Risks

Ethical choices have economic consequences. A code of conduct should acknowledge these trade-offs:

  • Revenue Impact: Choosing only neutral builders/relays may reduce MEV rewards by 5-20% compared to using top-paying, compliant options.
  • Slashing Risks: Modifying client software for ethical purposes (e.g., custom fork choice rules) must be done carefully to avoid slashing penalties.
  • Delegator Expectations: Staking pool operators must communicate policies clearly, as they impact rewards for thousands of ETH stakers.
06

Implementing with Client Software

Your code of conduct is enforced through validator client configuration. Key steps include:

  • Lighthouse/Prysm/Teku/Nimbus Configuration: Setting the --builder and --relays flags to specify your chosen, ethics-aligned endpoints.
  • MEV-Boost Configuration: Running mev-boost with flags like -relay-check to verify relay status.
  • Monitoring Setup: Integrating with Prometheus/Grafana dashboards to track metrics like received_bids and blocks_proposed by relay source. Documenting this setup is a critical part of operationalizing your ethics.
drafting-process
FOUNDATIONAL PRINCIPLES

Step 1: Drafting the Code of Conduct

A well-defined Code of Conduct establishes the ethical and operational foundation for your validator, setting clear expectations for MEV-related activities.

The first step in launching an ethical validator is to draft a public Code of Conduct. This document serves as your validator's public commitment to specific Maximum Extractable Value (MEV) practices. It should clearly state your stance on critical issues like transaction ordering, frontrunning, and sandwich attacks. A transparent code builds trust with delegators and the broader network by signaling that your operations prioritize network health and fairness over maximal profit extraction. Think of it as your validator's public manifesto for ethical block production.

Your code should define specific, actionable policies. For example, you might commit to: - Not executing sandwich attacks against user transactions. - Implementing fair ordering techniques, such as first-come-first-served (FCFS) for the public mempool. - Disclosing any use of private order-flow channels or partnerships with searchers. - Publishing regular transparency reports on blocks proposed. These concrete rules move beyond vague principles and provide a measurable standard for your validator's behavior, which is essential for accountability.

Incorporate technical governance by specifying how the code will be enforced and updated. Will you use an on-chain voting mechanism for your delegators to approve changes? How will you handle violations or edge cases? Reference existing frameworks like the Ethereum Builder's Pledge or Flashbots' SUAVE principles for inspiration. Clearly state the consequences for breaching the code, such as slashing a portion of rewards or initiating an unbonding period. This section transforms your code from a statement of intent into a functional governance document.

Finally, publish your Code of Conduct in an immutable, accessible location. Common practices include hosting it on your validator's website, storing a hash of the document on-chain (e.g., via IPFS and Ethereum calldata), and linking to it from your validator's description on staking interfaces like Lido or Rocket Pool. This ensures delegators can easily verify your commitments and holds you accountable to the public standards you've set. The act of publishing completes the first critical step toward operationalizing MEV ethics.

technical-implementation
VALIDATOR OPERATIONS

Step 2: Technical Implementation and Monitoring

This guide details the technical steps for implementing a validator code of conduct, focusing on MEV-Boost relay configuration, monitoring tools, and enforcement mechanisms.

The core of a technical MEV code of conduct is your validator's configuration. For Ethereum validators using MEV-Boost, this primarily involves your choice of relay. Relays are intermediaries that receive blocks from builders and forward them to validators. To enforce ethical standards, you must configure your validator client (e.g., Prysm, Lighthouse) to connect only to relays that enforce your chosen policies. This is done by editing the --builder or MEV-BOOST_RELAYS flag in your client configuration to include only the URLs of compliant relays, such as those that filter for censorship resistance or transparent fee structures.

Once configured, continuous monitoring is essential. You need to verify that your validator is consistently proposing blocks that align with your stated ethics. Tools like Rated.Network and EigenPhi provide analytics on validator performance, including MEV rewards and the sources of proposed blocks. You should regularly audit your validator's proposals to ensure they are sourced from your approved relays. Furthermore, monitoring the relays themselves is critical; track their public dashboards and announcements for any changes to their builder inclusion policies or fee models that might violate your code.

For sophisticated operators, on-chain enforcement can be achieved through smart contract-based slashing conditions or using services like EigenLayer. By restaking ETH via EigenLayer, you can cryptographically commit to a set of rules (an "AVS" - Actively Validated Service) that, if violated, could result in the slashing of your restaked assets. While this is an emerging field, it represents the most credible form of commitment. A simpler, immediate step is public attestation: publishing your validator's public keys and signed message committing to your code of conduct on a platform like Code4rena or in your GitHub repository creates verifiable, on-chain proof of your intent.

VALIDATOR ETHICS FRAMEWORK

MEV Practice Classification Matrix

A framework for validators to categorize and evaluate common MEV extraction strategies based on their ethical impact and network health.

MEV PracticeEthical ClassificationNetwork ImpactValidator Action

Arbitrage (Cross-DEX)

Neutral

Positive (Price Efficiency)

Liquidations (On-Chain)

Neutral

Positive (Risk Management)

Sandwich Attacks

Unethical

Negative (User Harm)

Time-Bandit Attacks

Unethical

Negative (Chain Reorg Risk)

Long-Term Reorgs (>5 blocks)

Malicious

Critical (Network Instability)

Transaction Privacy (e.g., SUAVE)

Beneficial

Positive (User Protection)

Censorship of OFAC-sanctioned TXs

Contentious

Negative (Decentralization)

socialization-enforcement
LAUNCHING A VALIDATOR CODE OF CONDUCT FOR MEV ETHICS

Step 3: Socialization and Enforcement Mechanisms

A code of conduct is only effective if it is widely adopted and actively enforced. This step focuses on integrating the principles into validator operations and establishing clear consequences for violations.

Socialization begins with internal adoption. Validator operators must integrate the code of conduct into their standard operating procedures (SOPs). This includes training for all team members on MEV ethics, updating internal documentation, and configuring monitoring tools to flag potential violations like sandwich attacks or time-bandit arbitrage. The goal is to make ethical validation a default, auditable part of the node operation workflow, not an afterthought.

For the code to have network-wide impact, public commitment is essential. Operators should publicly signal their adherence by signing the code with their validator's Ethereum address and publishing it on their website or in their GitHub repository. Aggregators like Rated.Network or Ethereum.org could feature badges for validators who are signatories. This creates a transparent reputation layer, allowing delegators and protocols to make informed choices based on a validator's ethical stance.

A credible enforcement mechanism is critical for trust. The code should define a clear, multi-stage process for handling violations: 1) Verification: An independent committee or oracle (e.g., a group of respected researchers) investigates alleged breaches using on-chain data. 2) Escalation: Verified minor infractions may result in a public warning and a requirement to remediate affected users. 3) Penalties: For severe or repeated violations, the ultimate penalty is the removal of the validator from the signatory list, publicly revoking its ethical status and likely impacting its delegation.

Enforcement can be technically facilitated. While fully automated slashing for MEV extraction is complex, communities can build tooling. For example, a watchdog service could monitor mempools and proposed blocks for known malicious patterns associated with signatory validators. Alerts from this service could trigger the investigative process. The threat of public exposure and delegator exit provides a strong economic disincentive, even without a protocol-level penalty.

The long-term success of this framework depends on its evolution. A decentralized autonomous organization (DAO) composed of signatory validators, researchers, and public delegates should govern the code. This DAO would be responsible for reviewing proposed amendments to the code in response to new MEV techniques, managing the enforcement process, and curating the public list of compliant validators. This ensures the system remains adaptable and community-owned.

tools-resources
MEV ETHICS IMPLEMENTATION

Tools and Implementation Resources

Practical tools and frameworks for implementing ethical MEV practices in validator operations, from policy templates to monitoring software.

onboarding-integration
STEP 4

Integrating into Validator Onboarding

This step details how to formally incorporate a Code of Conduct into your validator onboarding process, ensuring new operators understand and commit to ethical MEV practices from day one.

A validator Code of Conduct is only effective if it is a mandatory, reviewed component of your onboarding workflow. This integration ensures that every new operator joining your pool or protocol explicitly acknowledges the ethical framework governing their role. The process should be as fundamental as setting up the validator's keys and configuring their client. This formalizes the commitment, moving ethics from an abstract concept to a concrete operational requirement. It also provides a clear reference point for accountability and future discussions about validator behavior.

The integration typically involves several key components. First, the Code document itself must be hosted in an accessible, version-controlled location, such as a dedicated repository or a page in your protocol's documentation. Second, you need to create an acknowledgment mechanism. This could be a signed message from the validator's operational Ethereum address, a checkbox in a web-based onboarding dashboard, or a required step in a CLI setup script. The mechanism should cryptographically or procedurally link the validator's identity to their agreement.

For technical integration, consider adding a check within your onboarding scripts. For example, a CLI tool could require the validator to sign a message containing the Code's hash. Here's a conceptual snippet using the eth-sig-util library for an EIP-712 structured signature:

javascript
const typedData = {
  domain: { name: 'ValidatorOnboarding', version: '1' },
  message: {
    validator: '0xValidatorAddress',
    codeOfConductHash: '0xabc123...',
    agreedTimestamp: Math.floor(Date.now() / 1000)
  },
  primaryType: 'CodeOfConductAgreement',
  types: {
    EIP712Domain: [
      { name: 'name', type: 'string' },
      { name: 'version', type: 'string' }
    ],
    CodeOfConductAgreement: [
      { name: 'validator', type: 'address' },
      { name: 'codeOfConductHash', type: 'bytes32' },
      { name: 'agreedTimestamp', type: 'uint256' }
    ]
  }
};
// The validator signs this data with their private key
const signature = signTypedData(privateKey, { data: typedData });

This creates a verifiable, on-chain attestation of their agreement.

Finally, document this process clearly for applicants. The onboarding guide should explain why the Code exists, link to the full text, and walk through the agreement steps. This transparency builds trust and sets the correct cultural tone from the outset. By embedding the Code of Conduct into the technical and procedural fabric of onboarding, you establish MEV ethics as a non-negotiable pillar of your validator operations, aligning individual incentives with the long-term health of the network.

MEV & VALIDATOR CONDUCT

Frequently Asked Questions

Common questions for developers and node operators implementing ethical MEV practices within a validator code of conduct.

MEV (Maximal Extractable Value) is the profit a validator can earn by reordering, including, or censoring transactions within a block they produce. While MEV is inherent to permissionless blockchains, it creates systemic risks:

  • Network Instability: Bidding wars for block space can cause gas price spikes and network congestion.
  • Censorship: Validators can exclude transactions from certain users or protocols.
  • Centralization: The high cost of MEV extraction hardware and strategies can push out smaller operators.

A validator code of conduct addresses these concerns by establishing transparent, fair rules for handling transaction ordering, moving beyond a purely profit-maximizing approach.

conclusion
IMPLEMENTING ETHICAL MEV

Conclusion and Next Steps

This guide has outlined the technical and ethical framework for building a validator code of conduct. The final step is implementation and community engagement.

Launching a code of conduct is a technical and social commitment. Begin by publishing your finalized document on a public repository like GitHub, using a versioning system to track changes. Announce it on your validator's website and social channels, clearly stating the core principles: - Commitment to fair ordering - Transparency in MEV revenue - Non-collusion with other validators. This public declaration creates accountability and allows the community to monitor your adherence.

To operationalize these principles, integrate monitoring tools into your infrastructure. Use services like EigenPhi or Flashbots MEV-Explore to audit your proposed blocks for sandwich attacks or other harmful MEV extraction. Implement internal alerts for suspicious transaction patterns. For technical enforcement, consider running modified client software like Flashbots MEV-Boost with ethical relays that filter out harmful bundles, or explore the SUAVE ecosystem for decentralized, programmable block building that aligns with your stated ethics.

The next evolution is contributing to and adopting standardized frameworks. Engage with initiatives like the Collective Alignment Institute's MEV Code of Conduct or Ethereum's PEPC (Proposer/Builder Separation) working group. These efforts aim to create network-level social consensus and potential protocol changes, such as inclusion lists or encrypted mempools, that make ethical validation easier. Your practical experience running a compliant node provides valuable data for these discussions.

Finally, measure and report on your impact. Publish periodic transparency reports detailing your MEV revenue sources, block inclusion statistics, and any instances where you rejected harmful transactions. This builds trust with delegators and the broader ecosystem. Remember, a code of conduct is a living document; be prepared to update it as new MEV techniques and mitigation strategies emerge from ongoing research in the community.