Repository navigation
Real Economy
@m3rcena/eco introduces a macroeconomic engine designed to eliminate runaway bot inflation and replicate real-world financial systems.
Standard checking accounts are vulnerable to robbery and inflation. Players can upgrade to high-security Bank Vaults to expand bank storage capacity, protect funds, and earn daily compound interest.
| Tier | Name | Upgrade Cost | Storage Capacity | Daily Interest Yield | Robbery Protection |
|---|---|---|---|---|---|
| 1 | π₯ Standard Checking | Free | πͺ 10,000 | 0.05% / day | 0% |
| 2 | π₯ Bronze Vault | πͺ 15,000 | πͺ 50,000 | 0.10% / day | 25% |
| 3 | π₯ Silver Vault | πͺ 75,000 | πͺ 250,000 | 0.25% / day | 50% |
| 4 | π Gold Vault | πͺ 250,000 | πͺ 1,000,000 | 0.50% / day | 75% |
| 5 | π Platinum Vault | πͺ 1,000,000 | πͺ 5,000,000 | 0.85% / day | 90% |
| 6 | π Diamond Vault | πͺ 5,000,000 | πͺ 25,000,000 | 1.15% / day | 98% |
| 7 | π‘οΈ Swiss Titanium Vault | πͺ 20,000,000 | Unlimited | 1.50% / day | 100% (Immune) |
// Inspect active vault tier
const vault = await eco.vault.getUserVault(userId);
console.log(`Current Vault: ${vault.currentTier.name} (Tier ${vault.currentTier.tier})`);
// Upgrade to next tier
const upgrade = await eco.vault.upgradeVault(userId);
if (upgrade.success) {
console.log(`Vault upgraded to ${upgrade.newTier?.name}! New capacity: πͺ ${upgrade.newTier?.capacity.toLocaleString()}`);
}
// Claim daily compound interest
const interest = await eco.vault.claimDailyInterest(userId);
if (interest.success) {
console.log(`Earned πͺ ${interest.interestEarned.toLocaleString()} in interest!`);
}import { EcoVaultUI } from "@m3rcena/eco";
new EcoVaultUI(eco, { context: interaction }).start();Players cannot borrow unlimited funds without consequences. @m3rcena/eco implements an algorithmic credit score ranging from 300 (POOR) to 850 (EXCELLENT).
- POOR: 300 β 579 (Ineligible for commercial loans)
- FAIR: 580 β 669 (Eligible for Starter Microloans)
- GOOD: 670 β 739 (Eligible for Business Loans)
- EXCELLENT: 740 β 850 (Eligible for Corporate & Megacorp Credit Lines)
const credit = await eco.loans.getCreditScore(userId);
console.log(`FICO Score: ${credit.score} (${credit.rating})`);Players can apply for collateralized loans to fund business ventures, stock trades, or equipment.
| Tier ID | Tier Name | Principal Limit | Minimum Score | Interest Rate | Term |
|---|---|---|---|---|---|
starter |
Personal Microloan | πͺ 10,000 | 500 | 5% | 7 days |
business |
Commercial Business Loan | πͺ 75,000 | 620 | 8% | 14 days |
real_estate |
Commercial Mortgage | πͺ 300,000 | 700 | 10% | 30 days |
megacorp |
Corporate Credit Line | πͺ 1,500,000 | 760 | 12% | 60 days |
const loan = await eco.loans.applyLoan(userId, "business");
if (loan.success) {
console.log(`Loan #${loan.loan?.id} approved! Principal πͺ ${loan.loan?.principal.toLocaleString()} disbursed to wallet.`);
}const payment = await eco.loans.repayLoan(userId, loanId, 25000);
if (payment.success) {
console.log(`Repaid! Remaining debt: πͺ ${payment.remainingDebt.toLocaleString()}`);
}If a player has overdue debt past the grace period, debt collectors seize 35% of all incoming work and business payouts until the arrears are resolved.
import { EcoLoanUI } from "@m3rcena/eco";
new EcoLoanUI(eco, { context: interaction }).start();Owning enterprises and luxury vaults incurs periodic municipal maintenance bills:
- Grid Electricity: Scaled by owned businesses and mining rigs.
- Water & Facility Maintenance: Scaled by real estate.
- Municipal Security Protection: Scaled by vault tier.
// Fetch pending bills
const pendingBills = await eco.taxes.getPendingBills(userId);
// Pay a single bill
await eco.taxes.payBill(userId, pendingBills[0].id);
// Settle all municipal bills with Good Citizen bonus
const receipt = await eco.taxes.payAllBills(userId);
console.log(`Settled ${receipt.paidCount} bills totaling πͺ ${receipt.totalPaid.toLocaleString()}!`);To maintain economic balance and prevent runaway oligarchies, @m3rcena/eco enforces a progressive marginal tax bracket on high net-worth accounts:
- πͺ 0 β 100,000: 0% (Tax exempt)
- πͺ 100,001 β 500,000: 2%
- πͺ 500,001 β 2,500,000: 4%
- πͺ 2,500,001 β 10,000,000: 6%
- πͺ 10,000,001+: 8%
const evasion = await eco.taxes.attemptTaxEvasion(userId);
if (evasion.success) {
console.log(`Successfully concealed assets! Saved πͺ ${evasion.taxSaved.toLocaleString()}.`);
} else {
console.error(`AUDIT DETECTED! Caught by IRS! Fined πͺ ${evasion.fine.toLocaleString()}.`);
}import { EcoBillsUI } from "@m3rcena/eco";
new EcoBillsUI(eco, { context: interaction }).start();GitHub: M3rcena/m3rcena-eco β’ NPM: @m3rcena/eco
- Bank Vaults & Compound Interest
- FICO Credit Scoring (300-850)
- Bank Loans & Debt
- Municipal Utility Bills
- Progressive Wealth Taxes & Evasion
- Interactive Blackjack Table
- Slot Machine (50x Mega Jackpot)
- European Roulette
- Crash Multiplier Simulator
- Coinflip & Dice
- Simulated Stock & Crypto Exchange
- Multiplayer Syndicate Heists
- Companion Pets & Foraging
- Mystery Loot Crates
- Dashboard Bridge Integration
- Weky Minigames Integration
- Complete REST API Reference
- Scoped Audio Cues Table