TOP PROTOCOL audit reports

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.

Critical findings
No open critical findings
In 1 report.
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Open findings across every firm13

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

High
2
Medium
4
Low
7
  • High Acknowledged

    Initial Token Distribution

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • High Acknowledged

    Risk of Pool Manipulation

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Medium Acknowledged

    Potential Misjudgment in Adding/Removing Liquidit

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Medium Acknowledged

    Potential Sandwich Attacks

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Medium Acknowledged

    Potential Unfair Reward Distribution in `processR

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Medium Acknowledged

    Vulnerability to Reward Manipulation Due to Insta

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Low Open

    `buyValue` and `buyAmount` Not Decreased if `_sel

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Low Open

    Confirmation of the `lpAmount` Update and Add Liq

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Low Open

    Ineffective `isContract()` Check

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

  • Low Open

    Missing Emit Events

    TOP PROTOCOL - Audit · CertiK · 1 Nov 2024 · Report ↗

All 13 open and acknowledged findings

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
TOP PROTOCOL - AuditSecurity firm: CertiKDate: Scope: 1 address on BNB ChainNone openFindings: 4 high · 7 medium · 21 low
19 fixed · 6 acknowledged · 7 open
skynet.certik.com ↗

Findings32

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

SeverityOpenAcknowledgedFixed
Critical000
High022
Medium043
Low7014
Low`buyValue` and `buyAmount` Not Decreased if `_selTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

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 report
LowConfirmation of the `lpAmount` Update and Add LiqTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

In 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 report
LowIneffective `isContract()` CheckTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

The 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 report
LowMissing Emit EventsTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

Open the report
LowMissing Error MessagesTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

The **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 report
LowRedundant CheckTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

In 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 report
LowVariables That Could Be Declared as ImmutableTOP PROTOCOL - Audit · CertiK · 1 Nov 2024Open

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.

Open the report

Contracts1

AddressChainSource code
0xe85562c6ff86a8ff0268222aff0205a26d37d68eChain: BNB ChainSource code: Verified source

TOP PROTOCOL: questions

Is TOP PROTOCOL audited?

Trustblock holds 1 public audit report for TOP PROTOCOL, dated 1 Nov 2024. The latest is by CertiK (“TOP PROTOCOL - Audit”).

Who audited TOP PROTOCOL?

CertiK wrote the report Trustblock holds for TOP PROTOCOL.

Are there open findings in TOP PROTOCOL’s audits?

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.

Show this on your site

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.

Content

Facts

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.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-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