Skip to content

Code4rena

Tapioca Invitational

Every publicly disclosed report for Tapioca Invitational and what kind of bugs they were.

disclosed reports
104
most reported class
Business logic
bug classes found
5
first disclosure
2023
Find Tapioca Invitational on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Tapioca Invitational chose to make public.

Business logic

depositYBLendSGLLockXchainTOLP function of the MagnetarAssetXChainModule will not work because it transfers Singularity tokens to the user before _withdrawToChain

The depositYBLendSGLLockXchainTOLP function wraps Singularity tokens into TOFT tokens and transfers them to the user, but then tries to withdraw those same tokens from the contract's YieldBox balance, which is empty. As a result, the function always reverts and the cross-chain deposit and lock feature is broken.

Tapioca Invitational

Medium
Business logic

Layerzero fee refund address is not handled correctly

The LayerZero fee refund address is set to the intermediate contract instead of the original user, so overpaid fees are sent to the contract and the user loses the refund. An attacker could not directly exploit this, but users lose funds.

Tapioca Invitational

Medium
Business logic

Missing unwrap configuration when withdrawing cross-chain in the depositYBLendSGLLockXchainTOLP() function of MagnetarAssetXChainModule results in being unable to lock and participate on the destination chain

The depositYBLendSGLLockXchainTOLP function sends wrapped Singularity tokens cross-chain without unwrapping them, so the destination chain's lock function cannot find the original tokens. This causes the cross-chain lock and participate action to fail.

Tapioca Invitational

Medium
Race condition

Unordered Nonces open up to further MEV risks

The PermitC contract allows nonces to be executed out of order, so when a victim signs multiple permits, an attacker can choose the order that leaves allowances non-zero or causes transactions to revert. This can lead to unintended token claims or bridging, and enables MEV extraction.

Tapioca Invitational

Medium
Business logic

burst() does not return eth when action fails

When a batched call in Magnetar.burst() is allowed to fail and carries an ETH value, the failed action's ETH is not refunded and stays in the contract. A malicious user could then spend that stranded ETH through another action that forwards value, effectively stealing it.

Tapioca Invitational

Medium
Access control

tOLP positions created through MagnetarAction.Permit can be stolen

The Magnetar contract's Permit action validates only that the first calldata argument equals msg.sender, so an attacker can call approve or setApprovalForAll with themselves as the operator and then transfer out any tokens held by Magnetar. Combined with TapToken leaving a user's tOLP position stuck in Magnetar, an attacker could steal that position.

Tapioca Invitational

Medium
Audit finding

MagnetarHelper.getFractionForAmount uses the wrong rounding and will yield the wrong result

The helper function MagnetarHelper.getFractionForAmount rounds up when converting the borrowed amount to shares, while the actual withdrawal logic in Singularity rounds down. This mismatch means the helper returns an incorrect fraction, so a user withdrawing based on that fraction could receive a different amount than intended.

Tapioca Invitational

Medium
Business logic

Incorrect return value of function BaseTapiocaOmnichainEngine._payNative()

The contract's _payNative function returns only the requested native fee instead of the full msg.value, so when multiple LayerZero messages are sent in one transaction the excess native tokens become stuck in the contract. This can leave insufficient native tokens for later messages, preventing functions such as MagnetarBaseModule._lzCustomWithdraw() and TapTokenReceiver._claimTwpTapRewardsReceiver() from executing.

Tapioca Invitational

Medium
Business logic

Incorrect approval mechanism breaks all Magnetar functionality

The Magnetar contract grants standard ERC20 or YieldBox approvals to target contracts, but those contracts now expect permitC approvals. As a result, token transfers initiated by Magnetar fail, breaking most of its functionality.

Tapioca Invitational

High
Business logic

A single second in an epoch makes an user eligible for the entire epoch’s rewards

The TOLP contract records lock durations in seconds while the TOB contract processes them in epochs, so a lock expiring one second into an epoch makes the user eligible for that entire epoch's rewards. A user can also exit their position after the lock expires but still claim rewards for the rest of the epoch.

Tapioca Invitational

Medium
Business logic

_vested() claimable amount calculation error

The vesting contract's _vested() function miscalculates the fully vested threshold by ignoring the initial unlock time offset, allowing the claimable amount to exceed the total vesting amount. An attacker could claim more tokens than they are entitled to.

Tapioca Invitational

High
Access control

Adversary can utilise approved to Magnetar oTAP and tOLP NFTs

