MB Info

MacroBlocks is a no-code Web3 infrastructure built on BNB Chain. We empower creators, startups, and communities to Launch and manage their own tokens. Accept seamless one-time and recurring crypto payments in USDT/USDC. Access liquidity through trusted partner tokens. Unlock growth with grants, campaigns, and community-driven support. By combining tokenization, payments, and liquidity in one platform, MacroBlocks makes the creator economy accessible to everyone.

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

75.39
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

"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/11/05
Revision date 2025/11/05

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 cannot set high fees

The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.

Contract cannot be locked

Owner cannot lock any user funds.

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 whitelist addresses to transfer tokens without restrictions.
  • The owner can set the graduation slippage value between 1 to 25%.
  • The owner can add liquidity to the bonding curve.

Note - This Audit report consists of a security analysis of the MB smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited one token contract for the MB 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

low Issues | 1 findings

Resolved

#1 low Issue
CREATOR_FEE_SPLIT_BPS Is Never Referenced in Code
MB.sol
L118
Description

The contract declares a constant CREATOR_FEE_SPLIT_BPS = 3000 at line 118 to represent the creator's 30% fee share, but this constant is never actually used in the codebase. The fee distribution logic in the _payFee() function only references PLATFORM_FEE_SPLIT_BPS to calculate the platform's 70% share, while the creator's amount is derived through subtraction (creatorAmt = feeAmountNative - platformAmt) rather than using the declared constant. This creates misleading documentation since the constant suggests an enforced 30% split but doesn't actually control the calculation. While the fee distribution functions correctly, the unused constant introduces maintenance risks where future developers might be confused about which values to modify or may attempt to "fix" the code by using both constants, potentially introducing bugs. Additionally, if PLATFORM_FEE_SPLIT_BPS is ever changed, the CREATOR_FEE_SPLIT_BPS constant would become factually incorrect without any validation to catch this discrepancy.

informational Issues | 4 findings

Resolved

#1 informational Issue
Floating pragma solidity version.
MB.sol
L2
Description

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

Resolved

#2 informational Issue
Redundant Zero-Value Check for platformNative Variable
MB.sol
L362
Description

The _graduate() function contains a duplicate validation check for the platformNative variable at lines 358 and 362, both verifying that the value is greater than zero with the identical error message "GRAD: native=0". This redundancy serves no functional purpose since the first check at line 358 already ensures the value is non-zero, making the second check at line 362 unreachable in any scenario where the first check would fail. This duplication results in unnecessary bytecode bloat and marginally increased gas costs during deployment, though it has no impact on runtime gas consumption since the function can only execute if the first require passes.

Acknowledged

#3 informational Issue
State Updates Occur After External Token Reception Despite Reentrancy Protection
MB.sol
L493-549
Description

The sellTokens() function at lines 493-549 violates the Check-Effects-Interactions (CEI) pattern by performing an external token transfer before updating critical state variables. Specifically, the function receives MyTokens from the user via safeTransferFrom() at line 530, and only afterwards updates the bonding curve state by decrementing curve.totalSold and currentLiquidity at lines 533-534. The CEI pattern is a fundamental security best practice in Solidity that mandates all state changes must occur before any external calls to prevent reentrancy vulnerabilities. In a standard implementation without additional protections, this ordering would create a critical reentrancy vulnerability where a malicious token contract could reenter the function during the safeTransferFrom call and execute additional sells using the not-yet-updated state, potentially draining the contract through repeated transactions that reference stale totalSold and currentLiquidity values. However, this theoretical vulnerability is fully mitigated by the nonReentrant modifier from OpenZeppelin's ReentrancyGuard that is applied to the function at line 495, which sets a mutex preventing any reentrant calls. Additionally, the MyToken contract is deployed and controlled by the PumpFunComplex contract itself (created at line 168 in the constructor), making it a trusted internal token rather than an external potentially-malicious contract.

Pending

#4 informational Issue
Graduation May Not Trigger When Purchase Brings Liquidity Very Close to Target
MB.sol
L551-632
Description

The buyTokens() function at lines 551-632 may fail to trigger graduation in edge cases where a purchase brings liquidity very close to but not exactly at the target. The graduation logic at lines 606-612 uses a tolerance of GRAD_TOLERANCE_ATOMS * _scalingFactor (5 × 10^-12 for USDT) to determine if the contract should snap to the target and graduate. This tolerance is designed for sub-atomic rounding precision but is too small to handle realistic near-completion scenarios. For example, if the target is 10,000 USDT and current liquidity is 9,995 USDT, a purchase of 3.96 USDT results in 9,998.96 USDT total, leaving a 1.04 USDT gap. The tolerance check (9,998.96 + 0.000005 >= 10,000) fails, preventing graduation despite being 99.99% complete. The triple graduation detection at line 625 (isFinalPurchase || balanceClose || _reachedTarget()) also fails because all three conditions evaluate to false when the gap exceeds the microscopic tolerance. This leaves the contract at 99.9%+ completion, requiring another user to purchase the remaining small amount. While not a security vulnerability and eventually self-resolving with the next purchase, this creates suboptimal UX and potential confusion, especially if the remaining gap is very small and disincentivizes further participation.