Skip to content

Code4rena

Abracadabra Mimswap

Every publicly disclosed report for Abracadabra Mimswap and what kind of bugs they were.

disclosed reports
20
most reported class
Business logic
bug classes found
4
first disclosure
2024
Find Abracadabra Mimswap on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Abracadabra Mimswap chose to make public.

Business logic

Staking contract is not able to support native USDB/WETH

The staking contract tracks rewards with internal accounting, so rebasing tokens such as USDB and WETH that accrue yield automatically cannot have that yield claimed. Any yield generated by these tokens as reward tokens would be lost.

Abracadabra Mimswap

Medium
Business logic

Adjusting ” I ” will create a sandwich opportunity because of price changes

The contract allows the owner to change a parameter that directly affects the price, and a MEV bot can sandwich the transaction to profit at the expense of liquidity providers. The report notes that even without front-running, the sudden price change creates arbitrage opportunities.

Abracadabra Mimswap

Medium
Race condition

Factory::create() is vulnerable to reorg attacks

The Factory contract's create function used tx.origin as the salt for deterministic cloning, so if two users share the same tx.origin (as observed on Blast), a reorg could let one user take over the other's deployed pool. An attacker could then withdraw funds sent to the victim's predicted pool address.

Abracadabra Mimswap

Medium
Audit finding

Permanent loss of yield for stakers in reward pools due to precision loss.

The reward rate calculation in LockingMultiRewards divides the reward amount by the remaining time without sufficient precision, causing a loss of up to 604799 units of the reward token per notification. This loss is shared among stakers, resulting in permanent yield reduction, with potential losses of $0.6 for USDC and $423 for WBTC per occurrence.

Abracadabra Mimswap

Medium
Business logic

MagicLpAggregator always returns lower than correct answer, leading to arbitrage loss

The MagicLpAggregator prices LP tokens by taking the minimum of two underlying oracle prices and applying it to the sum of both reserves, which undervalues the LP when the two assets have different prices. An attacker could buy LP tokens at this undervalued price, redeem them for the underlying assets, and sell those assets at their true market value for a profit.

Abracadabra Mimswap

Medium
Audit finding

Oracle price can be manipulated

The MagicLpAggregator oracle calculates the price of a pair token using the pool's reserves, which can be manipulated. An attacker could use a flash loan to inflate the pair price and potentially exploit protocols relying on this oracle.

Abracadabra Mimswap

High
DoS

Tokens yeild can not be set to claimable.

The contract used an incorrect function signature when calling Blast's configure function, so the call would fail if the contract's token balance exceeded 2. An attacker could donate a tiny amount of ETH to the contract to make the configure call revert, preventing yield from being set to claimable.

Abracadabra Mimswap

Medium
Smart contracts

MagicLpAggregator doesn’t consider the dcimal of MagicLP

The MagicLpAggregator oracle contract calculates the price of MagicLP shares without accounting for the decimal precision of the MagicLP token, which matches the base token's decimals. When the base token has fewer than 18 decimals, the aggregator returns a price that is inflated by a factor of 10^(18 - baseDecimals), potentially causing incorrect collateral valuation.

Abracadabra Mimswap

Medium
Audit finding

Anyone making use of the MagicLP’s TWAP to determine token prices will be exploitable.

The TWAP price accumulator in MagicLP is updated after reserves change, so an attacker can front-run a query with a large swap to inflate the recorded price for the entire elapsed period. Any integrating contract that uses this TWAP to price tokens could be manipulated into executing a losing trade.

Abracadabra Mimswap

High
Smart contracts

Missing Return Statement in _getReserves Function in MagicLpAggregator Contract

The _getReserves function in the MagicLpAggregator contract did not return the reserve values fetched from the pair contract, causing latestAnswer to always return zero. This could lead dependent systems to receive incorrect price data, potentially causing financial loss or system failure.

Abracadabra Mimswap

Medium
Business logic

Pool Creation Failure Due to WETH Transfer Compatibility Issue on Some Chains

The Router contract uses safeTransferFrom to move WETH from itself to a new pool, but some WETH implementations (e.g., on Blast) do not allow a contract to transfer its own tokens without an allowance, causing the transaction to revert. This prevents the creation of native token pools on those chains.

Abracadabra Mimswap

Medium
Business logic

Miscalculation in addLiquidity of Router results in unauthorized spending of tokens

A miscalculation in the addLiquidity function of the Router causes the requested token amounts to be incorrectly adjusted based on the pool's balance and reserves, leading to the victim spending more tokens than intended. An attacker can donate tokens to the pool to manipulate the calculation and force the victim to transfer extra funds.

Abracadabra Mimswap

Medium
Business logic

Loss of assumed functionality of the Onboarding contract in a highly-sensitive area

The setStaking function in the BlastOnboardingBoot contract does not approve the new staking pool to spend the bootstrap LP tokens, nor does it revoke the old pool's approval. If the owner changes the staking contract, users cannot claim tokens into the new pool because the transfer fails.

Abracadabra Mimswap

Medium