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.
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.
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.
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.
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.
The claimAllForMember function in the Dao contract lacks access control, allowing anyone to claim unlocked bonded LP tokens for any member. This can reduce a member's weight in the BondVault, potentially preventing them from finalizing a proposal or reducing their rewards.
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.
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.
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.
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.
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.
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.
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.
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.
The deposit function sets a member's last deposit time to a future timestamp, which resets their reward accrual. Since depositForMember can be called by anyone, an attacker can repeatedly deposit for a victim to prevent them from earning any rewards.
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.
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.
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.
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.
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.
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.
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.
In the claimForMember function, the claimable amount is subtracted from the member's bonded LP balance before the check that decides whether to zero the claim rate. This can either permanently lock half of a member's bonded LP funds or leave the claim rate non-zero after a full withdrawal.
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.
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.
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.
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.
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.
SP
Spartan Protocol Contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.