SocialPal audit reports

BNB Chainsocialpal.io

SocialPal has 1 public audit report from CertiK; dated 23 May 2024; no critical findings reported. It also holds 2 deployed contracts 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 firm9

Statuses are the security firms’ own

9 findings are still open or acknowledged in the firms’ reports: 2 high, 7 low (all open).

High
2
Low
7
  • High Open

    Centralization Risks in SPL.sol

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • High Open

    Initial Token Distribution

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Check Effect Interaction Pattern Violation

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Deprecated testnets or addresses

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Potential Risk On `approve()`/`transferFrom()` Me

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Potential Sandwich Attacks

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Redundant Codes

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Require without Error Message

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

  • Low Open

    Third-Party Dependency Usage

    SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
SocialPal - Audit 1Security firm: CertiKDate: Scope: 2 addresses on BNB ChainNone openFindings: 2 high · 7 low
9 open
Original removed

Findings9

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium000
Low700
HighCentralization Risks in SPL.solSocialPal - Audit 1 · CertiK · 23 May 2024Open

In the SPL contract, the role `_owner` has authority over the functions shown in the list below. - `setNoFeeWallet()`: Used to set the enable status of `noFee` for an account. - `toggleCanSwapFees()`: Used to set the `canSwapFees` status. - `changeDevWallet()`: Used to change the `devWallet` to a new one. - `disableSwapFees()`: Used to set `buyfee` and `sellfee` to 0. - `setPresaleAddress()`: Used to set `isPresaleAddress`, `_noFee` and `liquidityAdd` status. - `setStakingAddress()`: Used to set the staking contract. - `enableTrading()`: Used to enable the trading. - `changeFeeAllocations()`: Used to set `devAllocation` and `liquidityAllocation`. - `changeSwapThreshold()`: Used to set `swapThreshold`. - `triggerInternalSwap()`: Owner could trigger the `InternalSwap`. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and modify important state variables in the contract at will, which will affect the normal use of the contract. In addition, since the SPL contract inherits the Ownable contract, the role `_owner` has authority over the functions shown in the list below. - `renounceOwnership()` - Renounce the ownership of contract to leave the contract without an owner. - `transferOwnership()` - Transfers ownership of the contract to a new account. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and change the owner's permissions at will.

Open the report
HighInitial Token DistributionSocialPal - Audit 1 · CertiK · 23 May 2024Open

All of the SPL tokens (140_000_000) are sent to the contract deployer. This is a centralization risk because the deployer or the owner(s) of the EOAs can distribute tokens without obtaining the consensus of the community. Any compromise to these addresses may allow a hacker to steal and sell tokens on the market, resulting in severe damage to the project. ```solidity=426 balance[msg.sender] = _totalSupply; ``` As of 05/20/2024, the addresses of major holders are listed below: - 32.1330% of the tokens are in the address [**0x802167C58CE9a51AE38150105fD81fac6eA93EC5**](https://bscscan.com/address/0x802167C58CE9a51AE38150105fD81fac6eA93EC5) - 28.6666% of the tokens are in the contract address [**PinkLock02**](https://bscscan.com/address/0x407993575c91ce7643a4d4cCACc9A98c36eE1BBE) - 25.1371% of the tokens are in the contract address [**PancakePair**](https://bscscan.com/address/0x0e8A399e3C7F3cB937E7cb52Efe384F26d4c248d).

Open the report
LowCheck Effect Interaction Pattern ViolationSocialPal - Audit 1 · CertiK · 23 May 2024Open

This [Checks-Effects-Interactions Pattern](https://docs.soliditylang.org/en/latest/security-considerations.html#use-the-checks-effects-interactions-pattern) is a best practice for writing secure smart contracts that involves performing all state changes before making any external function calls. In the `SPL` contract, function `_transfer()` violates the this pattern. ### External call(s) ```solidity=519 internalSwap((contractTokenBalance * devAllocation) / 100); ``` * This function call executes the following external call(s). * In `SPL.internalSwap`, * `swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(contractTokenBalance,0,path,address(this),block.timestamp)` * In `SPL.internalSwap`, * `(success,None) = devWallet.call{gas: 35000,value: address(this).balance}("")` ```solidity=523 swapAndLiquify(contractTokenBalance * liquidityAllocation / 100); ``` * This function call executes the following external call(s). * In `SPL.swapAndLiquify`, * `swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(firstmath,0,path,address(this),block.timestamp)` * In `SPL.swapAndLiquify`, * `swapRouter.addLiquidityETH{value: newBalance}(address(this),secondMath,0,0,DEAD,block.timestamp)` ### State variables written after the call(s) ```solidity=531 balance[from] -= amount; ``` ```solidity=533 balance[to] += amountAfterFee; emit Transfer(from, to, amountAfterFee); ```

Open the report
LowDeprecated testnets or addressesSocialPal - Audit 1 · CertiK · 23 May 2024Open

Chain IDs 4, 3, and 5 represent the Ethereum test networks `Ropsten`, `Rinkeby`, and `Goerli`, respectively. However, these test networks have been gradually deprecated, and the currently active Ethereum test network is Sepolia.

Open the report
LowPotential Risk On `approve()`/`transferFrom()` MeSocialPal - Audit 1 · CertiK · 23 May 2024Open

Contract `SPL` is vulnerable to [a known ERC20 race condition issue](https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729), which could lead to token theft. When a user calls `approve()` for a second time on a spender that has already been allowed, the spender could call `transferFrom()` to transfer the previous value and still receive the authorization to transfer the new value. Exploit scenario: 1. Alice calls `approve(Bob, 100)` to allow Bob to spend 100 tokens. 2. Alice changes her mind and calls `approve(Bob, 50)`. 3. Bob observes the second `approve(Bob, 50)` function call and calls `transferFrom(Alice, Bob, 100)` before the second `approve(Bob, 50)` call. 4. The above scenario can be achieved by front-running. In this case, Bob can transfer another 50 tokens from Alice and in total, he transferred 150 tokens from Alice.

Open the report
LowPotential Sandwich AttacksSocialPal - Audit 1 · CertiK · 23 May 2024Open

A sandwich attack may happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (executing before the target) a transaction to purchase one of the assets and make profits by backrunning (executing after the target) a transaction to sell the asset. These functions are called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large. ```solidity function swapAndLiquify(uint256 contractTokenBalance) internal inSwapFlag { ... try swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens( firstmath, 0, path, address(this), block.timestamp) {} catch {return;} ... } ``` ```solidity function internalSwap(uint256 contractTokenBalance) internal inSwapFlag { ... try swapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens( contractTokenBalance, 0, path, address(this), block.timestamp ) {} catch { return; } ... } ```

Open the report
LowRedundant CodesSocialPal - Audit 1 · CertiK · 23 May 2024Open

In the `SPL` contract, certain portions of the code are unnecessary and can be optimized: 1. The following line grants the maximum allowable tokens from `msg.sender` to the `swapRouter`. This action is generally not needed unless it directly involves token transactions initiated by `msg.sender`: ```solidity=431 _approve(msg.sender, address(swapRouter), type(uint256).max); ``` It's superfluous to set such a high allowance for `msg.sender` when the contract itself manages its allowances more typically. --- 2. This snippet checks if the allowance for the `swapRouter` from the contract itself (`address(this)`) is set to the maximum, and if not, sets it to the maximum value: ```solidity=631 if (_allowances[address(this)][address(swapRouter)] != type(uint256).max) { _allowances[address(this)][address(swapRouter)] = type(uint256).max; } ``` However, this check is redundant. The contract already grants the maximum allowance to the `swapRouter`, and the maximum allowance does not decrease with each `transferFrom` operation due to the nature of how allowances are managed in this contract. Thus, continuously setting it to the maximum is unnecessary and wastes gas.

Open the report
LowRequire without Error MessageSocialPal - Audit 1 · CertiK · 23 May 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
LowThird-Party Dependency UsageSocialPal - Audit 1 · CertiK · 23 May 2024Open

The contract is serving as the underlying entity to interact with one or more third party protocols or contracts. The scope of the audit treats third party entity as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=378 IRouter02 public swapRouter; ``` - The contract `SPL` interacts with third party contract with `IRouter02` interface via `swapRouter`, such as the following example: ```solidity=412 swapRouter = IRouter02(0x10ED43C718714eb63d5aA57B78B54704E256024E); ``` --- ```solidity=429 lpPair = IFactoryV2(swapRouter.factory()).createPair(swapRouter.WETH(), address(this)); ``` - The contract `SPL` interacts with third party contract with `IFactoryV2` interface via `swapRouter.factory()`.

Open the report

Contracts2

AddressChainSource code
0x3b25c77a806ba3f014358180a99ed91cf5dbe694Chain: BNB ChainSource code: Verified source
0x6ba2a0c9145622a081040a37a1eef28052624e7aChain: BNB ChainSource code: Verified source

SocialPal: questions

Is SocialPal audited?

Trustblock holds 1 public audit report for SocialPal, dated 23 May 2024. The latest is by CertiK (“SocialPal - Audit 1”).

Who audited SocialPal?

CertiK wrote the report Trustblock holds for SocialPal.

Are there open findings in SocialPal’s audits?

9 findings are still open or acknowledged in the firms’ reports: 2 high, 7 low (all open). 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="socialpal"
></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