Skip to content

Code4rena

Tigris Trade contest

Every publicly disclosed report for Tigris Trade contest and what kind of bugs they were.

disclosed reports
35
most reported class
Business logic
bug classes found
4
first disclosure
2023
Find Tigris Trade contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Tigris Trade contest chose to make public.

Business logic

Riskless trades due to delay check

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.

Tigris Trade contest

High
Business logic

Incorrect Assumption of Stablecoin Market Stability

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.

Tigris Trade contest

High
Business logic

Incorrect calculation of new price while adding position

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.

Tigris Trade contest

High
Business logic

Bypass the maximum PnL check to take extra profit

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.

Tigris Trade contest

High
Business logic

Lock.sol: claimGovFees function can cause assets to be stuck in the Lock contract

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.

Tigris Trade contest

Medium
Business logic

Trading will not work on Ethereum if USDT is used

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.

Tigris Trade contest

Medium
Business logic

One can become referral of hash 0x0 and because all users default referral hash is 0x0 so he would become all users referral by default and earn a lot of fees while users didn’t approve it

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.

Tigris Trade contest

Medium
Business logic

User can close an order via limitClose() , and take bot fees to themselves

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.

Tigris Trade contest

Medium
Audit finding

Chainlink price feed is not sufficiently validated and can return stale price

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.

Tigris Trade contest

Medium
Business logic

executeLimitOrder() modifies open-interest with a wrong position value

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.

Tigris Trade contest

Medium
Business logic

Bypass the delay security check to win risk free funds

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.

Tigris Trade contest

Medium
Business logic

Governance NFT holder, whose NFT was minted before Trading._handleOpenFees function is called, can lose deserved rewards after Trading._handleOpenFees function is called

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.

Tigris Trade contest

Medium
Business logic

Unreleased locks cause the reward distribution to be flawed in BondNFT

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.

Tigris Trade contest

Medium
Business logic

Must approve 0 first

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.

Tigris Trade contest

Medium
Business logic

Not enough margin pulled or burned from user when adding to a position

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.

Tigris Trade contest

High
Business logic

User can abuse tight stop losses and high leverage to make risk free trades

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.

Tigris Trade contest

High
Business logic

Users can bypass the maxWinPercent limit using a partially closing

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.

Tigris Trade contest

High
Smart contracts

reentrancy attack during mint() function in Position contract which can lead to removing of the other user’s limit orders or stealing contract funds because initId is set low value

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.

Tigris Trade contest

High
Business logic

Malicious user can steal all assets in BondNFT

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.

Tigris Trade contest

High
Smart contracts

safeTransferMany() doesn’t actually use safe transfer

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.

Tigris Trade contest

Medium
Business logic

BondNFT.extendLock force a user to extend the bond at least for current bond.period

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.

Tigris Trade contest

Medium
Smart contracts

BondNFT.sol#claim() needs to correct all the missing epochs

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.

Tigris Trade contest

Medium
Smart contracts

Certain fee configuration enables vaults to be drained

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.

Tigris Trade contest

High