Relevant GitHub Links
Summary
Users who accumulate more than 2^96 UNI tokens may lose their tokens because transfers above that will always revert.
Vulnerability Details
The UNI token contract imposes a transfer limit, restricting the maximum amount of tokens that can be transferred in a single transaction to 2^96 UNI tokens. Any transfer exceeding this threshold will trigger a transaction revert. The contract relies on the
balanceOf
function to verify the sender's token balance before proceeding with a transfer.plain textself.tokenA.safeTransfer(self.withdrawCache.user, self.tokenA.balanceOf(address(this)));
such a transfer will always revert for balances above 2^96 UNI tokens
Impact
Users who accumulate more than 2^96 UNI tokens may lose their tokens due to a DOS revert when attempting to withdraw their token balance.
Tools Used
Recommendations
Contracts should always check the amount of UNI being transferred before processing the transaction.