CertiK reviewed Sakai Vault (Sakaivault - Audit) on 26 Jun 2024: 12 findings, 0 critical; 4 marked fixed, 2 acknowledged, 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 | 2 | 0 |
| Medium | 0 | 0 | 1 |
| Low | 6 | 0 | 3 |
The `withdraw()` function can be called by anyone to retrieve the tokens they deposit into the contract, but there is no check if the variable `_stakers[msg.sender].balance` is greater than 0. If someone whose balance is equal to 0 calls this method multiple times, then `totalAddressStaked` will keep decreasing and other users will not be able to retrieve tokens, and the tokens will be locked into the contract.
Flash loans are a way to borrow large amounts of money for a certain fee. The requirement is that the loans need to be returned within the same transaction in a block. If not, the transaction will be reverted. An attacker can use the borrowed money as the initial funds for an exploit to enlarge the profit or manipulate the token price in decentralized exchanges. The `getAmountsOut()` function relies on price calculations that are based on-chain, meaning they are susceptible to flash-loan attacks by manipulating the price of given pairs to the attacker's benefit.
A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. ### External call(s) ```solidity=1658 ERC20token.safeTransfer(msg.sender, balance); ``` ### State variables written after the call(s) ```solidity=1663 delete _stakers[msg.sender]; ```
The variable `minimumStakeEqualtoUSDT`, `interestRate`, and `interestRateDenominator` 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. An advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they are not in storage. ```solidity=1358 uint256 public minimumStakeEqualtoUSDT; uint256 public interestRate; uint256 public interestRateDenominator; ```
| Address | Chain | Source code |
|---|---|---|
| 0x6729…16090x6729324119a210cf493fa7455e581df9245d1609 | Chain: BNB Chain | Source code: Verified source |
| 0xb8de…1abd0xb8de9c3ede83cd4bba7982273e6c1c0852201abd | Chain: BNB Chain | Source code: Verified source |
| 0xc20a…a42a0xc20a079c7962d9fc92173cda349e80d484dfa42a | Chain: BNB Chain | Source code: Verified source |
| 0x43b3…c4af0x43b35e89d15b91162dea1c51133c4c93bdd1c4af | Chain: BNB Chain | Source code: Verified source |
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