Uniswap protocol features are the mechanisms that distinguish the Uniswap decentralized exchange from other automated market makers. Uniswap runs as a set of smart contracts, first on Ethereum and later on many other networks, in which traders swap tokens against liquidity pools funded by liquidity providers. Its main versions are v2 (2020), v3 (2021), which added concentrated liquidity, and v4, launched in January 2025.
The features below come from different layers. Flash swaps and the protocol fee are part of the core pool contracts; Permit2 and UniswapX are separate contracts from Uniswap Labs that sit between users and the pools; and the singleton architecture and flash accounting are the structural changes of v4. Governance of the protocol, including fee decisions, rests with holders of the UNI token.
Flash Swap
A flash swap is a feature, introduced in Uniswap v2, that lets a user withdraw tokens from a pool before paying for them, provided the payment or return is made by the end of the same transaction. The pool sends the requested tokens and then calls back into the user's contract, which can use them for anything, such as an arbitrage trade on another exchange. When control returns, the pool checks that its reserves, including fees, are at least as large as required. If not, the whole transaction reverts as if it never happened.
A flash swap is close to a flash loan, but the borrower can settle either by returning the same tokens or by paying with the pool's other token, which turns it into an ordinary swap with delayed payment. Flash swaps are widely used for arbitrage and liquidations, and, like flash loans, they have also supplied capital for exploits against other protocols.
Protocol Fee
A protocol fee is a share of trading fees that goes to a DeFi protocol itself, its treasury or token holders, instead of to the liquidity providers who earn the rest. In Uniswap the mechanism is often called the fee switch. Uniswap v2 included an option, controlled by governance, to divert one-sixth of the 0.30% pool fee, or 0.05% of trade value, to a protocol address:
On a $10,000 swap that would be $5 to the protocol and $25 to liquidity providers. Uniswap v3 allows governance to set a protocol share pool by pool, as a fraction of each pool's fee tier. For years the switch was left off while UNI holders debated whether fees would drive liquidity away and whether paying token holders would raise securities-law concerns. In December 2025 UNI holders approved the UNIfication proposal, which turned the fee switch on for Uniswap v2 and a set of v3 pools on Ethereum and directs the protocol's fees to buying and burning UNI, with v4 and other networks left to later governance votes.
Permit2
Permit2 is a token-approval contract released by Uniswap Labs in 2022 that lets applications move a user's tokens using signed, time-limited permissions instead of a separate on-chain approval for every application. Under the ERC-20 standard, a user must normally send an approval transaction to each contract that will spend a token. With Permit2, the user approves the Permit2 contract once per token; after that, applications request an off-chain signature, usually in the EIP-712 typed-data format, that states the amount, the spender and an expiry.
The design saves gas, works with any ERC-20 token and makes permissions expire rather than last for ever. Its weakness is that a signature now carries the power that an approval transaction used to. Phishing sites ask victims to sign Permit2 messages that hand tokens to the attacker, and because nothing appears on-chain until the theft, such requests are a common route for wallet drainers. Reviewing and revoking any token approval remains important.
UniswapX
UniswapX is an intent-based trading system, announced by Uniswap Labs in July 2023, in which users sign orders and third-party fillers compete to execute them. Instead of sending a swap to a pool, the user signs an intent: sell this token, receive at least that amount, before a set time. The order runs as a Dutch auction that starts at a price better than the market and falls over a short period until a filler finds it worth taking.
Fillers, similar to a solver in other systems, may use Uniswap pools, other exchanges or their own inventory, and they pay the network fee, so the swap is gas-free for the user. Because the signed order is not exposed in the public mempool as a normal swap, it offers protection against sandwich attacks, and any price improvement goes to the trader. The trade-offs are reliance on a small group of professional fillers and the chance that an order goes unfilled.
Singleton Architecture
Singleton architecture is the Uniswap v4 design in which every pool lives inside one contract, the PoolManager, instead of each pool being deployed as its own contract as in v2 and v3. In v4 a pool is a set of records inside the PoolManager, so creating one is a cheap state update rather than a new contract deployment, which earlier cost far more gas.
The bigger saving comes in multi-hop trades. Under older versions, a swap from token A to token C through token B moved tokens out of one pool contract and into another at each step. With all pools in one contract, intermediate amounts never need to leave it. The singleton also supports native ether without wrapping it into wrapped ether, and it works with hooks, small external contracts that a pool creator can attach to run custom logic at points such as before or after a swap. Concentrating all pool assets in one contract also raises the stakes of any bug in it.
Flash Accounting
Flash accounting is the Uniswap v4 method of tracking what each party owes or is owed during a transaction and settling only the net amounts at the end. When a user or router opens a session with the PoolManager, each swap or liquidity change updates a running balance, called a delta, for each token instead of transferring tokens immediately. Before the session closes, every delta must be brought to zero by paying in or taking out tokens; otherwise the transaction reverts.
A three-pool route that once needed several token transfers can therefore finish with just two, one in and one out. The deltas are kept in transient storage, introduced by EIP-1153 in the Dencun upgrade of March 2024, which holds data only for the length of a transaction and costs much less gas than ordinary storage. Flash accounting builds on the same idea as flash swaps, settlement by the end of the transaction, applied to every operation.
Ref 1070001405