From 789300f3c6f16a1792da3546c6a531571144d39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Tesa=C5=99?= Date: Tue, 9 Jul 2024 12:02:28 +0200 Subject: [PATCH] Update links (#13) --- README.md | 36 +++++++++++++++++------------------- src/accounts-to-watch.ts | 1 - 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index f681ba8..11d904d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # OEV Orbit Bot Example -This repository contains an example OEV searcher bot implementation targeting [Orbit Lending](https://orbitlending.io/). -To understand how OEV works, visit -[the OEV documentation](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/overview/oev-network.html). +This repository contains an example OEV Searcher bot implementation targeting [Orbit Lending](https://orbitlending.io/). +To understand how OEV works, visit [the OEV documentation](https://docs.api3.org/reference/oev-network/). Before running this application, be sure to read and understand the code. @@ -42,9 +41,9 @@ Given a list of accounts to watch, the app does the following: (Refer to `findOe - For all shortfall accounts, re-simulate the transmutation call, simulate a liquidation and determine the profit. - Find the most profitable liquidation (using ETH and USD components). - At this point, the OEV bidding process begins. To understand the OEV bidding lifecycle refer to - [these OEV docs](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/overview/auction-cycle.html) + [these OEV docs](https://docs.api3.org/reference/oev-network/overview/auction-cycle.html) - - [Bid on an update for the feed](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/searchers/submit-bids.html#with-an-expiration-timestamp) + - [Bid on an update for the feed](https://docs.api3.org/reference/oev-network/searchers/submit-bids.html#with-an-expiration-timestamp) ```typescript const bidDetails: BidDetails = { @@ -60,22 +59,22 @@ Given a list of accounts to watch, the app does the following: (Refer to `findOe ### Attempt to Capture the OEV Liquidation Opportunity -Refer to `attemptLiquidation()` +Refer to `attemptLiquidation()`. See the +[OEV Network docs](https://docs.api3.org/reference/oev-network/searchers/submit-bids.html) for more information. -- [Listen for the award, expiry or loss of the active bid](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/searchers/submit-bids.html#checking-bid-status-and-listening-for-awarded-bids) -- If the bid is awarded, encode a multicall transaction containing: +- Listen for the award, expiry or loss of the active bid +- If the bid is awarded, encode a multicall transaction containing - Call #1: Call to the API3 Server with the awarded bid details as call data with value corresponding to the bid amount - Call #2: Call the Orbit Ether Liquidator contract with the liquidation parameters - Simulate the liquidation multicall and determine the profitability - bail if the profit is below the minimum -- [Execute the liquidation transaction](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/searchers/submit-bids.html#performing-the-oracle-update-using-the-awarded-bid) -- Report the fulfillment on the OEV Network #TODO there's no page for this in the OEV docs - https://github.com/api3dao/oev-docs/pull/12#issuecomment-2186092191 +- Execute the liquidation transaction +- Report the fulfillment on the OEV Network ### Transmutation In order to bid on an OEV update an application will need to determine -[the bid's parameters](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/searchers/submit-bids.html#arguments-for-placebid), +[the bid's parameters](https://docs.api3.org/reference/oev-network/searchers/submit-bids.html#arguments-for-placebidwithexpiration), and in particular: - The value of the bid (what will be paid for the bid in the Blast chain's native token) @@ -113,7 +112,8 @@ The contract's relevant function is quoted below: } ``` -[//]: # 'TODO add a link to the actual contract' +See the full `ExternalMulticallSimulator` contract implementation +[here](https://github.com/api3dao/contracts/blob/7fb41c09953be41f1fab91affb2f75bc31368f65/contracts/utils/ExternalMulticallSimulator.sol). This function can only be called with a signer address of zero, valid only for non-write operations like a simulated RPC contract call. This can be executed via the [eth_call](https://www.quicknode.com/docs/ethereum/eth_call) RPC method. The @@ -183,13 +183,11 @@ pnpm orbit-bot:cli-utils deposit 0.01 # for 0.01 ETH 5. **Bridge funds to the OEV network** -The wallet will be interacting with the -[OEV network](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/overview/oev-network.html) for -which it needs to have an ETH balance. You can use the official -[OEV bridge](https://oev-docs--pr12-new-oev-docs-0y2wddya.web.app/reference/oev-network/bridge.html) to bridge funds -from the Ethereum network to the OEV network. +The wallet will be interacting with the OEV network for which it needs to have an ETH balance. You can use the official +[OEV bridge](https://docs.api3.org/reference/oev-network/overview/bridge-oev-network.html) to bridge funds from the +Ethereum network to the OEV network. -6. **Deposit funds to the OevAuctionHouse** +1. **Deposit funds to the OevAuctionHouse** You can use the [OEV network explorer](https://oev.explorer.api3.org/address/0x34f13A5C0AD750d212267bcBc230c87AEFD35CC5?tab=write_contract) diff --git a/src/accounts-to-watch.ts b/src/accounts-to-watch.ts index d676f00..4a9bc51 100644 --- a/src/accounts-to-watch.ts +++ b/src/accounts-to-watch.ts @@ -163,7 +163,6 @@ export const checkLiquidationPotentialOfAccounts = async ( return accountsToWatch; }; -// TODO new function from upstream, needs documentation export const getOrbitLogs = async (fromBlock: number, toBlock: number) => { const logs = await blastProvider.getLogs({ address: Object.values(oTokenAddresses),