Genius - Audit #2

CertiKFiles named in the report

CertiK reviewed Genius AI™ (Genius - Audit #2) on 19 Dec 2022: 22 findings, 0 critical; 9 marked fixed, 4 acknowledged, 9 open.

No open critical findings
Open the reportOpen Genius AI™’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings22

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

SeverityOpenAcknowledgedFixed
Critical000
High002
Medium040
Low907
MediumCentralization Related RisksAcknowledged

In the contract `Genius` the role `oaBeneficiary` has authority over the functions shown in the diagram below. Any compromise to the `oaBeneficiary` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/04e7c6fa4adc40acbb3cc5d847d4a228/diagrams/centralization_Genius-Genius-oaBeneficiary.svg) In the contract `Genius` the role **OaGrantor** has authority over the following functions: - function changeOaGrantor() In the contract `StabilityPool` the role `oaGrantor` has authority over the functions shown in the diagram below. Any compromise to the `oaGrantor` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/04e7c6fa4adc40acbb3cc5d847d4a228/diagrams/centralization_StabilityPool-StabilityPool-oaGrantor.svg) In the contract `Hexodus`, the role **OaGrantor** has authority over the following functions: - function deny() - function grant() Any compromise to the **oaGrantor** account may allow a hacker to take advantage of this authority, grant/deny the Hexodus requests, and set the stability contract in the auction contract.

MediumConfusing Precision of `_issueRate()`Acknowledged

Function `_issueRate()` is to calculate and return the latest collateral issue rate for issuing debt to a collateral miner. For the case `collateralToken == geniusContractAddress`, `GENIUS_PRECISION` is returned, but for the case `activeCollaterals[collateralToken] == true` and `daysSinceLastIssue > 0`, the return value is either `1` or `latestIssueRate` (L278 and L280). The function `_issueRate()` is called in `_issueGeniusDebt()`. ```solidity=379 // Step 1: calculate the Genitos to issue as new debt uint256 rate = _issueRate(collateralToken); // Step 2: calculate Genius Debt Amount uint256 geniusDebtAmount = collateralAmount * GENIUS_PRECISION / rate; ``` Here the `rate` is `1`, and the debt `[collateralAmount * GENIUS_PRECISION]` to be issued would be a large number. It is possible that all assets in the pool would be cashed out when settling the large debt.

MediumNo Immediate Transfer AssetsAcknowledged

When the user calls the `settleGeniusDebt()` or `clearGeniusDebt()` methods, the settlement fees `remainsInPool` for the debt are left in the contract, which affects the settlement rate. ```solitidy=303 if (col.issuedGenitos > col.settledGenitos) { return collateralToken == address(0) ? (address(this).balance - totalNativeTokenRefunds) * GENIUS_PRECISION / (col.issuedGenitos - col.settledGenitos) : IERC20(collateralToken).balanceOf(address(this)) * GENIUS_PRECISION / (col.issuedGenitos - col.settledGenitos); } return 0; ```

MediumTesting FailureAcknowledged

The test coverage for this project is relatively low, it only covers the user's intended behavior (some files even missing that). Unintended behavior and edge cases are not covered in the test. In addition, we attempted to run all test files by `npx hardhat test test/**/* --parallel` and it seems some tests are out-of-date and not runnable. The results seem unexpected that there are 11 passing and 48 failings. #### Update We tried to re-run the tests on commit `770327126bb6d468bbd9963cf627c14540497982` and `3e8e744a660dade89ee400f32a2f09958afc9f39` with the same command, `npx hardhat test test/**/* --parallel`. There are still some tests not runnable and failing.

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

  • contracts/Genius.sol
  • contracts/Hexodus.sol
  • contracts/Auction.sol
  • contracts/StabilityPool.sol
  • contracts/Penalty.sol
  • contracts/Miners.sol
  • contracts/Utilities.sol
  • contracts/Calendar.sol

Part of Genius AI™’s security record

Genius AI™
Audits1 audit by 1 firmLast audit Dec 2022, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Genius AI™’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 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