Header Configurations

Oval introduces the capability to include configurations via headers in the bundle requests, enhancing the flexibility and efficiency of interactions with the Oval Node. This document outlines the use and benefits of available headers, focusing on the X-Oval-Addresses header, which allows for dynamic specification of Oval addresses within requests. By utilizing this header, users can precisely control which Oval instances are targeted for unlocking within their operations.

Headers Overview

  • X-Oval-Addresses: Facilitates the inclusion of Oval addresses in request headers, streamlining the process of specifying targets for unlocking within bundles. This header is compatible with the eth_sendBundle and eth_callBundle methods, offering users direct control over the Oval instances to be unlocked.

Using the X-Oval-Addresses Header

The X-Oval-Addresses header is useful for users seeking to optimize their interactions with Oval by allowing:

  1. Atomic Unlocking of Multiple Instances: Users can unlock several Oval instances within a single bundle. This capability is useful for operations that depend on unlocking prices from various sources, enabling more complex and targeted strategies.

  2. Efficient Bundle Preparation: By specifying unlock addresses directly, users can eliminate the extra delay of the Oval Node searching for suitable unlock addresses. This efficiency reduces processing times and speeds up the forwarding of bundles to the Flashbots relay, offering a competitive edge in scenarios where speed is crucial.

Format and Constraints:

  • The header expects a JSON-encoded array of Ethereum addresses, with each address representing an Oval instance.

  • Only valid Ethereum addresses should be included, and all must correspond to Oval instances configured within the Node.

  • A single refund address per request is supported, implying that the specified Oval addresses must be from the same protocol. For example, it's not permitted to include two Oval addresses in the header for two different money markets. This approach ensures simplicity in protocol kickbacks calculations.

  • To prevent resource overuse or potential system abuse, the number of addresses per request is capped at a predefined maximum.

Example Usage:

For instance, to include two specific OVAL addresses in a request, add the following header to your API call:

x-oval-addresses: ["0xAddress1", "0xAddress2"]

Last updated