Skip to content

Code4rena

Salty.IO

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

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

Disclosed reports

Newest first. Only what Salty.IO chose to make public.

Business logic

First depositor can break staking-rewards accounting

The staking rewards contract calculates virtual rewards using a ratio that the first depositor can manipulate by donating SALT tokens, causing the virtual rewards to exceed the uint128 limit and break the reward accounting. This allows the sum of claimable rewards to exceed the contract's SALT balance, leading to failed claims and loss of yield.

Salty.IO

High
Business logic

No proposal time limit traps sponsors of unpopular proposals

A staker can sponsor only one active proposal at a time, and if that proposal never reaches quorum it cannot be finalised or cancelled, so the staker is permanently blocked from creating new proposals. An attacker could exploit this by sponsoring a proposal that is unlikely to reach quorum, trapping the sponsor.

Salty.IO

Medium
Smart contracts

_getUniswapTwapWei() will show incorrect price for negative ticks cause it doesn’t round up for negative ticks

The Uniswap TWAP price function truncates the tick toward zero instead of rounding down for negative ticks, so when the tick cumulative difference is negative and not divisible by the interval, the returned tick is too high. This can produce an incorrect price, enabling price manipulation and arbitrage, and may cause pricing logic to revert.

Salty.IO

Medium
Business logic

Incorrect calculation to check remaining ratio after reward in StableConfig.sol

The contract's check for the remaining collateral ratio after liquidation rewards used a subtraction instead of a percentage calculation, so the actual buffer could fall below the intended 105% of the borrowed amount. This could leave the position less protected against market volatility than the protocol intended.

Salty.IO

Medium
Business logic

Caller of Upkeep may skip step 11 to save gas

The upkeep function runs multiple steps in try/catch blocks, and a caller can supply just enough gas to complete steps 1–10 but not step 11, so step 11 reverts and is caught while the caller still receives the 5% incentive. This lets the caller save gas and skip sending SALT from the team vesting wallet to the team.

Salty.IO

Medium
Business logic

StakingRewards pools are not given their promised share of rewards due to incorrect calculation

The RewardsEmitter contract calculates each pool's reward share by multiplying the current pending rewards by a daily percentage, then subtracting that amount from pending rewards. Because the percentage is applied to a shrinking balance, the total distributed over time is less than intended, and frequent upkeep calls further reduce the daily payout.

Salty.IO

Medium
Business logic

Salt Rewards - Rewards related to Arbitrage profits for pools can be lost

The upkeep process converts arbitrage profits from WETH to SALT in step 5, but if that swap fails, step 7 still clears the recorded profits for pools without distributing the corresponding SALT rewards. This can cause liquidity providers to lose their share of arbitrage profits, which may later be misallocated to other pools.

Salty.IO

Medium
DoS

Incorrect assumption in PoolMath.sol can cause underflow when zapping is used

The smart contract's zap swap calculation assumes that after right-shifting large numbers to fit within 80 bits, the condition r1 * z0 > r0 * z1 still holds, but shifting can reduce z0 to zero, causing an underflow and a revert. An attacker could trigger this by calling depositLiquidityAndIncreaseShare with useZapping set to true and specific amounts, causing the transaction to fail.

Salty.IO

Medium
Smart contracts

formPOL lacks slippage and deadline protection

The formPOL function lacked slippage and deadline protection when depositing liquidity, allowing an attacker to sandwich the deposit and cause the protocol to lose funds. The issue was acknowledged but the protocol removed POL entirely as a mitigation.

Salty.IO

Medium
Business logic

Attacker Can Inflate LP Position Value To Create a Bad Debt Loan

The value of a liquidity position was calculated from the pool's current token reserves, which an attacker could manipulate by trading to push the reserve ratio away from the correct ratio, inflating the position's apparent value. The attacker could then use this inflated LP position as collateral to borrow more USDS than the position was really worth, creating bad debt.

Salty.IO

Medium
Business logic

Some rewards from POL will not be send to team wallet nor burned

When the DAO's POL is withdrawn during upkeep, the rewards earned are sent to the DAO but not distributed to the team wallet or burned as intended. An attacker could cause some rewards to be stuck, preventing the team from receiving its share and reducing the burn.

Salty.IO

Medium
Business logic

MinShares Slippage Parameters Are Ineffective For Initial Deposit

The initial liquidity share calculation used x + y instead of the geometric mean, making the minShares slippage parameter ineffective for the first deposit. An attacker could front-run the first depositor to inflate shares and manipulate the exchange rate, causing the victim to lose most of their tokens.

Salty.IO

Medium
Business logic

Minimium Collateral Check Can Be Bypassed

The minimum collateral check was enforced only when borrowing USDS, not when withdrawing collateral, so a user could open a small loan and then withdraw collateral to fall below the threshold. This could leave small loans unliquidated, potentially causing bad debt in the protocol.

Salty.IO

Medium
Smart contracts

First Liquidity provider can claim all initial pool rewards

The first liquidity provider to stake in an empty pool receives no virtual rewards deduction, allowing them to claim all accumulated staking rewards. An attacker could deposit a small amount and then claim the entire pool's rewards, up to 5.5k SALT initially.

Salty.IO

High
Business logic

When borrowers repay USDS, it is sent to the wrong address, allowing anyone to burn Protocol Owned Liquidity and build bad debt for USDS

When a borrower repays USDS, the tokens are sent to the USDS token contract instead of the Liquidizer contract, so the Liquidizer's balance never increases even though its burnable-USDS counter does. An attacker can repeatedly borrow and repay to inflate that counter, forcing the protocol to sell its own liquidity to cover the shortfall and eventually leaving bad debt uncovered.

Salty.IO

High
Smart contracts

The user who withdraws liquidity from a particular pool is able to claim more rewards than they should by carefully selecting a decreaseShareAmount value such that the virtualRewardsToRemove is rounded down to zero

The staking contract rounds down the virtual rewards to remove when a user decreases their share, so a user can choose a very small decrease amount that makes this value zero and claim rewards that should not be claimable. This lets the user withdraw more rewards than they are entitled to.

Salty.IO

Medium
DoS

Persistent Contract Call revert prevents finalizing a ballot

The DAO contract does not handle a revert from an external contract call when executing an approved ballot, so the ballot cannot be marked as finalized. This leaves the proposer with an active proposal, preventing them from creating new proposals.

Salty.IO

Medium
DoS

Creation of token whitelisting proposals can be DOS’d

The token whitelisting proposal function enforces a cap on the number of open proposals, so once that cap is reached no new whitelisting proposals can be created. An attacker or group of users could fill the queue with fake token proposals, blocking genuine tokens from being proposed and disrupting protocol functionality.

Salty.IO

Medium
Business logic

If there is only one USDS borrower, he can never be liquidated

The liquidation function reverts when removing a borrower's collateral would leave pool reserves below a minimum threshold, so if a single user holds all the USDS debt, they cannot be liquidated. An attacker could borrow the maximum USDS and avoid liquidation even if their collateral value crashes, causing bad debt for the protocol.

Salty.IO

Medium