MEVSwap uses signatures to let retail users swap tokens securely on Uniswap V4 pools. Signatures are required to protect against toxic orderflow (bots & market makers).
{
"chain_id": 1,
"pool_id": "0x0000000000000000000000000000000000000000", // uniswap v4 pool id
"sender": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // the signer of the swap transaction
"zero_for_one": true,
"amount_specified": "-1000000000000000000", // Negative for input, positive for output
"deadline": "1600000000"
}
/// @notice Struct containing authorization data for hook
struct HookData {
// -------- FOR MEV AUCTIONS --------
/// @notice nonce committed by MEV bot
uint256 nonce; // use 0 for signature swaps
// --------- FOR SWAPS --------
/// @notice Signature authorizing the swap
bytes signature;
/// @notice deadline after which the signature is invalid
uint256 deadline;
/// @notice the swapper address
address swapper;
}