Home

Awesome

Flashbots Protect RPC Endpoint

Test status standard-readme compliant Discord

This repository contains code for a server which can be used as an RPC endpoint in popular Ethereum wallets.

The endpoint is live at https://rpc.flashbots.net/

It does two basic things:

There are a few key benefits to using the Flashbots RPC endpoint:

Privacy notice: rpc-endpoint does not track, store or log any kind of user information (i.e. IP, location, etc.).

Transaction Status Check

If a transaction is sent to the Flashbots relay instead of the public mempool, you cannot see the status on Etherscan or other explorers. Flashbots provides a Protect Transaction API to get the status of these private transactions: https://protect.flashbots.net/

Transaction Frontrunning Protection Evaluation Rules

Not all transactions need frontrunning protection, and in fact some transactions cannot be sent to Flashbots at all. To reflect this we evaluate transactions in two ways:

We're open to new ways of evaluating what needs frontrunning protection and welcome PRs to this end.

Usage

To send your transactions through the Flashbots Protect RPC please refer to the quick-start guide.

To run the server, run the following command:

go run cmd/server/main.go -redis REDIS_URL -signingKey ETH_PRIVATE_KEY -proxy PROXY_URL

# For development, you can use built-in redis and create a random signing key
go run cmd/server/main.go -redis dev -signingKey dev -proxy PROXY_URL

# You can use the DEBUG_DONT_SEND_RAWTX to skip sending transactions anywhere (useful for local testing):
DEBUG_DONT_SEND_RAWTX=1 go run cmd/server/main.go -redis dev -signingKey dev -proxy PROXY_URL

Example Single request:

curl localhost:9000 -f -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}'

Contributing

Flashbots is a research and development collective working on mitigating the negative externalities of decentralized economies. We contribute with the larger free software community to illuminate the dark forest.

You are welcome here <3.

Send a pull request

We appreciate your contributions <3

Please install staticcheck (go install honnef.co/go/tools/cmd/staticcheck@master) and run make lint before submitting a PR.

Security

If you find a security vulnerability on this project or any other initiative related to Flashbots, please let us know sending an email to security@flashbots.net.

License

The code in this project is free software under the MIT license.


Made with ☀️ by the ⚡🤖 collective.