raiden-contracts
raiden-contracts copied to clipboard
A potential overflow involving the block number.
After a while, when block.number
is big enough, the following addition in TokenNetwork might overflow.
channel.settle_block_number += uint256(block.number);
At the current block mining rate, that will take 2**256 - 10296463 / 2 / 4 / 60 / 24 / 365
> 10^70 years. Even if Ethereum starts mining a few million times faster, we can still wait a few million years and have plenty of time to fix it.
But adding an overflow check might be easier than explaining this in a comment.