Entry fees compound into infinite yield for top players
INFINIYIELD is a gaming platform where every entry fee flows into BTC-backed vaults that generate perpetual yield. Top players earn their share of the accumulated rewards.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ THE INFINIYIELD FLYWHEEL โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Player pays entry fee (e.g., 0.001 BTC) โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FEE SPLITTER โ โ
โ โ 90% / 10% split โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโดโโโโโโโโโโโ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ 90% VAULT โ โ 10% Platform โ โ
โ โ (BTC Pool) โ โ (Treasury) โ โ
โ โโโโโโโโฌโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ENDURANCE BTC STAKING โ โ
โ โ ~5% APY on Starknet โ โ
โ โ (via starkzap integration) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ACCUMULATED YIELD โ โ
โ โ Distributed to top 50% of players โ โ
โ โ โ โ
โ โ Top 1 โ 30% of yield โ โ
โ โ Top 2-5 โ 25% of yield โ โ
โ โ Top 6-10 โ 20% of yield โ โ
โ โ Top 11-25 โ 15% of yield โ โ
โ โ Top 26-50 โ 10% of yield โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ ๐ก KEY INSIGHT: Principal NEVER decreases, only grows. โ
โ More games = bigger vault = more yield = more players. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Node.js 18+
- npm, yarn, or bun
# Clone the repository
git clone https://github.com/spiritclawd/infiniyield.git
cd infiniyield
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:3000 in your browser.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 15 | React framework for Vercel deployment |
| Styling | Tailwind CSS 4 | Utility-first CSS |
| State | Zustand | Lightweight state management |
| Wallet | starkzap + Cartridge | Starknet wallet integration |
| Yield | Endurance | BTC staking on Starknet |
| Network | Starknet | Layer 2 for low fees |
import { calculateFeeSplit, formatBTC } from '@/lib/money-flow';
// Calculate fee split for 0.001 BTC entry
const split = calculateFeeSplit(100000n); // 100,000 satoshis = 0.001 BTC
console.log(`Vault receives: ${formatBTC(split.vaultAmount)}`); // 0.0009 BTC (90%)
console.log(`Platform receives: ${formatBTC(split.platformAmount)}`); // 0.0001 BTC (10%)import { calculateYieldDistribution, getYieldShareForRank } from '@/lib/money-flow';
// Total yield to distribute: 0.05 BTC
const distributions = calculateYieldDistribution(5000000n);
// Get yield share for rank 1
const rank1Share = getYieldShareForRank(1, 5000000n);
console.log(`Rank 1 earns: ${formatBTC(rank1Share.amountSatoshis)}`);starkzap is the official SDK for Starknet wallet and staking operations.
npm install starkzapimport { StarkZap, OnboardStrategy } from 'starkzap';
const sdk = new StarkZap({ network: 'mainnet' });
// Connect with Cartridge Controller (recommended)
const { wallet } = await sdk.onboard({
strategy: OnboardStrategy.Cartridge,
deploy: 'if_needed',
});
console.log('Connected:', wallet.address);import { mainnetTokens, Amount, fromAddress } from 'starkzap';
const BTC = mainnetTokens.BTC;
// Get balance
const balance = await wallet.balanceOf(BTC);
console.log(balance.toFormatted()); // "0.005 BTC"
// Transfer BTC
const tx = await wallet.transfer(BTC, [
{ to: fromAddress('0x123...'), amount: Amount.parse('0.001', BTC) },
]);
await tx.wait();// Stake BTC via Endurance validator (~5% APY)
const stakeTx = await sdk.stake(
Amount.parse('0.01', BTC).toBigInt(),
{ validator: 'ENDURANCE' }
);
// Unstake
const unstakeTx = await sdk.unstake(
Amount.parse('0.01', BTC).toBigInt(),
{ validator: 'ENDURANCE' }
);// src/lib/starkzap-client.ts
import {
StarkZap,
OnboardStrategy,
StarkSigner,
Amount,
fromAddress,
mainnetTokens
} from 'starkzap';
export class InfiniYieldSDK {
private starkzap: StarkZap;
private wallet: Wallet | null = null;
constructor(network: 'mainnet' | 'sepolia' = 'mainnet') {
this.starkzap = new StarkZap({ network });
}
async connectWallet() {
const result = await this.starkzap.onboard({
strategy: OnboardStrategy.Cartridge,
deploy: 'if_needed',
});
this.wallet = result.wallet;
return this.wallet;
}
async payEntryFee(
vaultAddress: string,
platformAddress: string,
amountBTC: string,
) {
if (!this.wallet) throw new Error('Not connected');
const BTC = mainnetTokens.BTC;
const total = Amount.parse(amountBTC, BTC);
// 90/10 split
const vaultAmount = total.toBigInt() * 90n / 100n;
const platformAmount = total.toBigInt() * 10n / 100n;
const tx = await this.wallet.transfer(BTC, [
{ to: fromAddress(vaultAddress), amount: Amount.fromBigInt(vaultAmount, BTC) },
{ to: fromAddress(platformAddress), amount: Amount.fromBigInt(platformAmount, BTC) },
]);
await tx.wait();
return tx.transactionHash;
}
async stakeVaultBTC(amountBTC: string) {
const amount = Amount.parse(amountBTC, mainnetTokens.BTC);
const tx = await this.starkzap.stake(amount.toBigInt(), {
validator: 'ENDURANCE',
});
return tx.transactionHash;
}
}Create .env.local:
# Network: mainnet or sepolia
NEXT_PUBLIC_NETWORK=mainnet
# Platform fee recipient (10%)
NEXT_PUBLIC_PLATFORM_FEE_RECIPIENT=0xYOUR_ADDRESS
# Vault contract (after deployment)
NEXT_PUBLIC_VAULT_CONTRACT=0xYOUR_VAULT
# Cartridge namespace
NEXT_PUBLIC_CARTRIDGE_NAMESPACE=infiniyield- Push to GitHub
- Import project in Vercel
- Set environment variables
- Deploy!
infiniyield/
โโโ src/
โ โโโ app/
โ โ โโโ page.tsx # Main dashboard
โ โ โโโ layout.tsx # Root layout
โ โ โโโ globals.css # Styles
โ โโโ lib/
โ โ โโโ starkzap-client.ts # starkzap integration
โ โ โโโ money-flow.ts # Fee/yield calculations
โ โโโ store/
โ โโโ game-store.ts # Zustand state
โโโ public/
โโโ .env.example
โโโ next.config.ts
โโโ tailwind.config.ts
โโโ tsconfig.json
โโโ package.json
| Feature | Description |
|---|---|
| Infinite Vault | Principal never decreases, only grows |
| BTC Native | Primary vault asset is Bitcoin |
| 90/10 Split | Fair fee distribution |
| Tiered Rewards | Top 50% share yield |
| Time-Weighted | Maintain position for bonus |
| Gasless UX | Via Cartridge Controller |
| Tier | Rank | Share | Example (1 BTC yield) |
|---|---|---|---|
| ๐ฅ Gold | Top 1 | 30% | 0.3 BTC |
| ๐ฅ Silver | Top 2-5 | 25% | 0.0625 BTC each |
| ๐ฅ Bronze | Top 6-10 | 20% | 0.04 BTC each |
| ๐ Purple | Top 11-25 | 15% | 0.01 BTC each |
| ๐ Blue | Top 26-50 | 10% | 0.004 BTC each |
| Game | Status | Entry Fee |
|---|---|---|
| Loot Survivor | โ Live | 0.001-0.01 BTC |
| Axis Arena | ๐ Coming Soon | TBD |
| Custom EGS Games | ๐ Integration | TBD |
- No private keys stored - All wallet ops via Cartridge Controller
- Audited contracts - Endurance staking is battle-tested
- Transparent fees - All splits visible on-chain
- Non-custodial - Players control their funds
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - see LICENSE
- Live Demo: infiniyield.vercel.app
- GitHub: github.com/spiritclawd/infiniyield
- starkzap Docs: docs.starknet.io/build/starkzap
- Endurance: endurance.starknet.io
- Cartridge: cartridge.gg
INFINIYIELD is a submission for the Dojo Game Jam VIII. It demonstrates:
- โ EGS (Embeddable Game Standard) compatibility
- โ On-chain state management
- โ Real yield generation
- โ Player incentive alignment
- โ Sustainable tokenomics (no inflation)
Built with โก by spiritclawd | Powered by Starknet + starkzap