Skip to content

Commit

Permalink
Remove examples, clarify some of the sections content
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Mar 6, 2025
1 parent 8e9e6a1 commit 91dc66c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 94 deletions.
47 changes: 0 additions & 47 deletions docs/oev-searchers/in-depth/examples.md

This file was deleted.

40 changes: 18 additions & 22 deletions docs/oev-searchers/in-depth/mev-with-signed-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ outline: deep

An intermediate step towards OEV searching is to extend MEV bots to utilize the
public
[base feed endpoints](/oev-searchers/in-depth/data-feeds/#base-feed-endpoints). These
endpoints are also used by the Api3 push oracle, so there is tight competition
to be the fastest with the on-chain transaction.
[base feed endpoints](/oev-searchers/in-depth/data-feeds/#base-feed-endpoints). This data is delayed compared to data in the [OEV endpoints](/oev-searchers/in-depth/data-feeds/#oev-endpoints), so it's expected searchers won't be able to extract much value this way. That said, it is a good backup in case OEV auctions are paused or encountering unexpected technical issues. It also the only way to extract value for [legacy integrations](/oev-searchers/in-depth/#legacy-integrations).

The existing MEV bot can utilize this off-chain open-source data and make a base
The existing MEV bot can utilize the off-chain open-source data and make a base
feed update on-chain whenever there is OEV to be captured. Refer to
[updating data feed value](/oev-searchers/in-depth/data-feeds/#updating-data-feed-value)
section for more details.
Expand All @@ -24,32 +22,35 @@ feed update (which is permissionless for base feeds) to determine OEV
opportunities more easily. This is a direct improvement over monitoring data
source values and predicting the next oracle update.

This solution is also a backup in case OEV is down or under maintenance.
::: info 💰 Financial

## Monitoring signed data
This improvement on its own provides a major competitive advantage over existing MEV competition and leads to a significant increase in profits. That said, this strategy will not work when the competition is doing OEV searching.

:::

## Monitor signed data

First, searchers need to have a list of data feeds used by the dApp and
[obtain its beacons](/oev-searchers/in-depth/data-feed/#dapp-sources). Note that
this operation can be heavily cached because they change only when the
underlying base feed changes, which happens only when a dAPI is reconfigured.
this can be cached because beacons change only when the
underlying base feed dAPI changes, which happens rarely, only when a dAPI is reconfigured.

Once the list of base feed beacons is known, searchers should periodically call
the public
[base feed endpoints](/oev-searchers/in-depth/data-feeds/#base-feed-endpoints) to get
the real-time values for the base feed beacons used by the dApp. This data may
be used immediately to look for OEV opportunities.

## Simulating a data feed update
## Simulate a data feed update

Assuming a searcher called the Signed APIs and has valid data to update the base
feed, they can use them to simulate the data feed update on-chain followed by a
call to check for OEV opportunities.

The code below demonstrates how this process can be implemented in JavaScript
with the ethers library for an imaginary liquidation protocol. Note that this
code makes use of variables that are not defined in the code snippet. Their
purpose can be understood from the context and is left out to keep the example
concise and focused on the general idea.
with the `ethers` library for an imaginary liquidation protocol. Note that this
code makes use of variables that are not defined in the context of the code snippet for brevity. Their
purpose can be understood from the context. The snippet makes use of a well-known [Multicall3 contract](https://www.multicall3.com/).

```javascript
const beaconsIds = []; // Assume the data feed is a beacon set with these beacons
Expand Down Expand Up @@ -98,13 +99,8 @@ staticcall.
Note that the signed data for base feeds is delayed to ensure OEV searchers have
exclusive priority for OEV extraction.

## Example

One can refer to the
[OEV v1 Compound example bot](https://github.com/api3dao/oev-v1-compound-bot/tree/mev-with-signed-apis)
and inspect the
[changes](https://github.com/api3dao/oev-v1-compound-bot/compare/mev...mev-with-signed-apis)
needed to migrate the MEV bot to MEV with Signed APIs bot.
## Reference implementation

The bot is configured to run against a forked Compound3 protocol on Base
network. Follow the description in the README for details.
- [Example OEV Compound bot](https://github.com/api3dao/oev-v1-compound-bot/tree/mev-with-signed-apis) - You can also inspect the
[changes](https://github.com/api3dao/oev-v1-compound-bot/compare/mev...mev-with-signed-apis)
needed to add the MEV with Signed APIs functionality to an existing MEV bot.
14 changes: 6 additions & 8 deletions docs/oev-searchers/in-depth/oev-network/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ outline: deep
![OEV Network image](./oev-network.svg)

The OEV Network operates as a standard Arbitrum Nitro L2 optimistic-rollup. The
system ensures transparency and allows verification of the auction process. In
this marketplace, OEV searchers place bids for the exclusive opportunity to
update dApp's data feeds for a short period of time.
system ensures transparency and allows verification of the auction process. It allows searchers to place bids for the exclusive opportunity to
update a dApp's data feeds for a short period of time.

By hosting auctions on-chain, we address two big issues:

Expand All @@ -23,7 +22,7 @@ By hosting auctions on-chain, we address two big issues:
long-solved problem in blockchains through gas fees.
2. Transparency - Auctions are awarded via an off-chain system, called OEV
Auctioneer, so it is important to be able to reason about the correctness of
auction outcomes. Blockchains are the perfect tool for this, as all the data
auction outcomes. Blockchains are the perfect tool for this, as all the transactions and data
is public and verifiable.

To participate in auctions, searchers need to have a sufficient amount of ETH
Expand All @@ -32,7 +31,7 @@ bridged to the OEV network and interact with the

## Using the OEV Network

The OEV Network can be added as a custom network to an EVM compatible wallet.
The OEV Network can be added as a custom network to any EVM compatible wallet.

| Details | Value |
| ------------------ | ------------------------------ |
Expand All @@ -52,7 +51,7 @@ Here are some of the key properties of the OEV Network:
250ms. Note that the OEV Network only produces blocks when there are
transactions.
2. Gas fees - The gas fees are paid in ETH, and because the network is an
optimistic L2 rollup, the gas fees are low.
optimistic L2 rollup, the gas fees are low and get cheaper with the increased number of transactions.
3. Using Anytrust - By using AnyTrust DAC, the OEV Network achieves further cost
reduction.

Expand Down Expand Up @@ -174,8 +173,7 @@ function withdraw(
### Collateral and protocol fee

For a searcher to win an auction, they are required to have enough ETH deposited
in the OevAuctionHouse contract. Similarly, the value the searcher can win is
limited by the amount they have deposited. Refer to
in the OevAuctionHouse contract. Refer to
[bid eligibility](/oev-searchers/in-depth/oev-auctioneer#bid-eligibility)
section for details.

Expand Down
17 changes: 5 additions & 12 deletions docs/oev-searchers/in-depth/oev-searching.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,8 @@ To open a dispute, head to the
[OEV Discord channel](https://discord.com/channels/758003776174030948/1062909222347603989)
and create a post with the description of the dispute.

## Example

One can refer to the
[OEV v1 Compound example bot](https://github.com/api3dao/oev-v1-compound-bot)
and inspect the
[changes](https://github.com/api3dao/oev-v1-compound-bot/compare/mev-with-signed-apis...oev)
needed to migrate the
[MEV with Signed APIs](/oev-searchers/in-depth/mev-with-signed-apis) bot to OEV
bot.

The bot is configured to run against a forked Compound3 protocol on Base
network. Follow the description in the README for details.
## Reference implementation

- [Example OEV Compound bot](https://github.com/api3dao/oev-v1-compound-bot) - You can also inspect the
[changes](https://github.com/api3dao/oev-v1-compound-bot/compare/mev-with-signed-apis...oev)
needed to add the OEV functionality to an existing bot supporting [MEV with Signed APIs](/oev-searchers/in-depth/mev-with-signed-apis).
2 changes: 1 addition & 1 deletion docs/oev-searchers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bound by rules enforced on-chain. The auction winner must pay the announced
amount, which in return allows them to perform the oracle update and capture
profitable opportunities.

## Example
## Practical example

Imagine an overcollateralized lending platform that uses Api3 price feeds.
Borrowers in the protocol can be liquidated with an incentive whenever their
Expand Down
4 changes: 0 additions & 4 deletions docs/oev-searchers/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ module.exports = [
text: 'OEV searching',
link: '/oev-searchers/in-depth/oev-searching',
},
{
text: 'Examples',
link: '/oev-searchers/in-depth/examples',
},
],
},
{
Expand Down

0 comments on commit 91dc66c

Please sign in to comment.