The Trading contract's limitClose function checks a delay before allowing third parties to close a position, but a trader can repeatedly renew that delay by adding a tiny amount to the position, preventing closure. Meanwhile, the trader can update the stop-loss without any delay check, so they can lock in price rises while avoiding losses if the price falls, achieving riskless trades.
The StableVault contract allowed users to deposit any supported stablecoin and withdraw an equal amount of any other stablecoin at a 1:1 ratio, ignoring real price differences. An attacker could deposit a slightly cheaper stablecoin and withdraw a more valuable one, profiting from the price gap.
The addToPosition function in Trading.sol used an incorrect formula to calculate the new average price when adding margin to an existing trade, causing users to lose part of their funds or profit. The report demonstrates that a user with a profitable or losing position receives a lower payout than expected after adding to the position.
The protocol enforces a maximum profit of 500% when closing a position, but the addToPosition function does not check this limit. An attacker can increase their position to bypass the cap and withdraw more profit than allowed.
When claimGovFees moves government fee tokens from the GovNFT contract into the Lock contract, the follow-up call to BondNFT.distribute silently returns early if the asset has no shares or is not allowed. The transferred tokens then remain stuck in the Lock contract and cannot be recovered.
The Trading contract calls approve with type(uint).max on the margin asset every time a deposit is handled. On Ethereum, USDT requires the allowance to be reset to zero before setting a new non-zero value, so the second and later calls revert, preventing traders from initiating market orders, adding margin, adding to positions, or initiating limit orders when USDT is the margin asset.
A flaw in the cross-chain NFT bridging logic allows a user to end up with the same token ID on two different chains. This happens because a failed message is not marked as consumed, so it can be retried after the NFT has been bridged back, leading to duplicate minting.
The fee calculation in the trading contract omitted the referral fee component, causing the reported fee paid to be understated. This led to incorrect margin calculations and reduced rewards for protocol NFT holders.
The referral system treated the zero hash as a valid referral code, and since all users default to a zero referral hash, the first person to register that hash became the referrer for every user who had not set a referral. That attacker then received referral fees from those users' trades without their approval.
The trade delay mechanism used block.number, which on Arbitrum and Optimism does not advance predictably per transaction, so a user could open and close a position within the intended delay period and exploit multiple valid prices.
A user could avoid paying bot fees by using a proxy contract to update the stop-loss and immediately call limitClose() in the same transaction, so the bot fee that would normally go to a bot is instead kept by the user. This reduces the DAO's fee revenue because bot fees are subtracted from DAO fees.
The fee calculation in the trading contract ignored referral fees, so when a trade was referred, the margin after fees was overstated, allowing a larger position to be opened than intended. An attacker could exploit this to gain more margin than expected.
The Chainlink price feed verification in the trading contract does not check whether the price returned is stale, so an off-chain price that differs by more than 2% from the current Chainlink price can still pass if it is within 2% of a stale price. This allows a trading transaction that should revert to go through, weakening the price verification.
The executeLimitOrder() function adds a position size to open interest that is calculated using margin before fees, while the actual position is created after fees are subtracted. This causes open interest to register incorrect values, distorting the balance between long and short positions.
The protocol's delay check only prevents opening and closing a position in the same transaction, but an attacker can open a long and a short at two different prices in the same transaction to lock in a risk-free profit. This allows the attacker to extract funds from liquidity providers.
The Trading contract's _handleOpenFees function mints DAO fees but does not approve the GovNFT contract to transfer them, so the distribute call fails silently. A Governance NFT holder whose NFT was minted before the first such call loses the rewards they should have received.
The executeLimitOrder function updates the trade price for stop orders but does not re-validate the stop-loss and take-profit levels against the new price. An attacker could have a limit order execute at a price that immediately triggers the take-profit, causing an unexpected loss for the user.
Unreleased expired locks keep their shares in totalShares, so reward distributions are diluted and active bond holders receive less than they should. An attacker could delay releasing an expired bond to cause other bond holders to lose rewards.
The claimGovFees function approves the maximum allowance for each asset without first resetting it to zero, which can cause tokens like USDT to revert when changing a non-zero allowance. An attacker could not directly exploit this, but it could block the function from working with certain tokens.
When adding to a position, the contract pulled less margin from the user than intended because it subtracted the fee from the deposit amount. An attacker could therefore open a larger position with less collateral, increasing leverage beyond the protocol's design.
Stop-loss orders were executed at the user-specified stop-loss price rather than the current market price, allowing a trader to open a high-leverage position with a stop-loss just below the entry price. If the price dropped, the position would close at the stop-loss price, capping losses to fees; if the price rose, the trader could make a large gain, with the loss borne by liquidity providers.
The maxWinPercent cap was checked against the full trade margin rather than the margin being closed, so a trader could partially close a position repeatedly and collect far more payout than the intended limit. This let an attacker drain more funds from the protocol than the maximum profit rule allowed.
The Position.mint() function updates storage after calling _safeMint(), which invokes the recipient's onERC721Received() callback. An attacker can reenter the Trading contract during that callback to cancel a limit order whose index is still zero, removing another user's order, or to add margin to a position so that initId is later overwritten with a lower value, inflating profit calculations.
An expired bond could be claimed repeatedly, each time increasing the reward-per-share accumulator without transferring rewards, which inflated the pending rewards of another bond controlled by the attacker. The attacker could then claim that inflated bond to drain all assets held by the BondNFT contract.
The safeTransferMany() function in BondNFT and GovNFT does not perform a safe transfer, so tokens can be sent to a contract that cannot receive ERC721 tokens, potentially locking them permanently. An attacker could exploit this by tricking a user into using the function, causing their NFT to be stuck.
The BondNFT.extendLock function incorrectly adds the requested extension period to the bond's original period rather than to the remaining time, forcing users to extend for at least the full original period. This means bonds with a 365-day lock cannot be extended at all, and users extending shorter bonds are locked in longer than intended.
The protocol's owner has broad powers, including the ability to freeze withdrawals by withholding signed prices, and can use these powers to drain all funds from the StableVault. An attacker who compromises the owner's wallet could steal all user funds.
The claim function in BondNFT.sol only updates the reward-per-share accumulator for the current epoch when an expired bond is claimed, skipping all epochs between the bond's expiry and the current epoch. This can cause some users to lose rewards, others to receive undeserved rewards, and some rewards to become locked in the contract.
An unchecked arithmetic overflow in the PNL calculation allowed an attacker to mint a huge amount of Tigris tokens by supplying a crafted take-profit price, then use those tokens to drain the vault. The exploit required a specific fee configuration where DAO fees are roughly twice the referral fees.
TT
Tigris Trade contest
High
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.