Skip to main content

Quick Start

This quickstart guide contains all the information necessary to get up and running as a searcher on Eden.

How does Eden work for searchers?

Eden connects searchers directly to block builders and allows them to avoid the public tx pool. Searchers with transactions they would like to send block builders first craft what we call "bundles" and send these to the Eden Bundles RPC. Eden Bundles RPC is a gateway that Eden runs today which simulates searchers' bundles, and if there are no errors then forwards them on to block builders. Block builders then receive bundles and include them in blocks if it is profitable for them to do so.

Getting onboarded to Eden is easy for searchers; you simply need to update how you send transactions.

How to send your first Eden bundle

To access Eden Network you will need three things:

  1. A private key that you use to sign your bundles
  2. A way to interact with Eden
  3. A "bundle" for your transactions

When you send bundles to Eden you will sign them with a private key so that we can establish identity for searchers and establish reputation for them over time. This private key does not store funds and is not the primary private key you use for executing transactions. Again, it is only used for identity, and it can be any private key.

Second, you'll need a way to interact with Eden. Eden runs a relay you will send bundles to at https://api.edennetwork.io/v1/bundle. You can choose to send bundles directly to this endpoint or use SDKs for popular libraries like Ethers.js or web3.py to make interacting with Eden Bundles RPC as easy as possible. Here are a few examples of how to set up an Eden provider:

const ethers = require("ethers.js");
const {
FlashbotsBundleProvider,
} = require("@flashbots/ethers-provider-bundle");
const provider = new ethers.providers.JsonRpcProvider({
url: ETHEREUM_RPC_URL,
});
// Standard json rpc provider directly from ethers.js. For example you can use Infura, Alchemy, or your own node.

const authSigner = new ethers.Wallet(
"0x0000000000000000000000000000000000000000000000000000000000000000"
);
// `authSigner` is an Ethereum private key that does NOT store funds and is NOT your bot's primary key.
// This is an identifying key for signing payloads to establish reputation and whitelisting

const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
authSigner
);
// Flashbots provider requires passing in a standard provider and an auth signer

Now that we have a private key to identify ourselves with and a bundle provider we can create and send a bundle. Here's an example in node.js

const ethers = require("ethers.js");
const {
FlashbotsBundleProvider,
} = require("@flashbots/ethers-provider-bundle");
const provider = new ethers.providers.JsonRpcProvider({
url: ETHEREUM_RPC_URL,
});

const authSigner = new ethers.Wallet(
"0x2000000000000000000000000000000000000000000000000000000000000000"
);
const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
authSigner
);

const signedBundle = await flashbotsProvider.signBundle([
{
signer: SOME_SIGNER_TO_SEND_FROM,
transaction: SOME_TRANSACTION_TO_SEND,
},
]);

const bundleReceipt = await flashbotsProvider.sendRawBundle(
signedBundle,
TARGET_BLOCK_NUMBER
);

That's it!

What's Next

Congrats! You should now have everything you need to start sending transactions to the Eden Network.

Keep reading about: