🛠 Developer API Documentation
Build your own query bot, notification bot, or dashboard using these on-chain APIs. All data is read directly from the BSC blockchain — no backend required.
📖 View Functions (Read-Only)
Call these directly from your app — no gas, no wallet needed.
getPoolStats()
→ (poolBalance, mainPoolBalance, dailyAvailableFunds, totalDeposits, currentRound, orderCount, processedCount, lastActivityTime, nextUnlockTime)
All values are uint256 (18 decimals). poolBalance = total USDT in contract. Hero pool = poolBalance × 0.5
getQueueStats(uint256 offset, uint256 limit)
→ (pendingCount, pendingTotalPayout, pendingUsers)
Withdrawal queue: pendingCount = orders waiting for daily funds, pendingUsers = unique addresses
getCountdownToRestart()
→ secondsLeft (uint256)
Seconds until doomsday restart. If 0, restart can be triggered by any new deposit.
getUserInfo(address user)
→ (firstDepositTime, lastDepositTime, totalDeposits, totalEarnings, hasActiveOrder, activeOrderCount)
User profile. activeOrderCount ≤ 2 (max 2 orders per address). totalDeposits/totalEarnings are uint256 (18 decimals).
getUserActiveOrders(address user)
→ (orderIds[], entryTimes[], unlockTimes[], currentPayouts[])
All active (non-withdrawn) orders for a user. currentPayouts includes accrued interest. All uint256[] arrays.
getOrderInfo(uint256 orderId)
→ (user, amount, entryTime, unlockTime, withdrawn, currentPayout)
Single order details. withdrawn=true means already cashed out. user is address, rest are uint256 (18 decimals).
getReferralChain(address user)
→ address[] chain
Up to 10-level referral chain. chain[0] = direct referrer, chain[9] = 10th generation. address(0) means no referrer.
orders(uint256 orderId)
→ (user, amount, entryTime, unlockTime, initialAmount, withdrawn, failedAttempts)
Full order struct. failedAttempts counts withdrawal retries. uint8 for failedAttempts, bool for withdrawn.
users(address user)
→ (firstDepositTime, lastDepositTime, lastWithdrawTime, totalDeposits, totalEarnings, hasActiveOrder, activeOrderCount)
Full user struct. Same as getUserInfo but includes lastWithdrawTime.
🔔 Events (For Notification Bots)
Listen to these events to build real-time notification bots.
event Deposit(address indexed user, address indexed referrer, uint256 amount, uint256 orderId)
Fired when someone deposits. referrer = address(0) if no referrer. amount = 100e18. orderId starts from 1.
event Withdraw(address indexed user, uint256 principal, uint256 interest, uint256 total)
Fired on successful withdrawal. total = principal + interest. All uint256 (18 decimals).
event RoundRestart(uint256 indexed oldRound, uint256 indexed newRound, uint256 restartPoolAmount)
Fired on doomsday restart. Hero awards + last10 rewards distributed. New round begins.
event UserForfeited(address indexed user, uint256 forfeitedAmount)
Fired when relay lock expires (5 days without reinvest). Forfeited amount goes to pool.
event ReferrerReward(address indexed referrer, address indexed user, uint256 generation, uint256 reward)
Fired per referral reward. generation 1-10. reward in USDT (18 decimals). Multiple events per deposit.
event Last10RewardDistributed(address[] users, uint256 eachAmount)
Fired on restart. Hero award distributed to last 10 active addresses. eachAmount per address.
⚙️ Key Constants
DEPOSIT_AMOUNT100 USDT (100e18)
LOCK_DURATION10 days (864000 seconds)
RELAY_LOCK_TIME5 days (432000 seconds)
ACTIVITY_TIMEOUT10 days (864000 seconds)
DAILY_INTEREST_RATE1% (basis 100/10000)
MAX_ORDERS_PER_USER2
REFERRAL_GENERATIONS10
Referral rewards per generation (in USDT):
Gen 15.0 USDT
Gen 22.0 USDT
Gen 31.0 USDT
Gen 40.5 USDT
Gen 50.4 USDT
Gen 6-70.3 USDT
Gen 8-90.2 USDT
Gen 100.1 USDT
⚡ Quick Start — Build a Bot (JavaScript)
// 1. Install ethers.js
// npm install ethers
const { ethers } = require('ethers');
// 2. Connect to BSC (see Contract Info above for RPC & address)
const provider = new ethers.JsonRpcProvider(
'https://bsc-dataseed1.binance.org' // mainnet RPC
);
const CONTRACT = '0x...'; // Replace with mainnet contract address
const ABI = [
"function getPoolStats() view returns (uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)",
"function getUserInfo(address) view returns (uint256,uint256,uint256,uint256,bool,uint256)",
"event Deposit(address,address,uint256,uint256)",
"event Withdraw(address,uint256,uint256,uint256)"
];
const contract = new ethers.Contract(CONTRACT, ABI, provider);
// 3. Query pool stats
async function queryPool() {
const stats = await contract.getPoolStats();
const balance = ethers.formatUnits(stats[0], 18);
const heroPool = (Number(balance) * 0.5).toFixed(2);
console.log(`Pool: ${balance} USDT`);
console.log(`Hero Award: ${heroPool} USDT`);
}
// 4. Listen to Deposit events (notification bot)
contract.on('Deposit', (user, referrer, amount, orderId) => {
console.log(`New deposit #${orderId} from ${user}`);
console.log(`Amount: ${ethers.formatUnits(amount, 18)} USDT`);
// Send to Telegram/Discord/DeBox here
});
// 5. Polling alternative (if WebSocket unstable)
setInterval(async () => {
const countdown = await contract.getCountdownToRestart();
const hours = Number(countdown) / 3600;
console.log(`Doomsday in ${hours.toFixed(1)} hours`);
}, 60000); // every minute
queryPool();
🧮 Deposit Allocation
Daily Pool (up to 87%)up to 87 USDT — processes withdrawal queue (100 - tech - referral - growth)
Tech Fee (1%)1 USDT — to tech wallet (try-catch, fallback to main pool)
Growth Fee (2%)2 USDT — added to main pool
Referral (up to 10%)up to 10 USDT — paid instantly on deposit, varies by referral chain
On Doomsday Restart:
Hero Award (50%)Last 10 active addresses share equally
Seed Fund (30%)Carried to next round
Restart Reserve (20%)Operations + next round bootstrap