The keeper reward calculation incorrectly treats a percentage value as a WAD (1e18) value, causing the tip portion of the reward to be divided by 1e18 instead of 100. As a result, keepers receive almost no tip, only their gas cost.
The `_uncommit` function in `PoolCommitter` sends tokens to the pool contract itself instead of the commit owner, because it uses `msg.sender` which is the pool. If `_uncommit` is ever triggered, users would lose their committed tokens as they are sent to the pool.
The commit function records the full amount of a deposit, but fee-on-transfer tokens cause fewer tokens to actually arrive, creating an inconsistency between the recorded commitment and the pool's actual balance. An attacker could exploit this to extract value from the protocol.
The smart contracts use Chainlink's deprecated latestAnswer() function to fetch price data. If Chainlink stops supporting this deprecated API, the protocol would be unable to obtain prices and would halt, requiring contract redeployment.
The market owner can change the trading fee to any percentage without emitting an event or enforcing a timelock, so users cannot monitor or react to the change. An attacker could set the fee to 100% and users would only notice after their trades execute, damaging confidence in the market.
The Tracer Perpetuals Factory contract transfers ownership to a governance address in a single step during construction, making the change irreversible. If an incorrect address is used, all onlyOwner functions become permanently inaccessible, forcing redeployment and causing reputational damage.
The contracts assume all tokens have 18 or fewer decimals, but if a token with more than 18 decimals is used, the scaler computations underflow and produce incorrect values. An attacker could exploit this to manipulate balances or bypass checks, though the report does not detail a concrete attack.
The insurance funding rate is set to zero when the insurance pool is sufficiently full, allowing an attacker to avoid paying insurance by temporarily filling the pool with a flash loan and triggering a minimal trade. This can be repeated to keep the rate at zero, causing insurance depositors to miss interest payments.
The smart contract does not check the return value of token transfer functions, so a token that returns false instead of reverting could let a user deposit without actually transferring funds.
A liquidator could create a second account and execute a trade between their own accounts with large slippage, then claim the liquidation escrow for that slippage. This allowed them to get reimbursed for slippage they caused themselves.
The SafetyWithdraw contract allows the market owner to withdraw any ERC20 token, including the tracerQuoteToken, at any time. A malicious owner could drain all deposited quote tokens, causing users to lose their deposits.
The executeTrade function in the Trader contract can be reentered because it calls an external contract controlled by the user. An attacker could exploit this to reenter critical functions, though the team notes whitelisting may limit the impact.
The GasOracle contract multiplies raw values from two Chainlink oracles without scaling them to a common 18-decimal format, assuming the result is already in 18 decimals. If the oracles use different decimals, the gas price can be heavily inflated or under-reported.
The liquidation contract's claimReceipt function does not check for duplicate orders, allowing a liquidator to submit the same bad trade multiple times and receive excessive slippage reimbursement from the insurance fund. An attacker can drain the insurance fund by repeatedly exploiting this.
The fee calculation in LibBalances.applyTrade() incorrectly adds the fee to the long position instead of subtracting it from both positions. This causes the contract to believe it can withdraw collected fees, leaving users with an incorrect amount of quote tokens.
The updateFundingRate function incorrectly calculates the cumulative funding rate by always adding the instant rate to zero instead of the previous cumulative value, due to using the current funding index instead of the previous one. This causes incorrect funding rates and affects account settlement across the protocol, potentially leading to user fund loss and protocol shutdown.
The Trader contract allows an attacker to front-run a user's trade by matching the user's counter order with their own order, preventing the user's trade from being filled. This griefing attack can deny trading, especially to liquidators trying to avoid liquidation.
The owner of the TracerPerpetualSwaps contract can change critical parameters such as addresses and values without emitting events. This lack of on-chain logging means off-chain monitors and users cannot detect malicious changes, potentially leading to lost funds and confidence.
The settle function sets a user's last updated funding index to the current global index when their base position is zero, but a comment and the else branch indicate it should be the previous index. This could let first-time depositors avoid paying the first funding rate period.
An agent could manipulate trading prices by creating many tiny orders at arbitrary prices and matching them with another account, which skewed the hourly average price used for funding rates and fair price. This allowed a malicious agent to manipulate the market.
The deposit functions of Insurance and TracerPerpetualSwaps assume that the contract's external ERC20 balance increases by exactly the amount specified in transferFrom, but deflationary tokens charge a fee on each transfer, so the user is credited the full amount without accounting for the tax. An attacker could exploit this to receive more credit than the tokens actually received.
TC
Tracer contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.