SafePal - Audit

CertiKFiles named in the report

CertiK reviewed SafePal (SafePal - Audit) on 1 Feb 2024: 5 findings, 0 critical; 1 marked fixed, 1 acknowledged, 3 open.

No open critical findings
Open the reportOpen SafePal’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings5

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

SeverityOpenAcknowledgedFixed
Critical000
High010
Medium001
Low300
LowThe last deposit time is used as deposit start tiOpen

The `user.timestamp` is updated to the current `block.timestamp` each time a user makes a deposit. This behavior inadvertently resets the start time for the user's previous deposits, resulting in an extension of the stake lock time for those funds.

LowUnnecessary Use of SafeMathOpen

The `SafeMath` library is used unnecessarily. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow. ```solidity=121 library SafeMath { ``` - An implementation of `SafeMath` library is found. --- ```solidity=773 using SafeMath for uint256; ``` - `SafeMath` library is used for `uint256` type in `StakePool` contract. ```solidity=810 user.amount = user.amount.add(_amount); ``` - `SafeMath.add` is called in `deposit` function of `StakePool` contract.

LowVariables That Could Be Declared as ImmutableOpen

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

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)

  • src/stake.sol

Part of SafePal’s security record

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