Skip to content

Code4rena

DittoETH Invitational

Every publicly disclosed report for DittoETH Invitational and what kind of bugs they were.

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

Disclosed reports

Newest first. Only what DittoETH Invitational chose to make public.

Business logic

DUSD assets can be minted with less ETH collateral than required

The cancelShort function calculates the collateral needed to top up a partially filled short record using the stale order price and the order's collateral ratio, which can be below 100%. An attacker can cancel such a short to mint DUSD with less ETH collateral than required, potentially de-pegging the token.

DittoETH Invitational

High
Business logic

Users can evade the yDUSD vault’s withdrawal timelock mechanism

The yDUSD vault's withdrawal timelock could be bypassed because the withdraw function used the caller's withdrawal proposal rather than the owner's. An attacker with a second account could use that account's proposal to withdraw their own assets without waiting the 7-day period.

DittoETH Invitational

Medium
Business logic

Attacker can profit from discount fees

The discount fee is calculated from the entire debt rather than the traded amount, so an attacker can deliberately trigger a small discounted trade and mint a larger fee to the yDUSD vault, profiting if they hold shares. The attacker could gain more dUSD in fees than lost from the trade.

DittoETH Invitational

High
Access control

An attacker can cancel other people’s short orders

The function that transfers a short record does not verify that the short order referenced by the NFT still belongs to the same user before cancelling it. An attacker can therefore cancel other users' short orders by reusing identifiers after their own orders are cancelled.

DittoETH Invitational

High
Business logic

Users can mint DUSD with less collateral than required, which gives them free DUSD and may open a liquidatable position

When a user cancels a partially filled short order, the code mints additional DUSD to bring the short record up to the minimum debt, but calculates the required collateral using the short order's original collateral ratio and price rather than the current oracle price and the asset's initial collateral ratio. This lets an attacker mint more DUSD than the collateral they provided, potentially opening an immediately liquidatable position.

DittoETH Invitational

High
Business logic

Closing a SR during a wrong redemption proposal leads to loss of funds

A redemption proposal can list short records that are later closed before anyone disputes it, and the dispute logic then adds the penalty collateral to the already-closed record instead of returning it. This means the proposer's funds are effectively lost when a wrong proposal is disputed after one of its short records has been closed.

DittoETH Invitational

High
Business logic

Valid redemption proposals can be disputed by decreasing collateral

The decreaseCollateral function changes a short record's collateral ratio without updating its updatedAt timestamp, so the one-hour dispute buffer does not apply. An attacker can lower their own short record's ratio after a valid redemption proposal, dispute that proposal, and collect the penalty fee from the proposer.

DittoETH Invitational

High
Business logic

Flawed if check causes inaccurate tracking of the protocol’s ercDebt and collateral

A flawed if check using && instead of || in claimRemainingCollateral allows a shorter to claim collateral for a short record before the dispute period ends. This leads to inaccurate tracking of the protocol's ercDebt and collateral because a deleted short record can still be disputed, causing the asset's totals to include non-existent debt and collateral.

DittoETH Invitational

High
Business logic

Can manipulate the C.SHORT_STARTING_ID ShortRecord of the TAPP

The TAPP's special short record (C.SHORT_STARTING_ID) can be moved to the reusable ID list when fully liquidated, but later filling it does not remove it from that list. An attacker can then transfer a short record NFT to the TAPP, causing the ID to be reused and overwriting the TAPP's short record, which can prevent risky debts from being liquidated.

DittoETH Invitational

Medium
Smart contracts

The colRedeemed variable is wrongly retrieved in LibBytes::readProposalData function

The LibBytes::readProposalData function used an addition operation instead of a bitwise AND to extract the colRedeemed field from packed proposal data, producing an incorrect value. This could cause the RedemptionFacet contract to use a wrong colRedeemed amount when claiming a redemption.

DittoETH Invitational

Medium
DoS

ShortOrders can be created with ercAmount == minAskEth/2 , increasing the gas costs for matching large orders and disincentivizing liquidators from liquidating them

A user can create a ShortOrder with an ercAmount of minAskEth/2 by matching a bid that leaves that amount and then exiting the ShortRecord using a cancelled ShortOrder ID that still points to it. This can increase gas costs for matching large orders and disincentivize liquidators from liquidating small orders.

DittoETH Invitational

Medium
Business logic

The shortOrder verification bug on the RedemptionFacet::proposeRedemption() allows an attacker to leave a small shortOrder on the order book, leading to the protocol’s bad debt

The proposeRedemption function loads a shortOrder using an attacker-supplied ID and only checks that the order belongs to the shortRecord after a condition that can be bypassed by pointing to a different order. An attacker can therefore keep a small shortOrder on the order book, which later leaves a shortRecord below the minimum size, discouraging liquidators and causing bad debt.

DittoETH Invitational

Medium
Business logic

If a redemption has N disputable shorts, it is possible to dispute N-1 times the redemption to maximize the penalty

The redemption dispute mechanism allowed a disputer to split a single dispute into multiple smaller disputes, each applying a penalty based on a higher collateral ratio difference, resulting in a larger total penalty than disputing the whole proposal at once. An attacker could exploit this to extract more funds from the redeemer as a disputer reward.

DittoETH Invitational

Medium