The allowEmergencyWithdraw() function can be called by the owner at any time, and if called during Stage 3 after a pair is created, it sets stopped to true, causing withdrawal functions to revert and locking LP tokens. As a result, depositors and issuers cannot withdraw their LP tokens or incentives.
The createPair() function calls addLiquidity() with zero slippage tolerance, so if the pool's ratio changes before the call, the transaction reverts and users cannot create the pair. An attacker with early access to the new token could front-run the call to cause this denial of service.
The deposit function in the staking contract updates the user's balance and reward debt only after transferring reward tokens, so if the reward token gave control back during the transfer an attacker could re-enter deposit and receive the same pending reward repeatedly. The author states this could drain the contract's entire rJoe balance, but notes the current token does not relinquish control, so it is not exploitable today.
The TraderJOE contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. An attacker could use such a token to cause a loss of funds for users who unknowingly interact with the protocol.
The contract's internal AVAX transfer helper uses a low-level call and only checks the success flag, which the EVM sets to true even when the target address has no code. If the penalty collector address points to a self-destructed contract, the transfer silently fails without reverting, so funds may not reach the intended recipient.
The protocol allows withdrawal penalties to be set to zero when creating a token launch, which removes the economic deterrent against price manipulation attacks. An attacker could exploit this to manipulate the token price and invalidate the launch.
The owner of a token used in a LaunchEvent can create a JoePair for that token before the LaunchEvent does, causing the LaunchEvent's createPair call to revert. This prevents the LaunchEvent from initialising its pair, blocking users from withdrawing their LP tokens and incentives.
The factory function that creates a launch event for a token had no access control, so anyone holding even a tiny amount of that token could register it first. This blocked the legitimate issuer or the platform from creating the launch event for the same token afterwards.
The RocketJoeStaking contract's lastRewardTimestamp is uninitialized, so if someone transfers Joe tokens directly to the contract before the first updatePool call, a large amount of rJoe is minted to the contract. This inflates the rJoe total supply, though the tokens are not distributed to users.
The contract's emission rate parameter lacks upper and lower bounds, so an owner could set an excessively large value. This would cause reversions in critical functions that rely on the rate.
The token allocation calculation in the launch event used the token's own decimals instead of a fixed 18-decimal scale, so for tokens with decimals other than 18 the result was wrong. When the floor price was not reached, this could allocate zero tokens to the pool instead of the correct reduced amount.
The emergency withdrawal function reverts because the WAVAX reserve was already used to provide liquidity, and users do not receive their LP tokens either, so they lose their entire deposit.
The rJOE token contract allowed the owner to mint tokens without staking JOE, and ownership was to be transferred to a staking contract. An attacker with owner privileges could mint tokens before the transfer, potentially diluting the staking pool.
The withdrawAVAX() function in LaunchEvent.sol makes an external call to the caller without a reentrancy guard, allowing the caller to reenter this and other functions. An attacker could exploit this to reenter and potentially drain funds or manipulate state.
The contract used transfer/transferFrom without checking return values, so a token that fails silently could cause transfers to appear successful while token accounting is wrong. This could lead to a loss of funds under the right external conditions.
The contract does not check the boolean return value of ERC20 transfer and transferFrom calls. If a token returns false instead of reverting on failure, the contract treats the transfer as successful, potentially causing a loss of funds.