Skip to content

Code4rena

BadgerDAO ibBTC Wrapper contest

Every publicly disclosed report for BadgerDAO ibBTC Wrapper contest and what kind of bugs they were.

disclosed reports
8
most reported class
Business logic
bug classes found
2
first disclosure
2021
Find BadgerDAO ibBTC Wrapper contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what BadgerDAO ibBTC Wrapper contest chose to make public.

Business logic

Approved spender can spend too many tokens

The approve function uses internal shares while transferFrom uses rebalanced amounts, so an approved spender can transfer more tokens than intended as the share price grows. This could let a spender exceed the allowance.

BadgerDAO ibBTC Wrapper contest

High
Business logic

The design of wibBTC is not fully compatible with the current Curve StableSwap pool

The wibBTC token's balance changes automatically as its pricePerShare increases, but the Curve StableSwap pool records balances only at deposit/withdrawal, so the pool's stored balance diverges from the actual token balance. This can cause liquidity providers to receive less than expected when removing liquidity.

BadgerDAO ibBTC Wrapper contest

High
Business logic

hard to clear balance

The contract does not allow users to transfer shares directly, making it difficult to clear all shares. Users interacting via MetaMask may see the price per share increase after transactions, which the reporter considers a medium-risk issue.

BadgerDAO ibBTC Wrapper contest

Medium
DoS

Unable to transfer WrappedIbbtc if Oracle go down

The WrappedIbbtc token calls the oracle's pricePerShare function during every transfer and transferFrom, so if that oracle call reverts, users cannot move their tokens at all. The report notes this differs from WrappedIbbtcEth, which uses a cached price and so keeps working when the oracle is unavailable.

BadgerDAO ibBTC Wrapper contest

Medium
DoS

Null check in pricePerShare

The oracle could return a price of zero for a share, causing division by zero in calculations that use SafeMath, which would revert transactions and lead to a denial of service.

BadgerDAO ibBTC Wrapper contest

Medium
Audit finding

WrappedIbbtc and WrappedIbbtcEth contracts do not filter out price feed outliers

The WrappedIbbtc and WrappedIbbtcEth contracts use a price per share value without checking for outliers, so if the price feed is manipulated or malfunctions, users could mint or burn at a distorted price. An attacker could exploit this to gain an economic advantage.

BadgerDAO ibBTC Wrapper contest

High
Business logic

No sanity check on pricePerShare might lead to lost value

The wibbtc contract calculates transfer amounts using pricePerShare without any sanity check. If pricePerShare is incorrectly low due to a bug or oracle issue, an attacker could receive more tokens than deserved and drain the Curve pool.

BadgerDAO ibBTC Wrapper contest

Medium