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.
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
9 findings are still open or acknowledged in the firms’ reports: 2 high, 7 low (all open).
Centralization Risks in SPL.sol
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Initial Token Distribution
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Check Effect Interaction Pattern Violation
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Deprecated testnets or addresses
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Potential Risk On `approve()`/`transferFrom()` Me
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Potential Sandwich Attacks
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Redundant Codes
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Require without Error Message
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Third-Party Dependency Usage
SocialPal - Audit 1 · CertiK · 23 May 2024 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| SocialPal - Audit 1 | Security firm: CertiK | Date: | Scope: 2 addresses on BNB Chain | None open | Findings: 2 high · 7 low 9 open | Original removed |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 2 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 7 | 0 | 0 |
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 reportAll 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 reportThis [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 reportChain 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 reportContract `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 reportA 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 reportIn 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 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 reportThe 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| Address | Chain | Source code |
|---|---|---|
| 0x3b25…e6940x3b25c77a806ba3f014358180a99ed91cf5dbe694 | Chain: BNB Chain | Source code: Verified source |
| 0x6ba2…4e7a0x6ba2a0c9145622a081040a37a1eef28052624e7a | Chain: BNB Chain | Source code: Verified source |
Trustblock holds 1 public audit report for SocialPal, dated 23 May 2024. The latest is by CertiK (“SocialPal - Audit 1”).
CertiK wrote the report Trustblock holds for SocialPal.
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.
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="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