Smart Contract Architecture

Deep dive into ClusterYield's smart contract functionality, security measures, and technical implementation

Smart Contract Overview

How ClusterYield Works

1
Investment Deposit
Users deposit USDT and select an investment plan (7-180 days)
2
Daily Returns
Contract calculates daily profits based on plan (0.7% - 2.8% daily)
3
Referral Rewards
Automatic distribution to 17 levels of referrers when profits are generated
4
Withdrawals
Users can withdraw profits daily and capital after plan completion

Contract Architecture

Investment Engine
Core logic for managing investment plans and calculating returns
Key functions: invest(), calculateProfit(), withdrawCapital()
Referral System
17-level referral tracking and bonus distribution
Key functions: setReferrer(), claimReferralBonus(), getUserReferralLevels()
Security Layer
Reentrancy protection, access controls, and input validation
Key functions: onlyOwner(), nonReentrant(), validateInput()
State Management
User data storage, investment tracking, and profit calculations
Key functions: updateUserData(), trackInvestment(), calculateDailyReturns()

Investment Plans & Returns

ClusterYield offers 8 investment plans with varying durations and daily returns. All calculations are handled automatically by the smart contract.

7 Days
Plan 1
Daily:0.7%
Total:4.9%
Min:10 USDT
14 Days
Plan 2
Daily:0.9%
Total:12.6%
Min:50 USDT
30 Days
Plan 3
Daily:1.1%
Total:33%
Min:100 USDT
60 Days
Plan 4
Daily:1.3%
Total:78%
Min:500 USDT
90 Days
Plan 5
Daily:1.5%
Total:135%
Min:2,500 USDT
120 Days
Plan 6
Daily:2.0%
Total:240%
Min:5,000 USDT
150 Days
Plan 7
Daily:2.5%
Total:375%
Min:10,000 USDT
180 Days
Plan 8
Daily:2.8%
Total:504%
Min:25,000 USDT

Smart Contract Calculation

Daily profits are calculated automatically: userInvestment * dailyRate / 100
Profits accumulate daily and can be withdrawn at any time. Capital can only be withdrawn after plan completion.

Core Contract Functions

invest()
PUBLIC
Description
Creates a new investment plan for the user
Parameters
amount (USDT), plan (0-7 representing 7-180 days)
Security
Validates minimum investment (varies by plan), checks plan validity, handles referral bonuses
withdraw()
PUBLIC
Description
Withdraws profits from completed investment cycles
Parameters
None - automatically calculates available profits
Security
Time-locked withdrawals, validates ownership, prevents double withdrawals
withdrawCapital()
PUBLIC
Description
Withdraws original investment after plan completion
Parameters
investmentId - specific investment to withdraw
Security
Only allows withdrawal after plan completion, validates ownership
claimReferralBonus()
PUBLIC
Description
Claims accumulated referral bonuses
Parameters
None - claims all available bonuses
Security
Validates bonus availability, prevents double claims
getUserInvestments()
PUBLIC
Description
Returns all user investments and their status
Parameters
userAddress - address to query
Security
Read-only function, no state changes

Function Access Control

All user functions are public and can be called by anyone. Owner-only functions are clearly marked and limited to contract administration. No owner function can access user funds directly.

Referral System Implementation

How Referrals Work

1. Registration with Referrer
When users register via a referral link, their referrer is permanently stored in the contract
2. Investment Triggers Bonuses
Each time a user's investment generates profit, referral bonuses are automatically distributed
3. Level-based Percentages
Different percentages for each level (L1: 20%, L2: 10%, L3-7: 5%, L8-10: 3%, L11-17: 1%)
4. Investment-based Unlocking
Users unlock more referral levels by increasing their total investment amount

Technical Implementation

mapping(address => address) referrers;
Stores each user's direct referrer permanently
uint256[17] REFERRAL_PERCENTAGES;
Fixed percentages for each of the 17 referral levels
function getUserReferralLevels(user)
Calculates how many levels user can earn from based on investment
function distributeReferralBonuses()
Automatically called when profits are generated

Current Security Status

8
Security Features
0
Admin Withdrawals
10%
Platform Fee

ClusterYield smart contract implements industry-standard security practices using OpenZeppelin libraries and Solidity 0.8.19. The contract features comprehensive input validation, reentrancy protection, and time-locked capital withdrawals.

