code-423n4 / 2022-01-trader-joe-findings

2 stars 0 forks source link

Use != 0 instead of > 0 for Unsigned Integer Comparison #269

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Czar102

Vulnerability details

Impact

Issue Information: G003

Findings:

LaunchEvent.sol::314 => msg.value > 0,
LaunchEvent.sol::338 => if (rJoeNeeded > 0) {
LaunchEvent.sol::355 => require(_amount > 0, "LaunchEvent: invalid withdraw amount");
LaunchEvent.sol::370 => if (feeAmount > 0) {
LaunchEvent.sol::390 => require(wavaxReserve > 0, "LaunchEvent: no wavax balance");
LaunchEvent.sol::455 => if (tokenReserve > 0) {
LaunchEvent.sol::486 => require(amount > 0, "LaunchEvent: caller has no incentive to claim");
LaunchEvent.sol::498 => user.balance > 0,
LaunchEvent.sol::537 => if (excessToken > 0) {
LaunchEvent.sol::542 => if (excessWavax > 0) {
LaunchEvent.sol::547 => if (excessAvax > 0) _safeTransferAVAX(penaltyCollector, excessAvax);
RocketJoeFactory.sol::119 => _tokenAmount > 0,
RocketJoeStaking.sol::101 => if (user.amount > 0) {

Tools used

c4udit

cryptofish7 commented 2 years ago

Duplicate of #240