BSCS Info

BSCS - The fully decentralized protocol for launching new ideas. An all-in-one Incubation Hub with a full-stack Defi platform across all main blockchain networks. We provide exclusive services including IDO/INO Launchpad, Yield farming, NFT Auction, Marketplace, and DEXswap. BSCS operates on top of the all main blockchain networks and is designed to offer maximum value to consumers and institutions.

BSCS Logo

TrustNet Score

The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.

0.94
Poor Excellent

Real-Time Threat Detection

Real-time threat detection, powered by Cyvers.io, is currently not activated for this project.

This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks. For more information, click here.

Security Assessments

Select the audit
"Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Solidity
Onboard date 2025/02/14
Revision date 2025/02/16

Summary and Final Words

No crucial issues found

The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.

Contract owner cannot mint

It is not possible to mint new tokens.

Contract owner cannot blacklist addresses.

It is not possible to lock user funds by blacklisting addresses.

Contract owner can set high fees

Contract owner is able to set fees above 25%. Very high fees can also prevent token transfer.

Token transfer can be locked

Owner can lock user funds with owner functions.

Token cannot be burned

There is no burning within the contract without any allowances

Ownership is not renounced

The owner retains significant control, which could potentially be used to modify key contract parameters.

Contract is not upgradeable

The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.

Scope of Work

This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.

The auditing process consists of the following systematic steps:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.

Final Words

The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.


Ownership Privileges
  • The owner can update any arbitrary value in the locking duration.
  • The owner can withdraw the reward tokens from the contract.
  • The owner can claim the stuck tokens.
  • The owner can claim the staked tokens from the pool.
  • The owner can stop the reward.
  • The owner can update the fee period.
  • The owner can set the unstaking fees to any arbitrary value.
  • The owner can update the fee collector in the contract.
  • The owner can update the pool limit per user value.
  • The owner can update the pool cap.
  • The owner can update the reward per block value.
  • The owner can update the start and end block values.
  • The owner can update the staking block.
  • The owner can update the unstaking block.

Note - This Audit report consists of a security analysis of the BSCS smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited the mentioned contract for the BSCS team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.

Files and details

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Findings and Audit result

medium Issues | 12 findings

Acknowledged

#1 medium Issue
Missing limits on _numbBlocks.
StakeFarm.sol
L1093-1095
Description

The setLockingDuration function is highly centralized, allowing the owner to arbitrarily change the lock period, potentially trapping user funds or breaking the staking mechanism. It lacks upper/lower limits, meaning the owner can set an extremely high or zero value, disrupting expected behavior. Additionally, it applies changes immediately, causing inconsistencies for existing stakers. To mitigate this, introduce min/max limits, ensure changes only affect new stakes, and emit an event for transparency. A governance mechanism or timelock can further decentralize control, preventing malicious modifications and enhancing trust in the staking process.

Acknowledged

#2 medium Issue
Owner Can Drain All Reward Tokens.
StakeFarm.sol
L1328-1332
Description

The emergencyRewardWithdraw function allows the owner to withdraw any amount of reward tokens without restriction, potentially draining all rewards and leaving stakers with nothing. This lack of control creates a high risk of fund misappropriation. To mitigate this, the function should limit withdrawals to only excess rewards beyond what is owed to users. Implementing a balance check before transferring funds and requiring a timelock (e.g., 48 hours) can prevent sudden fund drainage. Additionally, adding governance approval or multi-signature authorization enhances security, ensuring that no single entity can arbitrarily withdraw rewards at the expense of stakers.

Acknowledged

#3 medium Issue
The owner can claim staked tokens.
StakeFarm.sol
L1366-1375
Description

The emergencyRemoval function allows the owner to withdraw staked tokens if isRemovable is true, which can lead to fund theft and loss of all user deposits. The owner can drain liquidity without restriction, making this a high-risk function. To fix this, limit withdrawals to excess funds, enforce governance approval, add a timelock, and emit events for transparency. Without these fixes, users risk losing all their staked assets to a malicious or compromised owner.

Acknowledged

#4 medium Issue
Owner Can Stop Rewards Anytime
StakeFarm.sol
L1381-1383
Description

The stopReward function allows the owner to halt reward distribution at any time by setting bonusEndBlock to the current block. This centralization risk enables the owner to stop rewards prematurely, preventing stakers from earning their expected rewards. Additionally, it lacks an event log for transparency, and unclaimed rewards may become inaccessible. To mitigate this, introduce a minimum duration before stopping rewards, emit an event for visibility, and ensure users can still claim their earned rewards after the stop. Implementing timelocks or governance approval can further prevent misuse and ensure fair reward distribution for stakers.

Acknowledged

#5 medium Issue
The owner can set fees more than 25%.
StakeFarm.sol
L1392-1394
Description

The updateUnstakingFee function allows the owner to set unstaking fees to any value, including 100%, effectively stealing user funds. This lack of restriction poses a serious risk. To fix this, a maximum limit (e.g., 5%) should be enforced, an event should be emitted for transparency, and governance approval should be required for fee changes. These measures will protect users from unfair fee manipulation and ensure a fair unstaking process.

Acknowledged

#6 medium Issue
Missing lower limit check for UpdatePoolLimitPerUser.
StakeFarm.sol
L1407-1420
Description

