Skip to main content
Fees go through four steps before reaching a wallet, and you only handle the last one. Trades build up fees in the hook. A sweep splits them into the protocol’s share, the creator’s share plus the full creator tax, and the buyback portion. The sweep then credits the escrow for each recipient and asset. Finally, the recipient claims.
Balances and claims
If the fee recipient is a contract, test a claim before relying on it. claim() sends ETH with a plain call and reverts if the recipient rejects it, so a contract without a receive function can be credited fees it can never withdraw. claimTo and claimTokenTo were added in v3 for this case. The contract calls them and the funds go to an address it chooses. This is the integration mistake we’ve had to clean up most often, and nothing on the protocol side can recover those fees for you.

Sweeps

Only the operator can sweep a pool that has fees pending. If a creator calls it on a pool with pending fees, it reverts. On a pool with nothing pending, it does nothing. v2’s permissionless tipped sweep is gone, and only allowlisted callers can use the relay, so fees arrive on the protocol’s schedule. It’s normal for a pool to have fees that haven’t been swept yet. That isn’t an error or a stuck balance, so don’t show it as one.