Skip to content

Sherlock

WOOFi Swap

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

disclosed reports
9
most reported class
Business logic
bug classes found
1
first disclosure
2024
Find WOOFi Swap on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what WOOFi Swap chose to make public.

Business logic

Price manipulation by swapping any ````baseToken```` with itself

The WooPPV2.swap() function allows swapping a base token with itself, which causes the oracle price to drift instead of remaining unchanged. An attacker could repeatedly perform such self-swaps to manipulate the price of any base token, potentially affecting other applications that rely on the oracle.

WOOFi Swap

Medium
Business logic

In the function _handleERC20Received, the fee was incorrectly charged

The contract incorrectly charged an external swap fee on internal swaps, and when an internal swap failed, the fee was not refunded to the user. This meant users paid an extra fee on internal swaps and lost that fee on failures.

WOOFi Swap

Medium
Business logic

Swaps can happen without changing the price for the next trade due to gamma = 0

The WooPPV2 pool calculates a price adjustment factor (gamma) that can round down to zero for small swaps, leaving the price unchanged after each trade. An attacker could repeatedly swap small amounts to trade a significant volume without moving the price, gaining an unfair advantage.

WOOFi Swap

Medium
Audit finding

WooFi oracle can fail to validate its price with Chainlink price feed

The WooFi oracle calculates a reference price from Chainlink feeds using 8-decimal precision, which can round down to zero when the base token is very cheap and the quote token is expensive. This causes the oracle to treat the Chainlink price as unset and skip validation, potentially allowing trades at incorrect prices.

WOOFi Swap

Medium
Business logic

Pool can be drained

The pool's swap mechanism can be exploited to drain funds by manipulating the price through a series of swaps, especially for tokens without a Chainlink price feed. An attacker could use a flash loan to sell a large amount of tokens in small pieces, then buy back at a manipulated price, profiting at the pool's expense.

WOOFi Swap

High
Business logic

Potential damages due to incorrect implementation of the ````ZIP```` algorithm

The fallback function in WooracleV2_2 interprets zipped price data without reserving the first four bytes, so the data can accidentally match a normal function selector. An attacker could craft zipped data that collides with functions like renounceOwnership or setStaleDuration, causing unintended state changes or price manipulation.

WOOFi Swap

Medium
Business logic

Selling partial base tokens are more profitable then selling in one go

The WooFi swap formula makes selling base tokens in multiple smaller swaps more profitable than selling the same total amount in one swap, allowing users to bypass the maxNotionalSwap and maxGamma limits and receive more quote tokens.

WOOFi Swap

Medium
Business logic

Medium5-CrossChainWETHSwapFeesChargedUnnecesarily

When a user bridges sgETH and requests WETH as the destination token, the contract wraps the received native ETH into WETH and then performs a redundant WETH-to-WETH swap through WooRouterV2, which charges an unnecessary fee. This causes users to lose funds that they should not have been charged.

WOOFi Swap

Medium