Hunt prep
Before you test WOOFi Swap
What 9 disclosed reports say about WOOFi Swap: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 8 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Price manipulation by swapping any ````baseToken```` with itself
The protocol team fixed this issue by adding a check that baseToken1 and baseToken2 are not equal.
Disclosed
-
In the function _handleERC20Received, the fee was incorrectly charged
The fee calculation should be applied only to external swaps, and the fee should be refunded if the external swap fails.
Disclosed
-
Swaps can happen without changing the price for the next trade due to gamma = 0
The protocol was fixed by adding a sanity check to revert when gamma is zero, as shown in the linked pull request.
Disclosed
-
WooFi oracle can fail to validate its price with Chainlink price feed
The precision should be increased to 18 decimals to avoid rounding to zero.
Disclosed
-
Pool can be drained
The protocol team fixed this issue by merging code changes that likely enforce the use of tokens with Chainlink price feeds or adjust the swap limits.
Disclosed
-
Potential damages due to incorrect implementation of the ````ZIP```` algorithm
The fallback should require the first four bytes to be a reserved selector (e.g., zero) and start parsing the zipped data from the fifth byte.
Disclosed
-
Selling partial base tokens are more profitable then selling in one go
The formula should be changed so that splitting a swap does not reduce the total price impact, for example by making the price impact depend on cumulative volume rather than individual swap size.
Disclosed
-
Medium5-CrossChainWETHSwapFeesChargedUnnecesarily
The contract should be modified to skip the swap when the desired toToken is WETH, and instead directly send the WETH to the user.
Disclosed