code-423n4 / 2021-11-streaming-findings

0 stars 0 forks source link

Inconsistent check of token balance #249

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

WatchPug

Vulnerability details

require(newBal <= type(uint112).max ...) vs require(newBal < type(uint112).max...).

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L386-L386

require(newBal < type(uint112).max && newBal > prevBal, "erc");

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L427-L427

require(newBal <= type(uint112).max && newBal > prevBal, "erc");

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L506-L506

require(newBal <= type(uint112).max && newBal > prevBal, "erc");