The FastLane Auction Handler will call the fastLaneCall function in the searcher's contract.

function fastLaneCall(
    address _sender, 
    uint256 _amount, // _bidAmount or _fastGasPrice
    bytes calldata _searcherCallData
) external payable returns (bool, bytes memory)
  1. _sender (type address): The original msg.sender of the submitFlashBid or submitFastBid call received by the FastLane Auction Handler

  2. _amount (type uint256): The amount in wei that the searcher bid in the auction for bundles, or the fast gas price in gwei for fastBids

  3. _searcherCallData (type bytes calldata): The data used to execute the searcher's transaction.

The _amount parameter will have different meaning whether the searcher submitted a bundle (backrun) or a fastBid (top of block). The former is the final amount the searcher has committed to pay as their bid, whereas the latter is the price per gas used (a rate) the searcher has bid for their fastBid.

If a searcher is using the same contract to handle both bundles and fastBids, a proper logic will have to be implemented to differentiate them (eg. a value stored in _searcherCallData).

Security considerations

If you're calling address(this).call(_searcherCallData); inside your fastLaneCall function, remember to protect the function targeted in _searcherCallData by protecting it as well with something like

if (msg.sender != address(this)) {
    // NOTE: msg.sender becomes address(this) if using call from inside contract per above example in `fastLaneCall`
    require(approvedEOAs[msg.sender], "SenderEOANotApproved");

since attacker might attempt to call the targeted function themselves.

Last updated