Skip to content

Sherlock

MagicSea - the native DEX on the IotaEVM

Every publicly disclosed report for MagicSea - the native DEX on the IotaEVM and what kind of bugs they were.

disclosed reports
16
most reported class
Business logic
bug classes found
3
first disclosure
2024
Find MagicSea - the native DEX on the IotaEVM on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what MagicSea - the native DEX on the IotaEVM chose to make public.

Business logic

Funds unutilized for rewards may get stranded in BribeRewarder

Bribe providers must fund a BribeRewarder contract with enough tokens for all bribe periods, but if some tokens remain unused (e.g., no voters or rounding), they become permanently stuck because there is no recovery function. An attacker could not directly exploit this, but the briber loses funds.

MagicSea - the native DEX on the IotaEVM

High
Business logic

Voting does not take into account end of staking lock period

The Voter contract's vote function did not check that a staking position's remaining lock period was longer than the voting epoch, so a user could vote with a position that expired during the epoch and then withdraw, re-stake and vote again in the same epoch. This allowed double voting with the same stake amount and broke the one-vote-per-balance invariant.

MagicSea - the native DEX on the IotaEVM

High
Business logic

Voting and bribe rewards can be hijacked during emergency unlock by already existing positions

During an emergency unlock, the addToPosition function remains unrestricted, allowing owners of existing staking positions to increase their voting power and manipulate the voting outcome. An attacker could pre-create many small positions and later add large amounts to them, gaining a monopoly on votes and unfairly capturing bribe rewards.

MagicSea - the native DEX on the IotaEVM

Medium
Business logic

Rewards might get stuck when approved actor renews a position

When an approved actor renews or extends a staking position, the rewards are sent to the approved actor instead of the position owner. This could cause reward tokens to be lost or sent to the wrong user, especially if the approved actor is a smart contract.

MagicSea - the native DEX on the IotaEVM

Medium
DoS

Attacker can block all votes to a specific pool by triggering an overflow error

A permissionless bribe rewarder contract could be funded with a custom token minted to the maximum supply, causing an arithmetic overflow in the reward accounting when a user votes. This blocked all votes to a chosen pool for the period, letting the attacker steer rewards toward pools they favoured.

MagicSea - the native DEX on the IotaEVM

High
DoS

Voters will lose all bribe rewards forever if they do not claim their rewards after the last bribing period

The claim function in BribeRewarder iterates over all voting periods from the start to the latest finished period, but the rewards array only has entries up to the last bribing period plus one extra. If a user does not claim within two periods after the last bribing period, the claim call reverts with an out-of-bounds error, permanently locking all unclaimed rewards.

MagicSea - the native DEX on the IotaEVM

High
Access control

Non-functional vote() if there is one bribe rewarder for this pool

The BribeRewarder contract's deposit function incorrectly checks that the caller is the NFT owner, but the caller is actually the Voter contract. This causes all vote transactions to revert for any pool that has a bribe rewarder.

MagicSea - the native DEX on the IotaEVM

High
Access control

Inconsistent check in `harvestPositionsTo()` function

The harvestPositionsTo function contains a contradictory check that only allows the token owner to call it, even though an earlier check permits an approved address. As a result, an approved address cannot harvest on behalf of the NFT owner.

MagicSea - the native DEX on the IotaEVM

Medium
Access control

Attacker can manipulate the `lockDuration` of other users positions

The access control check in `addToPosition` always passes because it compares the caller to themselves, so any user can add a tiny amount to another user's staking position. This recalculates the victim's lock duration, potentially making them ineligible to vote and earn rewards.

MagicSea - the native DEX on the IotaEVM

Medium