CertiK reviewed Genius AI™ (Genius - Audit #2) on 19 Dec 2022: 22 findings, 0 critical; 9 marked fixed, 4 acknowledged, 9 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 2 |
| Medium | 0 | 4 | 0 |
| Low | 9 | 0 | 7 |
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.  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.  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.
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.
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; ```
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (8)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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