Aptos Grant DAO-Audit

CertiKCode version: not recorded (see the report)

CertiK reviewed Dora Factory (Aptos Grant DAO-Audit) on 28 Oct 2022: 12 findings, 0 critical; 8 marked fixed, 4 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings12

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium001
Low207
MediumUpdate `min_area` MistakenlyFixed

The `min_area` is updated mistakenly. In the `else-if` condition, the `min_area` may not be the current project's `area`. Because the current project's `area` increases at this time, the real `min_area` may come from the previous second smallest project. For example: - Project A has the smallest area at this moment, and its `area` is 10. - Project B is the second smallest project at this moment,, and its `area` is 12. - Someone votes the project A again, and its `area` is 15 now. In this time, the `else-if` condition is met and the `min_area` will be updated to `15`. However, the real `min_area` should be 12, and the `min_area_index` should be the id of project B. ```rust=538 if(area < round.min_area || round.min_area == 0) { round.min_area = area; round.min_area_index = project_id; } else if(round.min_area_index == project_id) { round.min_area = area; }; ``` ```rust=550 if(area < track.min_area || track.min_area == 0) { track.min_area = area; track.min_area_index = project_id; } else if(track.min_area_index == project_id) { track.min_area = area; }; ```

LowA Controversial RestrictionFixed

Please confirm which one of following restrictions is more suitable. - `amount > pow_10_decimals / round.voting_unit` - `amount >= pow_10_decimals / round.voting_unit`

LowCode OptimizationFixed

The `round_id` is never changed in the while-loop, so it only needs to be checked once. It would be a waste of gas to check every iteration. ```rust=474 while(i < length) { let project_id = *vector::borrow(&project_ids, i); check_project_id(round_id, project_id); let amount = *vector::borrow(&amounts, i); let data = borrow_global_mut<Data>(@QF); let round = vector::borrow_mut(&mut data.rounds, round_id-1); assert!( round.status == ROUND_STATUS__OK, error::invalid_state(ERR_ROUND_STATUS_NOT_OK) ); ... ```

LowImport Module from Wrong PackageFixed

The `event` module is declared in the `aptos_framework`. However, the module `qf` import `event` from the package `aptos_std` as below. ```rust=13 use aptos_std::event; ```

LowInappropriate `error::already_exists`Fixed

```rust=144 assert!( exists<Data>(@QF), error::already_exists(ERR_NOT_PUBLISHED), ); ``` The error code will be issued when `@QF` has no resource `Data`, so it is not appropriate to use `error::already_exists` here.

LowLack of Restrictions on `votes`Fixed

Accuracy loss may occur in the calculation of the `votes`. ```rust=508 let votes = amount * round.voting_unit / pow_10_decimals; ```

LowUnused ConstantsFixed

Many constant variables are declared but never used in the project.

LowWrong Event ParameterFixed

```rust=557 event::emit_event(&mut data.events, QFEvent { type: EVENT_TYPE__VOTE, account: account_addr, round: round_id, project: round.project_number, amount, }); ``` According to the logic of the function `batch_vote()`, the event emitted should record the id of the project being voted.

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.

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