Skip to content

Code4rena

Spartan Protocol Contest

Every publicly disclosed report for Spartan Protocol Contest and what kind of bugs they were.

disclosed reports
28
most reported class
Business logic
bug classes found
4
first disclosure
2021
Find Spartan Protocol Contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Spartan Protocol Contest chose to make public.

Business logic

SynthVault withdraw forfeits rewards

The SynthVault withdrawal function reduces a user's weight without first claiming their accumulated rewards, so a user who withdraws directly from the contract loses all unclaimed rewards. The unused synthReward variable suggests claiming was intended but never implemented.

Spartan Protocol Contest

High
Business logic

Synth realise is vulnerable to flash loan attacks

The Synth realise function values LP tokens using the AMM spot price, which can be shifted within a single transaction. An attacker could move the pool ratio, call realise, and reverse the trade to change the recorded LP balance and gain value at the protocol's expense.

Spartan Protocol Contest

High
Business logic

Result of transfer / transferFrom not checked

The smart contract calls ERC20 transfer and transferFrom functions without checking their return values. For tokens that return false instead of reverting on failure, an attacker could mint tokens without actually transferring the required tokens, potentially causing loss of funds.

Spartan Protocol Contest

High
Business logic

Misuse of AMM model on minting Synth (resubmit to add more detail)

The Pool contract calculates the amount of Synth to mint using the same AMM formula as a token swap, but minting does not reduce the pool's token balance. An attacker could repeatedly mint Synth at a favourable rate, extracting value and making the synthetic asset hard to keep pegged.

Spartan Protocol Contest

High
Business logic

Dividend reward can be gamed

The dividend reward mechanism in the Router contract can be manipulated by an attacker who makes small trades to reset the average fee to zero, then generates a fee to claim half of the daily allocation repeatedly, draining the reserve.

Spartan Protocol Contest

High
Access control

Missleading onlyDAO modifiers

Several contracts have an onlyDAO modifier that incorrectly allows the deployer (and sometimes only the deployer) to execute privileged functions, rather than restricting access to the DAO. This creates a centralisation risk, as the deployer can perform actions intended for the DAO, and in some cases the deployer cannot be removed, leading to systemic risk.

Spartan Protocol Contest

Medium
Business logic

In the beginning its relatively easy to gain majority share

When the DAO is newly deployed, an attacker can gain a majority share by depositing a large amount into the vaults, then submit and pass a malicious proposal. The riskiest proposal is to replace the DAO, which could let the attacker take over everything.

Spartan Protocol Contest

Medium
Business logic

Synth: approveAndCall sets unnecessary approval

The Synth contract's approveAndCall function grants the recipient contract an unlimited token allowance instead of only the specified amount. An attacker controlling or compromising the recipient contract could exploit this to spend more tokens than intended.

Spartan Protocol Contest

Medium
Smart contracts

Flash loan manipulation on getPoolShareWeight of Utils

The pool share weight calculation uses the current pool balance, which can be inflated by a flash loan swap, allowing an attacker to temporarily increase their voting power and rewards. The attacker can then deposit LP tokens, gain disproportionate influence, and swap back with minimal loss.

Spartan Protocol Contest

High
Business logic

grantFunds will revert after a DAO upgrade.

When the DAO contract is upgraded via moveDao, the Reserve contract's stored DAO address is not updated, so its onlyGrantor check rejects the new DAO. As a result, grantFunds calls from the upgraded DAO revert and grants cannot be paid out.

Spartan Protocol Contest

Medium
Business logic

SynthVault deposit lockup bypass

The SynthVault.harvestSingle function mints synth tokens based on the total BASE balance sent to the pool, including any BASE tokens an attacker transfers beforehand. An attacker can therefore mint and deposit synths without a lockup period, crediting the entire amount to their weight.

Spartan Protocol Contest

Medium
Smart contracts

Pool: approveAndCall sets unnecessary approval

The Pool.approveAndCall function grants the recipient contract an unlimited token allowance instead of only the specified amount. An attacker controlling the recipient contract could spend more tokens than intended.

Spartan Protocol Contest

Medium
Business logic

Pools can be created without initial liquidity