The updatePoolLimitPerUser function allows the owner to arbitrarily modify or remove staking limits, creating a centralization risk. The owner can reduce the limit, preventing fair participation, or remove it entirely, enabling large stakers to monopolize rewards. This manipulation can favor select users and disadvantage the broader community. To mitigate this, enforce minimum and maximum limits, introduce a timelock for changes, and require multi-signature approval or governance voting for significant updates. Additionally, emitting an event for every limit change enhances transparency, ensuring users are informed and preventing unfair alterations that could harm the staking ecosystem.

Acknowledged

#7 medium Issue
Centralization Risk in updatePoolCap Function
StakeFarm.sol
L1428-1441
Description

The updatePoolCap function gives the owner complete control over staking limits, allowing unlimited staking for large players or blocking new participants. This centralized control creates unfair conditions. To mitigate this, minimum and maximum caps should be enforced, abrupt reductions should be prevented, and timelocks or governance approval should be required for major changes. Event emissions also enhance transparency, ensuring all participants are informed about cap modifications.

Acknowledged

#8 medium Issue
The owner can lock rewards.
StakeFarm.sol
L1448-1461
Description

The updateRewardPerBlock function allows the owner to set rewards to zero, effectively stopping payouts to stakers without warning. This centralized control can cheat users who have already staked. To fix this, enforce minimum rewards, require a time-lock for changes, and use multi-signature or governance approval to prevent abuse. Transparent event logging ensures users are aware of reward modifications before they take effect.

Acknowledged

#9 medium Issue
Owner Can Update Start and End Blocks Mid-Staking Period
StakeFarm.sol
L1469-1500
L1507-1539
L1546-1564
Description

The updateStartAndEndBlocks function allows the owner to modify staking and reward periods mid-staking, creating unfair conditions for users. The owner can extend rewards indefinitely, end them abruptly, or reset reward calculations, reducing expected payouts. This lack of restriction disrupts staking expectations and trust. To mitigate this, enforce a restriction on mid-staking changes, introduce a time-lock for updates, and require multi-signature or governance approval for major modifications.

Acknowledged

#10 medium Issue
Missing 'isContract' check.
StakeFarm.sol
L1710-1732
Description

The contract lacks a validation check to ensure that specific parameters are contract addresses. Without this check, there is a risk that non-contract addresses (such as externally owned accounts, or EOAs) could be mistakenly set for parameters intended to reference other contracts. This could lead to failures in executing critical interactions within the contract, as EOAs do not support contract-specific functions. To mitigate this, Implement a validation check to ensure that parameters designated as contract addresses are verified as such. This can be done using Solidity’s Address library function isContract, which checks if an address has associated contract code.

Acknowledged

#11 medium Issue
Owner Can Add or Remove Reward Tokens Mid-Staking
StakeFarm.sol
L1710-1732
L1738-1759
Description

The addRewardToken and removeRewardToken functions allow the owner to change reward tokens mid-staking, leading to unfair conditions. The owner can remove a reward token before users claim rewards, causing loss of expected earnings, or add a new reward token, diluting rewards for existing stakers. To fix this, prevent removal if rewards are unclaimed, introduce a timelock, use governance approval, and emit notification events to protect users from unexpected changes that impact deposits and withdrawals.

Acknowledged

#12 medium Issue
Missing allowance check.
StakeFarm.sol
L1209-1217
Description

The deposit function uses transferFrom without checking the allowance, causing unexpected transaction failures if users haven’t approved the contract to spend their tokens. This leads to wasted gas fees, poor user experience, and confusion. To mitigate this, check the user’s allowance before calling transferFrom, ensuring they have approved enough tokens. Using SafeERC20 for transfers prevents potential issues and improves error handling. Additionally, implementing an event log or UI guidance can inform users about approval requirements, ensuring a smoother deposit process. These measures will reduce failed transactions, save gas, and enhance usability for staking participants.

low Issues | 5 findings

Acknowledged

#1 low Issue
Old compiler version
StakeFarm.sol
L900
Description

Adding the latest constant version of solidity is recommended, as this prevents the unintentional deployment of a contract with an outdated compiler that contains unresolved bugs.

Acknowledged

#2 low Issue
Remove safemath library
StakeFarm.sol
L13-191
Description

The compiler version above 0.8.0 has the ability to control arithmetic overflow/underflow. It is recommended to remove the unwanted code in order to avoid high gas fees.

Acknowledged

#3 low Issue
Missing events arithmetic.
StakeFarm.sol
L1093-1095
L1366-1399
Description

Emit all the critical parameter changes.

Acknowledged

#4 low Issue
Missing zero check for _amount.
StakeFarm.sol
L1168-1228
Description

Check that the amount should be greater than zero.

Acknowledged

#5 low Issue
Missing zero or dead address check.
StakeFarm.sol
L1396-1399
Description

Check that the address cannot be set to zero or dead address.

informational Issues | 3 findings

Acknowledged

#1 informational Issue
Function that are not used (Dead code).
StakeFarm.sol
L216-219
Description

Remove unused code.

Acknowledged

#2 informational Issue
Function could be declare as view function.
StakeFarm.sol
L1110-1119
Description

The function doesn’t modify any state variables and is only iterating over stakeDetails[_user], which is a mapping. Since this function only reads from stakeDetails[_user] and does not modify any state variables, it should be view.

Acknowledged

#3 informational Issue
Unused local variable
StakeFarm.sol
L1454
L1621
L1716
Description

It is recommended to remove the unused code from the contract.