Skip to content

Eclipse-Laboratories-Inc/mev-internalization-and-ass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEV Internalization and ACS Demo

On a blockchain with priority ordering, developers can enforce sequencing rules via Application Controlled Scheduling (ACS) and internalize MEV. The underlying principle and mechanisms are detailed here: ACS and MEV Internalization

Program

This repo hosts a program written with the Pinocchio framework that demonstrates how to implement ACS and MEV Internalization in SVM programs. It is written in the Blueshift Pinocchio 101 pattern (even when inconvineient) to maximize familiarity for developers.

Cost

The CU cost is (relatively) extremely cheap:

  • For ACS it costs < 180 CUs.
  • For MEV Internalization, it costs between 300 and 400 CUs.

For more details, refer to the blog post linked above.

Testing

To run the tests, you need a full Solana validator environment or at least the instructions sysvar and system program. For that reason, the tests are designed for the solana-test-validator environment that comes bundled with the Solana CLI.

Thus the Solana CLI is a pre-requisite to reproduce the results.

To reproduce the tests:

  1. Start the test validator with:
    solana-test-validator

Note that this will store the ledger in the current directory.

  1. Change into the demo directory
    cd demo
  1. Deploy the prebuilt program to the test validator with:
solana program deploy ./mev_internalization_and_acs.so --program-id keypair.json -u http://localhost:8899

You can also rebuild the program from source with cargo build-sbf and deploy the new binary.

  1. Run the tests with:
cargo test

The results can be viewed on the Solana Explorer pointing to local host as the cluster URL. Note that the test validator must be running to view the results.

  1. Terminate the test validator process

About

MEV Internalization and ASS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages