TOP PROTOCOL has 1 public audit report from CertiK; dated 1 Nov 2024; no critical findings reported. It also holds 1 deployed contract on 1 chain.
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
Statuses are the security firms’ own
13 findings are still open or acknowledged in the firms’ reports: 2 high, 4 medium, 7 low (7 open, 6 acknowledged).
Initial Token Distribution
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Risk of Pool Manipulation
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Potential Misjudgment in Adding/Removing Liquidit
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Potential Sandwich Attacks
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Potential Unfair Reward Distribution in `processR
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Vulnerability to Reward Manipulation Due to Insta
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
`buyValue` and `buyAmount` Not Decreased if `_sel
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Confirmation of the `lpAmount` Update and Add Liq
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Ineffective `isContract()` Check
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Missing Emit Events
TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| TOP PROTOCOL - Audit | Security firm: CertiK | Date: | Scope: 1 address on BNB Chain | None open | Findings: 4 high · 7 medium · 21 low 19 fixed · 6 acknowledged · 7 open | skynet.certik.com ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 2 | 2 |
| Medium | 0 | 4 | 3 |
| Low | 7 | 0 | 14 |
In the `_tokenTransfer` function of the `Top` contract, there is a conditional block that handles the calculation of profits when tokens are sold. Specifically, this block updates the `buyValue` for the `sender` when a sale occurs. This conditional block only executes if `_sell_profit_fee` is greater than zero: ```solidity if (_swapPairList[recipient] && !isAdd && !isRemove && !_feeWhiteList[sender]){ if(_sell_profit_fee>0){ uint256 v = getTokenValue(tAmount); if (v >= _burnInfo[sender].buyValue) { uint256 profitFees; uint256 tokenAmount = getUSDTValue(_burnInfo[sender].buyValue); profitFees += ((tAmount - tokenAmount) * _sell_profit_fee) / 10000; feeAmount += profitFees; _ts.deadAmount += profitFees*5/10; _ts.redeemAmount += profitFees*5/10; v = _burnInfo[sender].buyValue; _takeTransfer(sender,address(this),profitFees); } _burnInfo[sender].buyValue -=v; } } ``` The issue with this implementation is that if `_sell_profit_fee` is set to zero under some conditions, the logic to update the `buyValue` and `buyAmount` for a user (`sender`) upon selling does not execute. This results in a scenario where a user's `buyValue` and `buyAmount` remain unchanged even after they have sold their tokens. This could potentially misrepresent the actual economic activity of the user, as the historical purchase values (`buyValue`) that contribute to profit calculations during sales are not decreased upon the sale of tokens.
Open the reportIn the `_transfer` function of the `Top` contract, there is a specific condition where `lpAmount` for the sender (`from`) is incremented only if the sender of the transaction is the same as the transaction originator (`tx.origin`). This is particularly checked when tokens are being transferred to the pair (`_mainPair`), which usually signifies a liquidity provision operation. ```solidity=611 if (to == _mainPair && tx.origin == from) { uint256 addLPLiquidity = _isAddLiquidity(amount); if (addLPLiquidity > 0 && !isContract(from)) { isAdd = true; } lpAmountAll += amount; lpAmount[from] += amount; ``` However, this approach does not account for scenarios where `transferFrom` is used to add liquidity. In such cases, `tx.origin` would not match `from` if the liquidity is added through a different address initiates the transfer on behalf of the original holder. Consequently, `lpAmount[from]` would not be updated even though liquidity is being added, leading to potential discrepancies in tracking liquidity provisions. We would like to confirm with the team whether this implementation detail is intentional or if adjustments are required to ensure that `lpAmount` correctly reflects all liquidity additions, regardless of whether they are conducted directly by the token holder or through an intermediary address.
Open the reportThe implementation of the function `isContract()` check can not cover all scenarios. The check can be bypassed if the call is from the constructor of a smart contract or when the contract is destroyed. Because, in that case, the codesize will also be zero. The "isContract" function in the OpenZeppelin "Address" library uses the same implementation, but comments mention that "it's unsafe to rely on the check and it can be bypassed". Reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
Open the reportThere should always be events emitted in the sensitive functions that are controlled by centralization roles.
Open the reportThe **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.
Open the reportIn the `swapTokenForFund` function, the `if (_ts.rewardAmount >= 0) ` condition check is redundant as the `rewardAmount` is uint256 which is always zero or greater than zero. ```solidity=877 @> if (_ts.rewardAmount >= 0) { if(rewardPath.length != 1){ try _swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens( _rewardAmount, 0, rewardPath, address(this), block.timestamp ) ```
Open the reportThe 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.
Open the report| Address | Chain | Source code |
|---|---|---|
| 0xe855…d68e0xe85562c6ff86a8ff0268222aff0205a26d37d68e | Chain: BNB Chain | Source code: Verified source |
Trustblock holds 1 public audit report for TOP PROTOCOL, dated 1 Nov 2024. The latest is by CertiK (“TOP PROTOCOL - Audit”).
CertiK wrote the report Trustblock holds for TOP PROTOCOL.
13 findings are still open or acknowledged in the firms’ reports: 2 high, 4 medium, 7 low (7 open, 6 acknowledged). No critical finding is reported. Statuses are the security firms’ own.
Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.
Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-tb-project-slug="top-protocol"></div></body>
Paste the code where the label should appear. It uses no API credit and updates by itself.
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