0xfa8b0197219b6cc8f3336039d50bc03220a368ce
As of 21 Nov 2026, Trustblock’s record holds 0xfa8b0197219b6cc8f3336039d50bc03220a368ce on BNB Chain as a contract of Sakai Vault. 1 audit report on Trustblock lists this address: CertiK, 15 Jul 2024. 11 findings in it are recorded as open or acknowledged.
Each report’s scope as stored on Trustblock names this address on BNB Chain.
| Audit | Security firm | Date | Commit named in the report | Report |
|---|---|---|---|---|
| SakaiDAO - Audit | CertiK | Not recorded (see the report) | Open |
4 High, 1 Medium, 6 Low. In the firm’s own words; statuses are the firm’s, from each report.
In the contract `Ownable` the role `_owner` has authority over the functions shown in the diagram below.  Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and do the following: - Transfer ownership to address(0). - Transfer ownership to the new owner's address. In the contract `SakaiDAO` the role `_owner` has authority over the functions shown in the diagram below.  Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and do the following: - claim reward for specific account. - claim `BNB` from the contract. - claim all `erc20` tokens except the token associated with the contract from the contract. - update minimum stake for voting. - update minimum stake for creating proposal. - update minimum stake for getting reward. - update minimum stake. - update tax percentage which is deducted from referral reward. - update distribution ratio for layer1, layer2, layer3 referrer. - update tax percentages for staking pool and vault which are deducted from staking reward. - update vault address which is used to receive reward. - update staking pool's address which is used to receive reward. - update treasury address. - update reset epoch time which will affect the reward distribution. - update voting address. Important Note: Certain identification and KYC procedures were attempted to be applied to the project team in order to better understand the centralization situation and potential risks of the project. The project team refused to cooperate with the investigation efforts, and thus based on the negative signals we concluded that there is potential high risk to the project. We strongly advise end users to conduct further research and exercise due diligence before engaging with the project. It is crucial for end users to independently verify and assess all available information to make informed decisions.
The audit on Trustblock · Open the reportAccording to the design, when users unstake their staked tokens, if their latest share is less than the minimum threshold eligible for rewards, their share will be deducted from the `totalShare`. ```solidity function _setShare(address account, uint256 amount) internal { /** this function for set shares balance */ if(amount > 0 && shares[account].amount == 0){ // if amount > 0 then add shareholder _addShareholder(account); } else if(amount == 0 && shares[account].amount > 0){ // if amount = 0 then remove shareholder _removeShareholder(account); } /** Update shares balance */ totalShares = totalShares - shares[account].amount + amount; shares[account].amount = amount; shares[account].totalExcluded = _getCumulativeDividend(shares[account].amount); shares[account].lastDepositTimestamp = block.timestamp; shares[account].lastDepositEpoch = currentEpoch; // get current epoch from vote contract for prevent user voting on running epoch shares[account].lastEpochNumberWhenDeposit = voteAddress != address(0) ? ITokenVote(voteAddress).getCurrentEpoch() : 0; if(shares[account].amount >= minimumStakeForGetReward){ shares[account].isReceiveReward = true; } else { shares[account].isReceiveReward = false; totalShares = totalShares - shares[account].amount; } } ``` However, when users unstake again, since the deducted portion is not added back to the `totalShare`, the `totalShare` will have to deduct the user's current share amount once more. Ultimately, this will cause the `totalShare` to become increasingly smaller, and updating the user's share will result in an underflow due to subtraction, leading to a failure when users try to unstake in the future.
The audit on Trustblock · Open the reportWhen transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=699 IERC20(tokenAddress).transferFrom(_msgSender(), address(this), amount); ``` - Transferring tokens by `amount`. ```solidity=702 _mint(account,amount); ``` - This function call executes the following operation. - In `ERC20._mint`, - `_balances[account] += amount;` - The `amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. --- ```solidity=860 IERC20(tokenAddress).transferFrom(_msgSender(), address(this), rewardAmount); ``` - Transferring tokens by `rewardAmount`. ```solidity=861 _calculateReward(rewardAmount); ``` - This function call executes the following operation. - In `SakaiDAO._calculateReward`, - `pendingCalculateReward += rewardAmount;` - The `rewardAmount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. --- ```solidity=873 _stake(amount, referrer); ``` - Transferring tokens by `amount`. - This function call executes the following operation. - In `SakaiDAO._stake`, - `IERC20(tokenAddress).transferFrom(_msgSender(), address(this), amount);` ```solidity=873 _stake(amount, referrer); ``` - This function call executes the following operation. - In `SakaiDAO._stake`, - `_mint(account,amount);` - In `ERC20._mint`, - `_balances[account] += amount;` - The `amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.
The audit on Trustblock · Open the reportThe deposited token and reward token are the same in `SakaiDAO`. However, there is no guarantee that the `SakaiDAO` has sufficient rewards since the rewards need to be transferred into contracts manually. As a result, when users are trying to withdraw their principal or rewards from the contract, the contract is not guaranteed to have enough balance to pay the users. It is especially important to ensure that the user's principal is able to withdraw. Based on the design of the protocol, the referrer reward is directly transferred from the contract. For example, if a user stakes 1000 tokens, the referrer could gain around 60 tokens as a reward (6% maximum not considering the tax). Those rewards are directly transferred from the contract, not the user who stakes the tokens. Therefore, the contract may lose 60 tokens when the referrer claims the reward. Consequently, the contract may not have enough tokens for users to withdraw their tokens. Important Note: Certain identification and KYC procedures were attempted to be applied to the project team in order to better understand the centralization situation and potential risks of the project. The project team refused to cooperate with the investigation efforts, and thus based on the negative signals we concluded that there is potential high risk to the project. We strongly advise end users to conduct further research and exercise due diligence before engaging with the project. It is crucial for end users to independently verify and assess all available information to make informed decisions.
The audit on Trustblock · Open the reportThe `SakaiDAO` contract is designed to allow users to stake tokens in exchange for rewards, minting `SakaiDAO` tokens for them. Conversely, when users unstake, their `SakaiDAO` tokens are burned. Throughout these transactions, the contract updates the users' shares, which are used to calculate their rewards. However, should users accidentally burn their `SakaiDAO` tokens using the `burn()` function, their shares remain intact, enabling them to keep claiming rewards. ```solidity function burn(uint256 amount) external virtual { require(_msgSender() != address(0), "ERC20Stake: burn from the zero address"); require(amount > 0, "ERC20Stake: burn amount exceeds balance"); require(_balances[_msgSender()] >= amount, "ERC20Stake: burn amount exceeds balance"); _burn(_msgSender(), amount); } ```
The audit on Trustblock · Open the reportAccording to the logic, the initial value of `voteAddress` is zero address, after the first epoch, any user who stakes `minimumStakeForVote` tokens can vote. When `voteAddress` is not zero address, the contract will get current epoch from vote contract for prevent user voting on running epoch. ```solidity shares[account].lastEpochNumberWhenDeposit = voteAddress != address(0) ? ITokenVote(voteAddress).getCurrentEpoch() : 0; ``` However, once the `voteAddress` is set, it cannot be changed back to the zero address. Whether the user can vote will be affected by the `voteAddress` contract. ```solidity function updateVoteAddress(address _voteAddress) external onlyOwner { require(_voteAddress != address(0), "SakaiDAO: Invalid address"); require(voteAddress != _voteAddress, "SakaiDAO: Vote address is already that address"); voteAddress = _voteAddress; emit UpdateVoteAddress(_voteAddress); } ```
The audit on Trustblock · Open the reportIf it is intended to prohibit token transfers, it is better to use `revert` to terminate the transaction and throw an error. This is because: 1. Clarity: `revert` clearly indicates that the transaction has failed and provides a reason for the failure. This is helpful for both users and developers as it provides clear feedback on why the operation is not allowed. 2. Gas Savings: When a transaction is reverted, the unused Gas is refunded to the user. Executing empty logic, although it does not change the state, still incurs Gas costs for these invalid computations. 3. Security: Executing empty logic may mislead users into thinking the transaction was successful. Using `revert` can avoid such misunderstandings and ensure that the contract behaves in accordance with its design intentions, enhancing contract security. Therefore, for the sake of transparency, Gas savings, and ensuring security, it is recommended to use `revert` when prohibiting token transfers.
The audit on Trustblock · Open the reportAccording to the design, when a user unstakes, the contract estimates the fee based on the duration of the staking. The longer the staking period, the lower the fee, and if the staking period exceeds 365 days, no fee is charged when the user unstakes. However, the contract uses `shares[account].lastDepositTimestamp` as the staking start time, and this state variable will be updated both when the user stakes and unstakes. This means that if a user unstakes (possibly only a portion), the staking duration for the user will be recalculated. ```solidity function _estimateTaxPercentEarlyUnstake(address account) internal view returns(uint256) { /** this function for estimate tax if user unstake early */ uint256 lastDepositTimestamp = shares[account].lastDepositTimestamp; uint256 totalDaysStake = (block.timestamp - lastDepositTimestamp) / 86400; uint256 tax = 0; if(totalDaysStake >=0 && totalDaysStake <= 90) tax = 250; else if(totalDaysStake > 90 && totalDaysStake <= 120) tax = 223; else if(totalDaysStake > 120 && totalDaysStake <= 150) tax = 196; else if(totalDaysStake > 150 && totalDaysStake <= 180) tax = 169; else if(totalDaysStake > 180 && totalDaysStake <= 210) tax = 142; else if(totalDaysStake > 210 && totalDaysStake <= 240) tax = 115; else if(totalDaysStake > 240 && totalDaysStake <= 270) tax = 88; else if(totalDaysStake > 270 && totalDaysStake <= 300) tax = 61; else if(totalDaysStake > 300 && totalDaysStake <= 330) tax = 34; else if(totalDaysStake > 330 && totalDaysStake <= 365) tax = 7; return tax; } ```
The audit on Trustblock · Open the reportThe owner of the **SakaiDAO** contract can claim all tokens in the contract except the **Sakai** token, but the error message indicates that the owner can only claim native tokens, which is inconsistent with the requirements.
The audit on Trustblock · Open the reportThe linked code does not affect the functionality of the codebase and appears to be either remnants of test code or older functionality.
The audit on Trustblock · Open the reportIt is not recommended to use Solidity's `transfer()` and `send()` functions for transferring native tokens, since some contracts may not be able to receive the funds. Those functions forward only a fixed amount of gas (2300 specifically) and the receiving contracts may run out of gas before finishing the transfer. Also, EVM instructions' gas costs may increase in the future. Thus, some contracts that can receive now may stop working in the future due to the gas limitation. ```solidity=797 payable(msg.sender).transfer(address(this).balance); ``` - `SakaiDAO.claimStuckBNB` uses `transfer()`.
The audit on Trustblock · Open the reportThe Sakai Vault security record · Every Sakai Vault address · This address on the explorer