📖 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[], failedAttempts[])
All active (non-withdrawn) orders for a user. The first 4 are uint256[]; failedAttempts is uint8[] - any value >=1 means a previous auto-payout retry happened on that order. currentPayouts includes accrued interest.
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.
getUserFailedOrders(address user)
→ (orderIds[], payouts[], failedAttempts[], unlockTimes[], currentPayouts[])
Orders whose automatic payout failed and were queued for retry. payouts[] is uint256[] holding the initial principal; failedAttempts[] is uint8[] (retry count). Use this to drive "claim now" buttons or retry-status notifications.
🔔 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.
event Last10RewardPaid(address indexed user, uint256 amount)
Per-recipient hero-award event. Fires once per address during a restart, complementing the batch Last10RewardDistributed. Use this for individual congratulation notifications, distinct from ReferrerReward.
event TransferFailed(address indexed user, uint256 orderId, uint256 payout, uint256 failedAttempts)
Fired when an automatic withdrawal transfer fails (e.g. user wallet reverts). The order is enqueued for retry; surface a "claim now" CTA in your UI.
event TransferRetrySuccess(address indexed user, uint256 orderId, uint256 payout)
Fired when a previously failed withdrawal retry finally succeeds. Use it to clear any "retry pending" flag in your dashboard.
event PoolGrowth(address indexed user, uint256 amount)
Fired when the 2 USDT growth fee from a deposit is added to the main pool. Useful for daily / weekly pool-growth dashboards and bot reports.
⚡ 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