Magnetar's batch transaction function allowed any user to call option-related functions on another user's approved oTAP or tOLP NFT, because it did not check that the caller owned the NFT. An attacker could exercise another user's option or lock/unlock their NFT without permission.

Tapioca Invitational

High
Access control

MagnetarMintXChainModule.sol : mintBBLendXChainSGL can be used to manipulate user positions by abusing whitelist privileges

The Magnetar contract's sender check allows any whitelisted contract to act on behalf of any user, and the cross-chain mint function lets an attacker supply an arbitrary victim address in the composed message. A whitelisted contract such as USDO then executes market operations against the victim's account, moving their tokens and positions.

Tapioca Invitational

High
Access control

Missing check on helper contract allows arbitrary actions and theft of assets

The MagnetarOptionModule contract fails to whitelist the marketHelper address supplied by the user, allowing an attacker to provide a malicious helper that returns arbitrary calldata. This calldata is executed by the bigBang market, which trusts the Magnetar contract's approvals, enabling theft of collateral or borrowing against any user's position.

Tapioca Invitational

High
Business logic

Absence of restrictions on the sender of the twTAP.claimsReward() function could enable attackers to freeze reward tokens within the Tap token contract

The twTAP.claimRewards() function allows any caller to claim rewards for a token ID as long as the recipient is approved. An attacker can front-run a cross-chain claim by calling claimRewards with the TapTokenReceiver contract as recipient, causing the rewards to be sent to that contract and trapped there, so the legitimate cross-chain claim returns zero.

Tapioca Invitational

High
Business logic

Magnetar unwrap operations broken due to bad ownership and checks

The Magnetar contract's unwrap operation fails because it does not transfer the user's tokens to itself before calling the TOFT contract's unwrap function, which burns tokens from the caller's address. Additionally, the sender check validates the destination address instead of the owner, so the function cannot work as intended.

Tapioca Invitational

Medium
Access control

anyone with a Pearlmit approval to transfer TapToken can have their funds stolen

The TapToken transferFrom function falls back to Pearlmit allowance checks using the TapToken contract itself as the spender, so any user who has approved TapToken in Pearlmit can have their tokens stolen by anyone. An attacker can call transferFrom to move the victim's approved tokens to themselves.

Tapioca Invitational

Medium
Business logic

Magnetar’s mintBBLendSGLLockTOLP reverts when lock is set to false

The mintBBLendSGLLockTOLP function in Magnetar is meant to allow skipping the lock step, but if the user sets lock to false while still requesting participation, the function reverts because it tries to approve an NFT that is still held by the user rather than the contract. An attacker could not exploit this directly; it is a functional bug that prevents legitimate use of the modular option.

Tapioca Invitational

Medium
Business logic

Sending more TAP tokens to the TapToken.sol contract does not actually increase the total amount to be distributed

The TapToken contract treats any TAP tokens sent to it as boosted TAP and adds them to the weekly emission, but it still deducts those same tokens from the dso_supply accounting. An attacker could send extra TAP to the contract to speed up the emission schedule and break the intended linearly decaying distribution curve, and with enough tokens could cause an underflow that blocks weekly rollover.

Tapioca Invitational

Medium
Race condition

Same contract multi permits fundamentally cannot be solved via the chosen standards

Permit signatures for a token can be observed in the mempool and replayed by anyone, so when more than one permit is signed for the same token (for example granting then revoking an allowance), an attacker can front-run and execute them early, burning the approvals and resetting the allowance to zero. This makes the intended transaction revert, effectively blocking multi-permit flows.

Tapioca Invitational

Medium
Business logic

twAML weights can be griefed by burning tokens

The OTAP token has an open burn function, allowing users to burn their tokens after participating in twAML voting. This prevents the exitPosition function from resetting twAML values, so a user's influence on twAML calculations persists indefinitely.

Tapioca Invitational

Medium
Business logic

Incorrect decoding in decodeLockTwpTapDstMsg

The decoding function for a message used incorrect slice lengths, allowing multiple byte sequences to decode to the same values. An attacker could craft a malformed message that decodes to a valid-looking position, potentially bypassing validation.

Tapioca Invitational

Medium
Smart contracts

Gov ( twTAP ) and Tapioca Option can be monopolized by an attacker

The twTAP contract fails to update averageMagnitude when a position exits, so averageMagnitude only increases. An attacker can repeatedly enter and exit positions to inflate averageMagnitude and then reset cumulative to zero, preventing others from participating and monopolising governance.

Tapioca Invitational

Medium