The protocol intended to prevent public pool creation without initial liquidity, but an attacker could use a flash loan to temporarily provide the required liquidity, create the pool, receive LP tokens, and then withdraw the liquidity. This allowed bypassing the intended restriction.

Spartan Protocol Contest

Medium
DoS

Dao.sol : Insufficient validation for proposal creation

The proposal creation functions did not validate the proposal type string or reject null proposed values, so anyone could create malformed proposals. Because a created proposal cannot be cancelled for 15 days, an attacker could block the DAO from creating new proposals.

Spartan Protocol Contest

Medium
Business logic

Hijack token pool by burning liquidity token

The Pool contract allows any user to burn their liquidity tokens without withdrawing the underlying assets, which can reduce the total supply to 1. An attacker can then deposit a large amount and receive zero liquidity tokens due to rounding, effectively locking others out from obtaining LP tokens.

Spartan Protocol Contest

High
Business logic

arbitrary synth mint/burn from pool

The Pool contract allowed minting any valid Synth regardless of which underlying token the pool held, so an attacker could mint an expensive synth from a cheaper pool. The attacker could then burn the minted synth at the expensive pool for profit, amplified with flash loans.

Spartan Protocol Contest

High
Business logic

Missing slippage checks

The smart contract functions lacked minimum output amount checks, allowing an attacker to sandwich transactions and cause large slippage. An attacker with sufficient capital could force nearly 100% slippage.

Spartan Protocol Contest

High
Business logic

SynthVault rewards can be gamed

The SynthVault contract calculates a user's reward weight using the spot price of a synth token, which can be manipulated by trading in the associated liquidity pool. An attacker could inflate their weight with a small deposit and claim a disproportionate share of rewards.

Spartan Protocol Contest

High
Business logic

Members lose SPARTA tokens in removeLiquiditySingle()

When a member called removeLiquiditySingle() asking only for SPARTA, the SPARTA portion of their LP tokens was left in the Router contract instead of being returned to them. The member effectively lost that SPARTA, which could later be claimed by other transactions that remove SPARTA from the Router.

Spartan Protocol Contest

High
Business logic

Pool.sol & Synth.sol : Failing Max Value Allowance

The _approve function in Pool.sol and Synth.sol ignores an allowance of type(uint256).max, leaving the previous allowance unchanged instead of setting it to the maximum. This means integrations that hardcode the maximum value to grant unlimited allowance end up with zero allowance, and approveAndCall sets no allowance at all.

Spartan Protocol Contest

High
Business logic

Vulnerable Pool initial rate.

A pool's initial token price is set when the pool is created at a predictable address, so an attacker can send tokens to that address before creation and skew the starting rate. This lets the attacker mint synthetic tokens at an artificially cheap price and profit from the resulting arbitrage.

Spartan Protocol Contest

Medium
Access control

DEPLOYER can drain DAOVault funds + manipulate proposal results

The DAOVault contract lacks a purgeDeployer function and allows the DEPLOYER role to call onlyDAO functions, so the deployer can deposit LP on behalf of any account and then withdraw the entire balance, draining vault funds and manipulating proposal voting weight.

Spartan Protocol Contest

Medium
Business logic

wrong calcLiquidityHoldings that leads to dead fund in the Pool

The Pool contract mints one kind of LP token both for ordinary liquidity providers and for Synth debt positions, so the two are mixed in the same accounting. An attacker could mint Synth against a pool, then withdraw and burn in an order that leaves the pool holding a large amount of the paired token with no LP holders left to claim it.

Spartan Protocol Contest

High
DoS

Block usage of addCuratedPool

The function curatedPoolCount() loops over an array that can be arbitrarily extended by creating and removing pools, causing it to run out of gas and revert. This prevents addCuratedPool() from being executed, blocking the addition of new curated pools.

Spartan Protocol Contest

Medium
Business logic

BondVault BASE incentive can be gamed

The BondVault matched any deposited token amount with BASE liquidity at the pool's current swap price, so an attacker could manipulate the pool price before bonding and then reverse the manipulation to profit. This let the attacker effectively steal a share of the BASE the DAO supplied to the pool.

Spartan Protocol Contest

Medium