An attacker can create a tokenfactory denom, fund it as a reward, then use MsgForceTransfer to drain the contract's balance, causing reward claims to fail with insufficient funds. This also prevents the contract owner from closing the malicious farm, leaving legitimate rewards stuck.
Stable swap pools in Mantra did not normalise token amounts by their decimals when computing the invariant D, so deposits of a high-decimal token produced a much larger D than equivalent deposits of a low-decimal token. An attacker could deposit the high-decimal asset and receive an exaggerated number of LP shares, diluting other liquidity providers.
The slippage tolerance check for StableSwap deposits compared a simple ratio of total pool balances to pool token supply against the deposit ratio, ignoring the StableSwap invariant and amplification factor. This could let deposits through whose real price impact exceeds the user's stated tolerance, causing unexpected losses.
The reverse simulation function for multi-hop swaps incorrectly used forward simulation instead of reverse simulation, leading to incorrect price quotes for users trying to determine required input tokens for a desired output amount.
Stableswap pools with more than two tokens did not require every pool token to be supplied during the first liquidity deposit, so a pool could be created with zero liquidity for one token. That left the pool permanently unusable, because later deposits hit a division-by-zero error.
The Mantra DEX stableswap pools have a fixed amplification coefficient (A) that cannot be changed after pool creation, unlike Curve's implementation. This lack of ramping means the pool cannot adapt to changing market conditions, potentially allowing traders to exploit the pool during events like a stablecoin depeg and cause losses to liquidity providers.
The StableSwap pool's price calculation using Newton's method may not converge in unbalanced pools, returning a wrong price instead of reverting. An attacker could swap at this incorrect price, potentially profiting at the expense of the pool.
The pool creation fee validation uses a strict equality check and an 'any' check for token factory fees, so in edge cases a user can either underpay the token factory fee or the transaction reverts even when all fees are paid.
In the farm manager's reward calculation, a user's share is computed by dividing their weight by the contract's total weight for an epoch, but that total can be zero, causing a division-by-zero error. Because pending rewards must be claimed before a position can be closed, affected users cannot claim rewards or close positions without penalty.
The protocol allows creating constant product pools with more than two tokens, even though the swap formula only works for two-token pools. An attacker could arbitrage these broken pools when they become imbalanced.
A user who claims rewards during the preliminary end epoch cannot later claim rewards for that same epoch if the farm owner expands the farm afterwards, because the user's last claimed epoch is set to the preliminary end epoch. This can cause the user to miss rewards for up to two epochs.
The spread calculation in the swap function includes swap fees, making the computed spread larger than the actual slippage. This could allow a swap to pass the slippage tolerance check when it should fail.
The reverse simulation query for stable swaps ignored extra fees, so it returned an offer amount that was too low. A trader using that amount would receive less than the desired output, potentially causing unexpected reverts in dependent contracts.
The stableswap invariant calculation only uses the two tokens involved in a swap, ignoring other tokens in the pool. This leads to incorrect slippage and allows arbitrage opportunities.
The reverse simulation function floors the computed offer amount, so a trader who uses it to determine the input needed for an exact output will receive slightly less than requested. This can cause unexpected reverts for contracts relying on the simulation.
The stableswap pool implementation does not charge a fee when liquidity is added at a ratio far from the current pool price, unlike Curve's stableswap. An attacker can add single-sided liquidity to skew the pool composition at very low cost, causing high slippage for other users.
The claim function in a smart contract farm manager uses three nested loops over a user's positions, farms per liquidity pool, and epochs since the first deposit, giving roughly cubic complexity. A user with many old positions across many farms could exceed the block gas limit, making claim and close_position transactions fail and forcing an emergency withdrawal that loses deposits and rewards.
The farm creation function allowed a start epoch in the past because it only checked that the start epoch was greater than zero and that the end epoch was in the future. An attacker could create a farm retroactively, causing users who had already claimed rewards for past epochs to miss out on additional rewards assigned to those epochs.
The fee validation logic in the pool creation function incorrectly handles cases where the pool creation fee and denom creation fee share the same denomination. An attacker could bypass paying one of the fees if the amounts are equal, or cause a denial of service if the amounts differ and they attempt to pay both together.
When a position is emergency withdrawn, the penalty fee is split equally among all farm owners sharing the same LP denom, including owners of future or expired farms. A malicious farm creator could register a future farm to collect a share of penalty fees without contributing rewards, then close the farm and recover the deposited assets.
The stableswap liquidity slippage check adds raw token amounts without scaling for differing decimals, so deposits with very different real value produce the same total. An attacker could add liquidity at a worse ratio than their stated slippage tolerance without the contract rejecting it.
When a user makes a single-sided deposit into a pool, the contract performs a swap with belief_price set to None, which disables the intended slippage protection. An attacker could exploit this to cause the user to receive fewer LP tokens than expected due to price movements before the transaction is executed.
The protocol fee for swaps is set by pool creators when creating a pool, allowing them to set it to zero. This means the protocol may not collect the swap fees it is entitled to.
When providing single-sided liquidity with an unlocking duration, the contract calls itself to deposit the swapped amount, causing the receiver check to fail because the sender is the contract address. This prevents users from locking LP tokens in the farm manager in a single action, breaking a core functionality.
The create_pool function allows anyone to create a pool with arbitrary asset decimals, and these incorrect decimals are used in stableswap calculations, leading to invalid swap results. An attacker could create a pool with wrong decimals and potentially sandwich less sophisticated users, as slippage protection may be ineffective.
The withdraw_liquidity function in a Cosmos-based DEX lacks a way for users to specify a minimum acceptable amount of tokens when withdrawing liquidity. This means users could receive fewer tokens than expected due to market changes between transaction submission and execution.
Pool creators can specify the same token denominations in a different order when creating a pool, which causes the slippage tolerance check to use an inverted ratio. This can lead liquidity providers to accept unfavourable deposit ratios, resulting in a loss of funds.
The stableswap pool's slippage tolerance check only verifies one side of the ratio inequality, so deposits that are imbalanced relative to the pool can pass even with zero tolerance. An attacker or unlucky depositor could receive fewer LP tokens than expected, losing value.
When providing liquidity to a pool with existing reserves, users who deposit tokens in disproportionate amounts lose the excess tokens, which are effectively donated to the pool. The slippage tolerance only protects against receiving too few LP tokens, not against this token loss.
The farm-manager contract applies a fixed 2% emergency unlock penalty regardless of how long a position was locked, while longer locks earn much higher reward multipliers. An attacker could lock for the maximum duration to earn boosted rewards, then emergency-unlock cheaply to regain liquidity, undermining the lockup mechanism.
MD
MANTRA DEX
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.