The swing trader trigger validation relies on a manipulable live price, allowing an attacker to claim the default incentive in two consecutive blocks. The attacker could use a flash loan or sandwich attack to manipulate the price and receive the incentive again.
The addSwingTrader function does not check that each traderContract is unique, so the same contract can be registered under multiple trader IDs. This causes functions like buyMalt and sellMalt to distribute shares incorrectly because they rely on trader balances.
In the StabilizerNode contract, the minimum price threshold is computed by subtracting a slippage amount from the latest price sample, which assumes the latest sample is at least the price target. When the latest sample is below the target, the subtraction underflows and the stabilize call reverts with an arithmetic error rather than a clear message.
The stabilize function reads stale collateral ratio data because it does not refresh the global implied collateral service before using it for price calculations. An attacker could manipulate the collateral ratio by moving funds out of the swing trader, causing stabilize to use incorrect data and potentially depeg the malt token.
The reward declaration function subtracts a stored previous vested amount from the current vested amount of the vesting distributor, but the admin can swap the distributor without resetting that stored value. If the new distributor reports a smaller vested amount, the subtraction underflows and the reward declaration reverts, blocking rewards until the admin restores the old distributor.
The stabilize function calculates the collateral ratio using global collateral that includes undistributed rewards sitting in the overflow pool, so the ratio can be overstated. An attacker could not directly exploit this, but the incorrect ratio could lead to wrong price targets and destabilise the peg.
In LinearDistributor.declareReward, when the calculated reward exceeds the contract's balance, the distributed amount is capped at the balance, but previouslyVested is still advanced to the full currentlyVested value. As a result, the rewards that could not be paid out are skipped and lost in subsequent distributions.
The Malt protocol reads a cumulative price from a Uniswap V2 pool that intentionally overflows, but its own Solidity 0.8 code reverts on overflow when subtracting the previous value. This makes the stabilize() function always revert once the pool's cumulative price wraps around.
The declareReward function in LinearDistributor can revert if the contract's collateral token balance exceeds the buffer requirement, because the forfeit logic requires the excess to be no more than the declared balance. An attacker can send collateral tokens to the contract to trigger this revert, potentially causing a permanent denial of service if enough tokens are sent to cover all vested rewards.
The addSwingTrader function pushes a trader ID to the activeTraders array even when the trader is created as inactive. This causes the trader to be counted twice in balance calculations and prevents it from being fully removed when toggled inactive, leading to incorrect financial data.
The RewardThrottle contract has two functions that fill in past epochs without profit, but only one of them requests and distributes the missing reward from the overflow pool. If the other function is called first, the epoch is marked as filled and the reward is permanently lost.
MaltRepository overrides hasRole to also require validRoles[role], so once a role is removed via removeRole, _revokeRole silently fails to revoke it from an account. An attacker holding a removed role could keep it, and _transferRole would grant the role to a new account without removing it from the old one.
The admin-only function that copies epoch data from a previous throttle contract can be front-run by any user calling the public gap-filling function, which advances the active epoch first. This could cause the admin's population call to be invalidated or to write state for future epochs.
The sellMalt function returns early when the amount sold plus a dust threshold reaches the maximum, skipping the update of the totalProfit variable. As a result, totalProfit can be understated, affecting other contracts that rely on it.
The setTimekeeper function lets a privileged role swap the timekeeper contract while the reward throttle is active, and if the new timekeeper reports a different epoch number the reward accounting breaks. An attacker with that role could raise the epoch and then claim a large batch of rewards, or lower it and block rewards for the current epoch.
The _removeContract function in Repository.sol resets the contract's index to zero before using it to update the contracts array, so it always replaces the first element with the last and leaves the removed name in the array. This corrupts the list of contract names, causing valid contracts to be removed and the removed contract to remain.
The reward distribution function transfers tokens to each distributor and then calls declareReward, which reverts if any distributor is inactive. An attacker could not directly exploit this, but an inactive distributor would cause the entire reward distribution to fail, blocking rewards for all active distributors.
The admin function populateFromPreviousThrottle() copies epoch data from a previous throttle contract and advances activeEpoch, but if the new epoch is less than the smoothing period ahead of the old one, the average APR calculation mixes cumulative values from different epochs. This could cause targetAPR to be adjusted incorrectly.
The stabilize() function refreshes pool tracking data but does not update the lastTracking timestamp, so the separate trackPool() function can still pay its tracking incentive immediately afterwards. An attacker could repeatedly call stabilize() and then trackPool() to collect incentives more often than intended.
The stabilize function uses a different price target than the early check that decides whether to adjust supply, so when stabilizing to peg it can choose to run an auction instead of selling malt, or the reverse. This inconsistency could lead to the wrong stabilisation action being taken.
The profit distribution function reads stale collateral deficit and ratio values from globalIC because the contract does not synchronise globalIC before calling handleProfit. This causes the swing trader's collateral to be understated, making the deficit appear larger and leading to an incorrect split of profits between liquidity providers and the swing trader.
The stabilisation mechanism that should return the Malt token price to its peg can be sandwiched by anyone, allowing them to extract profit that would otherwise go to investors. An attacker can use a flash loan to sell Malt at a high price, call stabilize to push the price down, then buy back Malt cheaply and repay the loan, keeping the difference.
The setRewardToken function allows an admin to change the reward token, which resets totalDeclaredReward to zero but leaves accumulated padding variables unchanged, causing accounting inconsistencies. An attacker with admin privileges could exploit this to disrupt reward distribution.
The bondToAccount() function uses a per-address same-block check that can be bypassed by calling through an intermediary smart contract, because the check keys on msg.sender. An attacker could therefore perform multiple actions in the same block that the protocol intended to prevent.
The internal withdrawal function updated its accounting after transferring the reward token, so a token with transfer hooks could re-enter the withdrawal and drain the pool. An attacker using such a token could repeatedly withdraw before the recorded amount was updated.
The `_getFirstSample` helper in a moving-average contract computed the first sample index as if the ring buffer had already wrapped, so before the buffer filled it pointed at a zero-initialised slot instead of index zero. This produced an incorrect time-weighted average price, which the sponsor said could leak value but did not put funds directly at risk.
The purchaseArbitrageTokens function appends the current auction ID to an array every time it is called, so calling it multiple times for the same auction creates duplicate entries. This can cause the claim function to mishandle the replenishingIndex, potentially preventing participants from claiming rewards without manual intervention.
The UniswapHandler contract calls UniswapV2Router methods for swapping and removing liquidity without setting a minimum output amount, passing zero instead. An attacker can watch the mempool and sandwich these transactions to profit from the guaranteed trade.
The Dutch auction for arbitrage tokens can be manipulated by purchasing all but one wei of the maximum commitments, preventing the auction from ending early and forcing it to continue until the price drops to the midpoint between start and end. An attacker can thus guarantee a purchase at a lower price.
MP
Malt Protocol - Versus 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.