Platform Fee Structure

10% fee on deposits goes to platform development and maintenance. Your full investment amount earns rewards - fees don't reduce your earning potential.

Contract Details

Solidity Version:0.8.19
Network:Binance Smart Chain
Security Standard:OpenZeppelin
Source Code:Verified
Admin Withdrawal:Disabled

Technical Security Features

OpenZeppelin Security

Uses battle-tested OpenZeppelin contracts for ReentrancyGuard and Ownable

Reentrancy Protection

All critical functions protected against reentrancy attacks

Time-locked Capital

Investment capital locked for plan duration, preventing premature withdrawals

Contract Immutability

Core investment logic cannot be changed, ensuring user fund safety

Input Validation

Comprehensive validation prevents invalid operations and edge cases

No Admin Withdrawal

Contract owner cannot withdraw user funds - only platform fees

Security Implementation Status

Smart Contract Security

OpenZeppelin security standards with reentrancy protection

✓ IMPLEMENTED

Access Controls

Owner-based access control with function restrictions

✓ IMPLEMENTED

Fund Safety

No admin withdrawal - funds only go to users or creator via fees

✓ IMPLEMENTED

Input Validation

Comprehensive validation on all user inputs and parameters

✓ IMPLEMENTED

Time-locked Withdrawals

Capital withdrawals locked by investment plan duration

✓ IMPLEMENTED

Safe Math Protection

Solidity 0.8.19 built-in overflow protection

✓ IMPLEMENTED

Token Recovery

BEP20 token recovery mechanism for accidental transfers

✓ IMPLEMENTED

Event Logging

Comprehensive event logging for transparency

✓ IMPLEMENTED

Planned Security Audits

ClusterYield is committed to the highest security standards. We have planned comprehensive audits with leading security firms.

CertiK

Planned

Leading blockchain security firm audit planned for Q2 2025

PeckShield

Planned

Comprehensive smart contract security assessment planned

Hacken

Planned

Third-party security audit and penetration testing

Contract Verification & Transparency

Contract Address

ClusterYield Main Contract

0xa3512bD47D64fDA7AD9160A259f1cf95e35d0F61

Verify on BSCScan
✓ Verified and Deployed

Verification Steps

  • Source code published and verified
  • Bytecode matches source code
  • Constructor parameters validated
  • OpenZeppelin libraries verified

Contract Deployment Notice

Contract addresses will be published here upon mainnet deployment. Always verify contract addresses through official channels before interacting.

Security Best Practices & User Guidelines

For Users

  • Always verify contract addresses on BSCScan before interacting
  • Use hardware wallets (Ledger, Trezor) for large investments
  • Never share private keys, seed phrases, or wallet passwords
  • Start with smaller amounts to test the platform
  • Understand lock periods before investing
  • Keep your wallet software and browser updated

Platform Verification

  • Check contract source code is verified on BSCScan
  • Verify website SSL certificate and domain authenticity
  • Confirm official communication channels (Telegram)
  • Read and understand terms of service and risks
  • Monitor contract balance and activity regularly
  • Report suspicious activity to our team immediately

Risk Disclosure & Investment Warnings

Investment Risk Warning

DeFi investments carry inherent risks including but not limited to smart contract vulnerabilities, market volatility, regulatory changes, and total loss of capital. Past performance does not guarantee future results. Only invest what you can afford to lose completely.

Smart Contract Risks

  • • Smart contracts may contain undiscovered vulnerabilities
  • • Blockchain technology is still experimental
  • • External dependencies may introduce risks
  • • Network congestion may affect transactions

Market Risks

  • • Cryptocurrency markets are highly volatile
  • • BNB price fluctuations affect investment value
  • • Regulatory changes may impact operations
  • • Liquidity risks in extreme market conditions

Legal Disclaimer: ClusterYield is a DeFi protocol. Users interact with smart contracts directly. We do not provide investment advice. Consult qualified professionals before making investment decisions.

Security Contact & Support

Security Reporting

Bug Bounty Program

Report security vulnerabilities responsibly. Rewards available for valid findings.

Contact Security Team →
Emergency Contact

For critical security issues, contact our team immediately via Telegram.