Smart Contract Architecture

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

Smart Contract Overview

How SkyYield Works

1
Investment Deposit
Users deposit USDT and select an investment plan (5-150 days)
2
Daily Returns
Contract calculates daily profits based on plan (0.5% - 1.2% daily)
3
AI Trading Integration
Funds are managed by AI trading bot for enhanced returns
4
Referral Rewards
Automatic distribution to 21 levels of referrers when profits are generated
5
Withdrawals
Users can claim profits daily and withdraw capital after lock period

Contract Architecture

Investment Engine
Core logic for managing 7 investment plans and calculating returns
Key functions: invest(), claimRewards(), withdrawCapital()
21-Level Referral System
Investment-based referral tracking and bonus distribution
Key functions: _payReferralCommissions(), claimReferralBonuses(), getUserReferralLevels()
AI Trading Bot
Integration with AI trading bot for enhanced profit generation
Key functions: transferToBot(), receiveProfits(), setTradingBot()
Security Layer
Reentrancy protection, access controls, and input validation
Key functions: onlyOwner(), nonReentrant(), validateInput()

Investment Plans &Returns

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

5 Days
Plan 1
Daily: 0.5%
Total: 5.0%
Min: 20 USDT
10 Days
Plan 2
Daily: 0.6%
Total: 12.0%
Min: 50 USDT
30 Days
Plan 3
Daily: 0.7%
Total: 42.0%
Min: 100 USDT
60 Days
Plan 4
Daily: 0.8%
Total: 96.0%
Min: 500 USDT
90 Days
Plan 5
Daily: 0.9%
Total: 162.0%
Min: 2,500 USDT
120 Days
Plan 6
Daily: 1%
Total: 276.0%
Min: 5,000 USDT
150 Days
Plan 7
Daily: 1.2%
Total: 450.0%
Min: 10,000 USDT

Smart Contract Calculation

Daily profits are calculated automatically: (investmentAmount * dailyReturn) / 10000
Time-based rewards: (dailyReward * timeDiff) / 1 days
Profits accumulate daily and can be claimed at any time. Capital can only be withdrawn after lock period completion.

Core Contract Functions

invest()
PUBLIC
Description
Creates a new investment plan for the user with USDT
Parameters
planId (0-6), amount (USDT), referrer (address)
Security
Validates plan, minimum deposit, handles referral setup, 10% platform fee
claimRewards()
PUBLIC
Description
Claims accumulated daily USDT rewards from specific investment
Parameters
investmentIndex - specific investment to claim from
Security
Validates investment ownership, calculates time-based rewards, triggers referral bonuses
withdrawCapital()
PUBLIC
Description
Withdraws original investment after lock period expires
Parameters
investmentIndex - specific investment to withdraw
Security
Time-locked withdrawals, validates lock period completion, claims final rewards
claimReferralBonuses()
PUBLIC
Description
Claims accumulated referral bonuses from 21-level network
Parameters
None - claims all available bonuses
Security
Validates bonus availability, prevents double claims, tracks withdrawal history
calculateRewards()
VIEW
Description
Calculates available rewards for specific investment
Parameters
user (address), investmentIndex (uint256)
Security
Read-only function, time-based calculation, 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. Investment-Based Unlocking
Users unlock more referral levels by increasing their total active investment amount
4. 21-Level Commission Structure
L1: 21%, L2: 10%, L3-4: 5%, L5-6: 4%, L7-8: 3%, L9-10: 2%, L11-21: 1%

Technical Implementation

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

Investment-Based Level Unlocking

Level 1-3
$10+ USDT: L1 (21%), $50+ USDT: L2 (10%), $100+ USDT: L3-4 (5%)
Level 4-15
$150+ USDT: L5-6 (4%), $350+ USDT: L7-8 (3%), $400+ USDT: L9-10 (2%)
Level 16-21
$500+ USDT: L11-21 (1%) - Maximum $1000+ USDT for all levels

Current Security Status

8
Security Features
0
Admin Withdrawals
10%
Platform Fee

SkyYield 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.20
Network: Binance Smart Chain
Security Standard: OpenZeppelin
Source Code: Verified
Admin Withdrawal: Disabled
Platform Fee: 10%
Referral Levels: 21 Levels
Investment Plans: 7 Plans

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

SkyYield 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

SkyYield 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: SkyYield 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.