DAOFi

QuantstampFiles named in the report

Quantstamp reviewed DAOFi on 8 Feb 2021: 15 findings, 0 critical; 6 marked fixed, 9 acknowledged.

No open critical findings
Open the reportOpen DAOFi’s security record

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings15

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High004
Medium020
Low072
MediumDenial-of-Service (DoS)Acknowledged

A Denial-of-Service (DoS) attack is a situation which an attacker renders some functionality unavailable. Specifically the function `createPair()` is prone to a DoS attack through front-running. A malicious user may front-run the function and provide a different `pairOwner` argument. Consequently, a new pair contract would have an owner chosen by the attacker. The same issue applies to functions `addLiquidity()` and `addLiquidityETH()`.

MediumIncorrect input validationAcknowledged

When initializing `DAOfiV1Pair` using the function `initialize()`, following the natspec documentation, `_n` value should be between 1 and 3. However, the hardcoded `MAX_N` value is equal to 1 instead of 3 as documented.

LowAdd and remove liquidity designAcknowledged

The functions `deposit()` and `withdraw()` can be called only once by the router contract, meaning that users won't be able to provide liquidity after the initial deposit call. Such implementation will cause higher slippage since there will be less liquidity in the pools (only one user is allowed to deposit, and only the owner is allowed to withdraw).

LowAnyone Can Provide LiquidityAcknowledged

Since the pool is designed to allow only one liquidity provider, only the owner should be able to add and remove liquidity via `addLiquidity()` and `removeLiquidity()`. If another user uses a deployed pair and provides liquidity (through `addLiquidity()` or `addLiquidityETH()`), they will not be able to withdraw their deposit since only the owner is allowed to do so. Furthermore, a malicious user can deposit a small amount of tokens to deny service for the pool owner.

LowCode hash computationAcknowledged

The L25 contains hardcoded code hash.

LowGas Usage / `for` Loop ConcernsAcknowledged

Gas usage is a main concern for smart contract developers and users, since high gas costs may prevent users from wanting to use the smart contract. Even worse, some gas usage issues may prevent the contract from providing services entirely. Specifically, unvetted tokens may consume all the passed gas in L84.

LowNumerical precisionAcknowledged

The function `_convert()` converts token amounts so that they have 8 decimals. This may result in lost precision.

LowPrivileged Roles and OwnershipAcknowledged

Smart contracts will often have `owner` variables to designate the person with special privileges to make modifications to the smart contract.

LowRebasing tokensAcknowledged

DAOfi pair contract computations are incompatible with rebasing tokens.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (18)

  • contracts/DAOfiV1Factory.sol
  • IERC20.sol
  • contracts/libraries/SafeMath.sol
  • DAOfiV1Library.sol
  • IERC2612.sol
  • contracts/interfaces/IDAOfiV1Pair.sol
  • contracts/interfaces/IERC20.sol
  • IWxDAI.sol
  • ERC20.sol
  • IDAOfiV1Router01.sol
  • IWETH10.sol
  • contracts/test/ERC20.sol
  • WETH10.sol
  • WxDAI.sol
  • SafeMath.sol
  • DAOfiV1Router01.sol
  • contracts/interfaces/IDAOfiV1Factory.sol
  • contracts/DAOfiV1Pair.sol

Part of DAOFi’s security record

DAOFi
Audits1 audit by 1 firmLast audit Feb 2021, by Quantstamp.
Critical findingsNo open critical findingsIn 1 report.
Open DAOFi’s security record

Security firm

Quantstamp

236 projects reviewed · 332 reports · latest Oct 2026

See Quantstamp’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us