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
HighIncorrect ConversionFixed

In the function `DAOfoV1Pair._convert()`, when dividing `amount` by `factor`, if `amount` is lower than factor, the input `amount` is not converted (probably to avoid truncation). The function will return the unconverted amount without any information regarding if it was converted or not. All implemented functions that use `_convert()` will process the returned value as if it was converted which is incorrect and can lead to loss of funds for both liquidity provider and users.

HighPoorly documented logicFixed

The pool logic is poorly documented in the code, which impairs external auditing. Furthermore, the implemented logic lacks proper specification. For instance, we couldn't determine the severity of some of the issues and their impact on the system.

HighSwap at fixed priceFixed

In the function `getQuoteOut()` if `amountBaseIn` is equal to or higher than `supply`, the function returns the value of `amountQuoteOut` equal to `quoteReserve` meaning that the token swap is be calculated without any slippage (fixed exchange rate) which is contradictory to the implemented bonding curve where the price varies following the amount to be exchanged. Furthermore, user could exchange too many input tokens, since the function returns the same amount out for any value `amountBaseIn` >= `supply`.

HighUnintentional swapsFixed

Unintentional swaps may occur in the functions `swapExactTokensForTokens()` and `swapExactTokensForETH ()` since both take `sp.sender` as an argument instead of using `msg.sender`.

LowInput ValidationFixed

The following functions do not check if arguments of type address are non-zero: * `DAOfiV1Pair.initialize()`, * `DAOfiV1Pair.setPairOwner()`, * `DAOfiV1Factory.constructor()`, * `DAOfiV1Factory.createPair()`, * `DAOfiV1Router01.constructor()`.

LowRace Conditions / Front-RunningFixed

A block is an ordered collection of transactions from all around the network. It's possible for the ordering of these transactions to manipulate the end result of a block. A miner attacker can take advantage of this by generating and moving transactions in a way that benefits themselves. Specifically, there may be a race condition between transferring tokens to the pair contract and calling the function `swap()`.

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