Skip to content

Sherlock

DODO V3 update

Every publicly disclosed report for DODO V3 update and what kind of bugs they were.

disclosed reports
29
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find DODO V3 update on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what DODO V3 update chose to make public.

Business logic

Calls to liquidate don't write down totalBorrows which breaks exchange rate

The liquidate function does not decrement the totalBorrows state variable for the debt token, so the exchange rate of the corresponding pToken remains artificially high. This causes depositors to receive more interest than they should, and the last withdrawer may be unable to redeem their pTokens due to insufficient underlying tokens.

DODO V3 update

High
Business logic

Possible loss of Funds

The liquidation function uses ERC20 transferFrom without checking the return value, so transfers may silently fail. This could let a liquidator receive collateral without paying debt, or pay debt without receiving collateral.

DODO V3 update

Medium
Business logic

User can perform sandwich attack on withdrawReserves for profit

The vault's exchange rate increases when the owner calls withdrawReserves, so an attacker can deposit just before the withdrawal and withdraw just after to profit from the rate change. This lets them steal value from other users.

DODO V3 update

High
Business logic

traceurl - miss updating pool's token balance after finishLiquidation()

The finishLiquidation() function in D3VaultLiquidation.sol fails to update the pool's token balance after a liquidation, causing a mismatch between the recorded balance and the actual token balance. This could lead to serious problems, though the specific exploit is not detailed.

DODO V3 update

High
Business logic

Protocol is completely incompatible with USDT due to lack of 0 approval

The protocol's approval logic for USDT is flawed because it does not reset the allowance to zero before setting a new non-zero approval, and a wrong allowance check causes repeated approvals. This could make it impossible to liquidate or borrow USDT.

DODO V3 update

Medium
Business logic

It's dangerous for makers to set token decimal by manual

A smart contract function that registers a new token stores the token's decimal value as a maker-supplied input without checking it against the token itself. If a maker enters the wrong decimal, swaps involving that token would transfer more or less than the expected amount.

DODO V3 update

Medium
Smart contracts

vault balance not updated in withdrawReserves()

The withdrawReserves() function does not update the vault balance after transferring reserves out, leading to an incorrect exchange rate calculation. This could impact many funding-related functions.

DODO V3 update

High
Business logic

parseAllPrice not support the tokens whose decimal is greater than 18

The price parsing function in DODOv3 fails when a token has more than 18 decimals because it subtracts the token's decimals from 18, causing an underflow. This prevents users from trading such tokens, even though they are standard ERC20 tokens.

DODO V3 update

Medium
Smart contracts

liquidationTarget is not set when removing pool

When removing a pool, the vault's startLiquidation function is called directly without setting liquidationTarget, so later the team cannot finish liquidation and balance the vault's borrow recording. This may prevent the pool from being removed successfully.

DODO V3 update

Medium
Business logic

Use safeTransferFrom() instead of transferFrom()

The contract used ERC20 transfer and transferFrom without checking their boolean return values, so failed transfers could be treated as successful. Tokens that do not return a boolean, such as USDT, would cause transactions to revert, making them unusable in the protocol.

DODO V3 update

Medium
DoS

`call()` should be used instead of `transfer()` on an address payable

The smart contract uses the deprecated transfer() function to send Ether, which forwards a fixed 2300 gas. This can cause transactions to fail if the recipient is a contract that requires more gas, such as a multisig wallet or a proxy.

DODO V3 update

Medium