DoS of pool if uniswapV3MintCallback's tokenAmountOwed is 0 for a `Revert on Zero Value Transfers` token
The uniswapV3MintCallback function in PoolFacet.sol transfers tokens without checking if the amount owed is greater than zero. For tokens that revert on zero-value transfers, this causes the callback to fail, blocking all maker functions and newTaker/removeTaker operations for the affected tick range.
Source: https://github.com/sherlock-audit/2025-09-ammplify-judging/issues/2
Found by
ADM_, axelot, maigadoh
Summary
The Readme states that Revert on Zero Value Transfers are expected to work with the protocol, however as there is no amount > 0 check when transferring tokens in PoolFacet.sol#uniswapV3MintCallback() so the function will revert if amountOwed == 0 for the Revert on Zero Value Transfers token.
This will DoS all Maker functions & the newTaker/removeTaker functions in the affected tick range as the callback needs to succeed for the PoolWalker.sol#settle() function to complete.
Root Cause
No amount > 0 check when transferring tokens in PoolFacet.sol#uniswapV3MintCallback().
https://github.com/sherlock-audit/2025-09-ammplify/blob/main/Ammplify/src/facets/Pool.sol#L20-L21
Internal Pre-conditions
- One of the pool tokens must be a revert on amount 0 token.
External Pre-conditions
- The
Revert on Zero Value Transferstoken must return a 0 amount from the UniswapV3Pool.sol#mint() callback function for the given tick range.
Attack Path
- Create a Uniswap pool where 1 of the tokens is a
Revert on Zero Value TransfersToken. - Call any function that calls the PoolWalker.sol#settle() function for a tick range where the uniswap mint callback function will return 0.
- Revert when
TransferHelper.safeTransfer(pInfo.token, activeMint, amountOwed);is called.
Impact
DoS of any operations involving the affected tick range. This means users cannot create/modify/remove/collect fees for the given tick range.
PoC
No response
Mitigation
Update Pool.sol#uniswapV3MintCallback() to only perform the transfer if amount > 0.
function uniswapV3MintCallback(uint256 amount0Owed, uint256 amount1Owed, bytes calldata) external {
address activeMint = PoolLib.poolGuard();
require(msg.sender == activeMint, UnauthorizedMint(activeMint, msg.sender));
PoolInfo memory pInfo = PoolLib.getPoolInfo(activeMint);
if (amount0Owed > 0) {
TransferHelper.safeTransfer(pInfo.token0, activeMint, amount0Owed);
}
if (amount1Owed > 0) {
TransferHelper.safeTransfer(pInfo.token1, activeMint, amount1Owed);
}
}
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/itos-finance/Ammplify/pull/17
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the missing check for amount > 0 before calling TransferHelper.safeTransfer in uniswapV3MintCallback.
Impact
Users cannot create, modify, remove, or collect fees for the affected tick range, causing a denial of service for those operations.
What the attacker needed
One pool token reverts on zero-value transfers; Callback returns zero amount for the tick range
The fix
The protocol team fixed this issue by adding a check to only perform the transfer if the amount is greater than zero.
How it was found
- Create a Uniswap pool where one token reverts on zero-value transfers.
- Call any function that triggers PoolWalker.settle() for a tick range where the mint callback returns zero.
- The transaction reverts when TransferHelper.safeTransfer is called with amountOwed equal to zero.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some tokens refuse to transfer a zero amount and cause an error. The pool's callback function tries to transfer tokens even when the amount is zero, so it fails for those tokens. This failure stops users from creating, changing, or removing positions in that price range.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.