CertiK reviewed Alaya AI (Alaya - AlayaTraining) on 19 Mar 2024: 7 findings, 0 critical; 1 marked fixed, 6 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 | 1 |
| Medium | 1 | 0 | 0 |
| Low | 5 | 0 | 0 |
The function `update()` can be called by anyone as it has no access restriction. This enables anyone to call this and update the value of `userList[msg.sender]`, which will be used in public view function `listnum()` and function `anum()`
If a compiler version less than 0.8.22 is used, then the following operations can be done to optimize the gas usage: 1. The increment operation saves a small amount of gas if performed from the left (`++i`) instead of from the righthand side (`i++`). 2. The increment operation can be placed in an `unchecked` block at the end of the loop logic, since it is bounded above by the loop limit which must be a `uint256` value, avoiding overflow.
The current codebase allows any user to call `update()` to update their own `userList`. The stored `userList` is only used in public view function `listnum()` and `anum()`.
The formatting and spacing in the contract are inconsistent. Proper formatting is essential for readability and maintainability of the code. Reading and understanding the code becomes more challenging due to inconsistent formatting, which could lead to misunderstandings or overlooks during code review.
The call `Ownable(msg.sender);` in the `constructor()` is unnecessary as the `constructor()` of the contract `Ownable` will already give ownership to the `_msgSender()` and does not take an input.
Throughout the codebase `uint` and `uint256` are used interchangeably.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
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