Bid Submission

FastLane Searchers submit their bids and solutions to the FastLane Protocol using EIP-712 signed messages. This method allows for off-chain data signing and on-chain verification, reducing gas costs and improving efficiency. The submission to the PFL-Auction will be performed by Bundler EOA's. To establish a trusted a PFL-Auction transaction is constructed of 3 parts here:

  • UserOperation. : (opportunity transaction converted on PFL-Auction system)

  • SolverOperation : (generated and signed by searcher)

  • dAppOperation : (generated and signed by dAppSigner to hash userOperation and selected solverOperations)

The above definitions are simplified to for more technical details we encourage to read our Atlas documentation

Submitting the Signed Message

This will be a two step process

Atlas will call the atlasSolverCall on the solver/searcher contracts

// Opionanted atlasSolverCall implementation which forwards
// to a internal call using the solverOpData
function atlasSolverCall(
    address solverOpFrom,
    address executionEnvironment,
    address bidToken,
    uint256 bidAmount,
    bytes calldata solverOpData,
    bytes calldata
)
    external
    payable
    virtual
    safetyFirst(executionEnvironment, solverOpFrom)
    payBids(executionEnvironment, bidToken, bidAmount)
{
    (bool success,) = address(this).call{ value: msg.value }(solverOpData);
    if (!success) revert SolverCallUnsuccessful();
}

1. Generate CallData for the Solver contract function

The first step is to generate and encode the backrun for a particular opportunity transaction

  • In our example the solve() function

  • Responsibilities:

    • perform backrun operation

    • makes sure the the contract has bidToken in bidAmount quantity (POL)

2. Generate SolverOperation to Submit for

The second part will be generating the a EIP-712 signed messages with a atlas specific format

EIP-712 like Message Structure

Searchers need to construct and sign a message containing the bid and operation details according to an Atlas format similar to the EIP-712 standard. A SolverOperation contains the following important details

The message includes:

  • Bid Details: Bid token address, bid amount.

  • Operation Data: Encoded data for the solver operation.

  • dAppControl: PFL-Auction specific implementation of the Atlas hooks (pre-solver, post-solver)

  • dAppSigner: Account which will be signing the dAppControl operation

  • userOpHash: hash of User's Operation, for verification

  • deadline: is provided in block number not timestamp!

  • dAppControl Contract Address

    • Description: This is the current address of the dAppControl contract, which is responsible for generating the userOpHash needed for the solver operation.

    • PFL-Auctions implementation for Atlas hooks (pre-solver, post-solver) and value distribution

  • dAppOpSigner Address

  • atlasVerification Contract Address

  • atlas Contract Address

Encoding of the Bundle

When encoding the bundle, represent all BigInt values as hex strings (prefixed with 0x), and serialize the entire JSON object as a string.

Example Solver Operation as struct:

Example Bundle payload what we expect:

Example:

Please see Full Example section on how to target your own transaction instead of one from a provider.

For details on how to create a bundle review the Full Example

Last updated