Skip to content

Code4rena

SecondSwap

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

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

Disclosed reports

Newest first. Only what SecondSwap chose to make public.

Business logic

SecondSwap_Marketplace vesting listing order affects how much the vesting buyers can claim at a given step

When a vesting is listed on the marketplace, the vesting manager contract inherits the seller's already-claimed step count if it has no prior allocation for that plan. A buyer with no prior allocation who purchases a later listing can therefore inherit that claimed-step count and be unable to claim at the current step, so the order in which listings are created changes what buyers can claim.

SecondSwap

High
Business logic

transferVesting creates an incorrect vesting for new users when they purchase a vesting, because stepsClaimed is the same for all sales, allowing an attacker to prematurely unlock too many tokens

The VestingManager's own vesting record keeps a single stepsClaimed value taken from the first sale, so later buyers inherit a stale value. A new buyer can therefore claim tokens immediately instead of waiting for the vesting schedule, and an attacker can repeat the sell-and-rebuy cycle to unlock more tokens early.

SecondSwap

High
Business logic

Incorrect listing type validation bypasses enforcement of minimum purchase amount

The marketplace contract validated the minimum purchase amount against the wrong listing type, so the intended range check was applied to single listings instead of partial ones. A seller could therefore create a partial listing with a minimum purchase amount outside the allowed range, defeating the minimum-purchase enforcement.

SecondSwap

Medium
Business logic

Tokens that have already been vested can be transferred from a user.

The vesting transfer function only checked the unclaimed remainder against the total minus already-claimed amounts, ignoring tokens that had vested but were not yet claimed. A token issuer could therefore move a user's already-vested tokens to another beneficiary, leaving the original user able to claim less than they had earned.

SecondSwap

Medium
DoS

Underflow in claimable DOSing claim Function

A rounding error in the vesting contract can cause the number of steps claimed to exceed the total number of steps, leading to an underflow when calculating claimable steps. This prevents users who purchase additional tokens from claiming them, locking their funds.

SecondSwap

Medium
Business logic

Unauthorized increase of maxSellPercent

The setSellable function resets maxSellPercent to 20% when the current value is 0, which is interpreted as uninitialised. This allows the admin to inadvertently override the token issuer's setting of 0, enabling token sales that the issuer intended to prevent.

SecondSwap

Medium
Business logic

buyFee And sellFee Should Be Known Before Purchase

The marketplace lets the buy and sell fees for a vesting plan be changed after a listing is created, so the fees a seller will pay are not fixed at listing time. A seller can therefore receive less revenue than expected if the seller fee is raised later.

SecondSwap

Medium
Business logic

Users can prevent being reallocated by listing to marketplace

A vesting beneficiary can prevent the token issuer from reallocating their vesting by listing it on the marketplace, which moves the allocated amount to the VestingManager contract. The issuer's reallocation then fails due to an insufficient balance check, and reallocating from the manager could make the marketplace insolvent.

SecondSwap

Medium
Business logic

Incorrect referral fee calculations

The referral fee calculation in the marketplace contract subtracted a small percentage from the total buyer fee instead of taking a percentage of it, so the referral payout came out far larger than intended. An attacker could name themselves as referrer and receive up to roughly 90% of the buyer fee total rather than the expected 10%.

SecondSwap

Medium
Smart contracts

In transferVesting , the grantorVesting.releaseRate is calculated incorrectly, which leads to the sender being able to unlock more tokens than were initially locked.

When a user transfers part of their vesting to the marketplace, the contract recalculates the seller's release rate using the full total amount rather than the unclaimed remainder, so the seller can claim tokens they have already received. An attacker can therefore unlock more tokens than they originally locked, taking tokens owed to other vesting participants.

SecondSwap

High
Access control

Creator of one vesting plan can affect vesting plans created by other users.

The vesting deployer contract stored token ownership in a mapping keyed by owner address rather than token address, allowing a token to have multiple owners. A creator of one vesting plan could then influence or create vesting plans for the same token, potentially causing loss of funds from the actual creator.

SecondSwap

Medium
Business logic

Listing potential can not be purchased with discounted price

A listing with a fixed discount could have a discounted price so low that the calculated payment amount rounds down to zero, causing the purchase transaction to revert. This prevents buyers from purchasing discounted vesting entries.

SecondSwap

Medium
Smart contracts

Rounding error in stepDuration calculations.

The vesting contract calculates step duration by integer division, which can round down to zero or cause the schedule to finish early. An attacker could cause a denial of service on the claim function or make vesting complete prematurely.

SecondSwap

Medium