Use a short deadline that still gives your transaction time to confirm; for a routine swap, two to five minutes is a reasonable starting point. A deadline is the latest time a swap can execute, not a promise that it will finish by then. If you make a base swap often, this setting helps limit how long an old trade can remain executable.

What does a deadline protect?

A deadline limits the time a swap instruction stays valid. An automated market maker (AMM) trades tokens from pools, and a router—a contract that sends your trade through the right pool—can check the deadline when it runs the swap.

The router compares the deadline with the timestamp of the block that includes your transaction. Uniswap’s v2 router documentation shows this pattern: the swap reverts if its deadline has passed. Ethereum.org explains that submitted transactions can wait in a transaction pool, often called a mempool, before a block includes them.

That wait matters when the market moves. A transaction prepared at 12:00 with a 12:03 deadline cannot execute after 12:03, even if it sat pending because the network was busy. Without an expiry, a delayed trade could execute much later under conditions you did not intend.

How should you choose the time?

For an active trader on Base, start with two to five minutes when the network and wallet are responding normally. Treat that as a practical example, not a protocol standard; add time if you expect congestion, a slow connection, or several pending transactions ahead of this one.

A deadline works alongside slippage tolerance, which sets how much the received amount may fall from the quoted amount. For example, suppose a swap quotes 2,000 USDC and your minimum is 1,960. If the price moves so the trade would return only 1,950, the minimum-output check rejects it even before the deadline. If it still returns 1,970 but arrives after expiry, the deadline rejects it instead.

This is the useful distinction: the minimum amount controls price, while the deadline controls time. Giving a swap more time may help it confirm, but it also leaves it eligible to execute for longer. Shortening the deadline reduces that exposure, though an overly short limit can make a valid trade fail during a brief delay.

What happens if it expires while pending?

Expiry does not reach back into the network and erase a pending transaction. If it is later included in a block, the contract checks the timestamp, rejects the swap, and the transaction still uses gas—the fee for the network’s computing work. The swap does not complete, but the failed attempt can still cost a network fee.

If the transaction is still pending, raising its fee may help it get included sooner, but that does not extend the deadline. A replacement transaction with the same account sequence number, called a nonce, may be needed to replace or cancel the pending one; whether that is available depends on the wallet. Check its status before submitting another swap, so you do not create a second trade while the first remains live.

For a Base swap through BaseSwap, use a deadline that fits the expected confirmation time, then keep the minimum received amount tight enough for the trade you actually want. Short enough to limit stale execution, long enough to survive ordinary delays—that is the practical balance.