Dora Grant DAO V4

CertiKFiles named in the report

CertiK reviewed Dora Factory (Dora Grant DAO V4) on 6 Mar 2023: 11 findings, 0 critical; 4 marked fixed, 1 acknowledged, 6 open.

No open critical findings
Open the reportOpen Dora Factory’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical000
High010
Medium000
Low604
LowBroad ConditionOpen

According to the design, the contract regards 32 native tokens as one unit. Users can withdraw an integer number of units of native tokens through the `unstake()` function. ```solidity uint256 public constant DEPOSIT_SIZE = 32 ether; function unstake(uint256 _count) external { require(_count < 1 ether, "too large"); uint256 unstakeAmount = _count * DEPOSIT_SIZE; ... } ``` However, the verification condition of the `count` is too broad. One unit represents 32 native tokens with precision (32 * 10**18), so the function allows users to withdraw less than `1 * 10**18 * 32 * 10**18` native tokens at a time. It is unlikely that someone will hold so many native tokens, so the verification condition is meaningless.

LowDesign of `unstake()`Open

According to the logic, if the user stakes more than 32 native tokens, tokens will be deposited into the `Deposit` contract through the `stake()` function. However, if the user calls `unstake()` function, the contract will not transfer the staked tokens from the `Deposit` contract to the user.

LowIncompatibility with Deflationary TokensOpen

When transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=143 require(token.transferFrom(msg.sender, address(this), _amount)); ``` - Transferring tokens by `_amount`. ```solidity=154 user.activeDonation += _amount; ``` - The `_amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. --- ```solidity=77 require(token.transferFrom(msg.sender, address(this), _amount)); ``` - Transferring tokens by `_amount`. ```solidity=79 u.stakingAmount += _amount; ``` - The `_amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.

LowSafeMath Not UsedOpen

OpenZeppelin's `SafeMath` library is not used in the above contracts, making it possible for overflow/underflow to occur and lead to inaccurate calculations.

LowThird Party DependencyOpen

The contract is serving as the underlying entity to interact with one or more third party protocols. The scope of the audit treats third party entities as black boxes and assume their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=15 IERC20 public token; ``` - The contract `BuidlDonation` interacts with third party contract with `IERC20` interface via `token`. --- ```solidity=11 IERC20 public token; ``` - The contract `DoraChecker` interacts with third party contract with `IERC20` interface via `token`.

LowUnnessary Variable `owner`Open

According to the logic, the user who called the `init()` function will be set as the owner of the contract. ```solidity=66 function init(IERC20 _token, DoraChecker _checker) external { require(owner == address(0)); owner = msg.sender; token = _token; checker = _checker; } ``` However, after the `owner` is set, it is not used at all.

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 (3)

  • contracts/DoraChecker.sol
  • contracts/StakingEntry.sol
  • contracts/BuidlDonation.sol

Part of Dora Factory’s security record

Dora Factory
Audits4 audits by 2 firmsLast audit Jun 2024, by Oak Security.
Critical findings1 critical acknowledged, not fixedReported in “Dora Vota audit” by Oak Security, Jun 2024. The team acknowledged it.
Open Dora Factory’s security record

Security firm

CertiK

1,044 projects reviewed · 1,393 reports · latest May 2025

See CertiK’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