Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

api3dao/oev-searcher-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OEV Searcher Starter

An Example project to demonstrate how to use the OEV Network to place bids on dAPI IDs and then update dAPIs for the dAPP ID using the awarded signature from the OEV Network.

Instructions

Install dependencies

  • Create a .env file similar to example.env. The scripts work with mantle mainnet by default, but you can change the network to any of the networks supported by the API3 Market.
yarn

Deploy the OevFeedUpdater contract

  • Deploy a OevFeedUpdater contract on the target chain. The OevFeedUpdater contract is used to pay the bid, perform the oracle update and any other subsequent calls in a single transaction. You can use the deploy-oevfeedupdater script to deploy the contract.
yarn deploy-oevfeedupdater

Bridge and Deposit

  • Bridge ETH to the OEV Network using the OEV Network bridge

  • After Bridging ETH to the OEV Network, deposit ETH to the OevAuctionHouse contract. Use the deposit-collateral script to deposit ETH to the contract.

yarn deposit-collateral

Note: The script deposits 0.0001 ETH to the contract. You can change the amount by passing the AMOUNT environment variable.

AMOUNT=0.1 yarn deposit-collateral 

Place Bid and Update dAPI Proxy

  • You can now place bid, retrieve the encoded signature and update the dAPI values for dappID 1 communal proxies using the submit-bid-update script. The script also reports the fulfillment of the oracle update which is required to release the collateral.
yarn submit-bid-update
  • The script fetches the OEV encoded values and signatures from the public OEV endpoints for the ETH/USD dAPI, it then proceeds to place a bid of 0.01 MNT for the recurring dappID 1 auction round on mantle. Upon winning in the auction round, the script fetches the awarded signature and uses the awarded signature and OEV encoded values to update the dappID 1 ETH/USD dAPI.

  • You can change the bid amount, dAPI Name via the CLI. For example to update dappID 1 BTC/USD dAPI on Mantle mainnet with a bid amount of 0.1 MNT, you can run the following command:

BID_AMOUNT=0.1 DAPI_NAME="BTC/USD" yarn submit-bid-update

Note: Make sure the OevFeedUpdater contract is deployed on the target chain before running the script.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published