Alaya - AlayaTraining

CertiKFiles named in the report

CertiK reviewed Alaya AI (Alaya - AlayaTraining) on 19 Mar 2024: 7 findings, 0 critical; 1 marked fixed, 6 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical000
High001
Medium100
Low500
MediumLack Of Access ControlOpen

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

Low`for` Loop OptimizationOpen

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.

LowDiscussion on `userList`Open

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()`.

LowInconsistent Formatting and SpacingOpen

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.

LowUnnecessary InitializationOpen

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.

LowUse `uint256` Instead of `uint`Open

Throughout the codebase `uint` and `uint256` are used interchangeably.

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

  • AlayaTraining.sol

Part of Alaya AI’s security record

Alaya AI
Audits1 audit by 1 firmLast audit Mar 2024, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Alaya 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