Stake on your LinkedIn Games performance using stablecoins and earn rewards based on real, verified results. Built for LinkedIn Games fans on Ethereum Sepolia using Solidity, TypeScript, Tailwind, and Next.js.
- Sepolia Testnet - All staking and rewards use the Ethereum Sepolia testnet for fast, low-cost testing
- USDC Stablecoin - Stake and earn rewards using Sepolia USDC (ERC20)
- Auto Sepolia Switch - Wallet auto-prompts network switch during connect/stake/submit flows
- Play Now Links - Per-game quick launch buttons open LinkedIn game links in a new tab
- USDC Staking - Stake stablecoins on your LinkedIn Games scores
- Attested Verification - Result settlement requires server-signed attestation (nonce + deadline + signature)
- Historical Dashboard Aggregation - Charts aggregate across current, second-last, and legacy contracts
- Instant Rewards - Earn rewards when you meet your target score
- MetaMask Wallet - Browser wallet integration for Sepolia
- Pleasant UI - Clean, minimal design inspired by competitive gaming and LinkedIn Games
- Zero Gas Fees - Free testnet transactions, minimal mainnet costs
- Connect Wallet - Link your MetaMask wallet (app auto-prompts Sepolia switch if needed)
- Choose Game - Select a LinkedIn Game (Queens, Crossclimb, Pinpoint, Tango, Zip, Mini Sudoku, Patches)
- Stake USDC - Set your target and stake amount (minimum: 0.01 USDC)
- Play Now - Use the in-app Play Now button to open the selected LinkedIn game in a new tab
- Verify Result - Submit your score/time; app requests nonce, gets verifier attestation, then settles on-chain
- Earn Rewards - Meet your target and receive payout based on game reward configuration
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- TailwindCSS - For the styling
- Framer Motion - Smooth animations
- Chart.js - For the result analytics on dashboard
- ethers - Wallet interaction and contract calls
- Solidity - For 1 smart contract
- Solidity - On-chain staking and payout contract
- OpenZeppelin - Security primitives (Ownable, ReentrancyGuard, ECDSA)
- Sepolia Testnet - Fast and low-cost Ethereum test network
- Next.js API Routes - Nonce issuance and attestation endpoints
- Python 3.8+ - Existing contract compilation/deployment scripts
- Node.js 18+ and npm
- Python 3.8+ and pip
- MetaMask Wallet (mobile or browser extension)
- Sepolia Testnet Account (created via wallet)
cd StakeLiGames
npm installcd contracts
pip install -r requirements.txt# From contracts directory
python compile_solidity.pyThis generates:
abi.json- Contract ABIbytecode.txt- Compiled bytecodecompiled_contract.json- Full compilation artifact
The testnet now uses Sepolia USDC (ERC20) for simulation and staking.
- Visit the official Circle Sepolia USDC faucet: https://faucet.circle.com/
- Connect your wallet (e.g., MetaMask) and select the Sepolia network.
- Paste your wallet address and request testnet USDC.
- Confirm the transaction in your wallet.
- You will receive Sepolia USDC directly to your wallet (no asset opt-in required).
Note: The old Algorand testnet asset (ID 10458941) is no longer used. All staking and rewards now use Sepolia USDC.
# From contracts directory
python deploy_sepolia.pyOptions:
- Enter existing mnemonic (25 words from your wallet) OR
- Press Enter to generate a new account (you'll need to fund it)
The deployment script will:
- Compile Solidity contract
- Deploy to Ethereum Sepolia testnet
- Output deployed contract address
- Create/update
.env.localwith config
Output:
Contract deployed successfully!
Contract Address: 0x...
The deployment script automatically creates .env.local:
# Ethereum Sepolia Configuration
NEXT_PUBLIC_CHAIN_ID=
NEXT_PUBLIC_RPC_URL=https://rpc.sepolia.org
RPC_URL=https://ethereum-sepolia.publicnode.com
NEXT_PUBLIC_NETWORK_NAME=Sepolia Testnet
# Smart Contract Addresses
NEXT_PUBLIC_CONTRACT_ADDRESS=
NEXT_PUBLIC_USDC_ADDRESS=
PRIVATE_KEY=
VERIFIER_PRIVATE_KEY=
# Historical / Legacy Contracts (optional)
# Direct previous deployment (2nd last). Dashboard/chart reads this
# alongside NEXT_PUBLIC_CONTRACT_ADDRESS.
NEXT_PUBLIC_SECOND_LAST_CONTRACT_ADDRESS=
# Comma-separated list of previous contract addresses to include
# in the read-only dashboard and charts. This is only used for
# displaying historical stakes; new stakes always go to
# NEXT_PUBLIC_CONTRACT_ADDRESS.
NEXT_PUBLIC_LEGACY_CONTRACT_ADDRESSES=
# Application Settings
NEXT_PUBLIC_APP_NAME=
# From project root
npm run dev-
Connect Wallet - Click "Connect Wallet" (top right)
-
Select Game:
- Queens (Hard) → 25% reward
- Crossclimb (Hard) → 25% reward
- Mini Sudoku (Medium) → 20% reward
- Tango (Medium) → 20% reward
- Zip (Easy) → 15% reward
- Pinpoint (Special) → 30% reward
- Patches (Easy) → 10% reward
-
Configure Stake:
- Enter USDC amount (min: 0.01 USDC)
- Set your target (time or score, as per game)
- Review estimated returns
-
Create Stake - Approve USDC then create stake transaction
-
Play Game - Use Play Now and complete your LinkedIn Game
-
Verify Result - Submit result (nonce + signed attestation) to claim rewards
// Frontend flow before settlement call:
// 1) POST /api/verification/nonce
// 2) POST /api/verification/attest
// 3) call verifyAndPayoutWithAttestation(...) on contract# Frontend
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Smart Contracts
npm run contracts:compile # Compile Solidity contract
npm run contracts:deploy # Deploy to Sepolia
# Python (from contracts/)
python compile_solidity.py # Compile contracts
python deploy_sepolia.py # Deploy to testnet- Faucet: https://sepolia-faucet.pk910.de/#/ (Get free Sepolia ETH - Official)
- Explorer Options:
- https://sepolia.etherscan.io (Etherscan)
- Sepolia Docs: https://ethereum.org/en/developers/docs/networks/#sepolia
- OpenZeppelin Contracts: https://docs.openzeppelin.com/contracts
Global State:
total_staked- Total USDC locked in platformtotal_games- Number of games createdplatform_fee- Fee percentage (250 = 2.5%)owner- Platform owner address
Local State (per user):
staked_amount- User's active stakesgames_participated- Total games counttotal_winnings- Cumulative winningstotal_losses- Cumulative losses
Game Storage:
- Game data: player, target score, stake amount, flawless stake, timestamp, status
- Security data: verifier signer, used nonces, attestation window
-
createGame- Create new stake on game result- Args: gameId, gameType, targetScore, stakeAmount, flawlessStake
- Requires: USDC transfer to contract (min: 0.01 USDC)
-
verifyAndPayoutWithAttestation- Verify signed result and distribute rewards- Args: gameId, actualScore, flawlessClaimed, nonce, deadline, signature
- Requires: valid verifier signature + unused nonce + unexpired deadline
- Logic: If result meets target rule for game type -> payout, else stake flows to pool
-
setVerifierSigner/setDefaultAttestationWindow- Owner-configurable verifier and attestation policy
-
withdrawFees- Owner withdraws platform fees- Args: amount
- Clean & Minimal - Inspired by the challenge and excitement of LinkedIn Games
- Accessible - High contrast, readable fonts
- Responsive - Mobile-first design
- OpenZeppelin patterns for access control and signature recovery
- Reentrancy protection via ReentrancyGuard
- ECDSA attestation checks with nonce replay protection
- Access control for admin functions
- Nonce + deadline validation for result submissions
- Testnet first - Deploy safely before mainnet
Vercel (Recommended):
npm install -g vercel
vercel deployNetlify:
npm run build
netlify deploy --prod --dir=.nextEdit components/StakingInterface.tsx:
const games = [
{ id: "new_game", name: "New Game", difficulty: "Hard", targetTime: 60, unit: "sec", reward: "25%" },
// ... existing games
];Edit contracts/staking_contract.py:
reward := stake_amount / Int(5), # 20% reward (1/5)
# Change to stake_amount / Int(4) for 25%
# Change to stake_amount / Int(10) for 10%Recompile and redeploy:
python compile_solidity.py
python deploy_sepolia.pyContributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
- Sepolia Docs: https://sepolia.dev/
- Ethers Docs: https://docs.ethers.org
- OpenZeppelin Docs: https://docs.openzeppelin.com/contracts
- Next.js Docs: https://nextjs.org/docs
- Video Demo: https://youtu.be/J26eRUxOx74
- FirstDollar: https://firstdollar.money/SoumilMukh6476
- Referral: https://firstdollar.money/?r=k3S11X
- Blockchain Python: https://github.com/topics/blockchain-python
Built with love using Sepolia + Solidity + Next.js
Turn your gaming confidence into instant liquidity!
- Contract Address: 0x029EF7bCEC712a440cfAbFA9d65c7D01786FD8A2
- Chain ID: 11155111
- Network: Sepolia Testnet
├─ .env.local
├─ .eslintrc.json
├─ .gitignore
├─ GAME_CONFIGURATIONS.md
├─ README.md
├─ app
│ ├─ dashboard
│ │ └─ page.tsx
│ ├─ game
│ │ └─ [gameId]
│ │ └─ page.tsx
│ ├─ globals.css
│ ├─ layout.tsx
│ └─ page.tsx
├─ components
│ ├─ Features.tsx
│ ├─ Footer.tsx
│ ├─ Header.tsx
│ ├─ Hero.tsx
│ ├─ HowItWorks.tsx
│ ├─ NotificationBar.tsx
│ ├─ StakedGamesDashboard.tsx
│ ├─ StakingInterface.tsx
│ ├─ Stats.tsx
│ ├─ ThemeProvider.tsx
│ ├─ ThemeToggle.tsx
│ ├─ UserDashboard.tsx
│ └─ WalletProvider.tsx
├─ contracts
│ ├─ .env
│ ├─ @openzeppelin
│ │ └─ contracts
│ │ ├─ crosschain
│ │ │ ├─ amb
│ │ │ ├─ arbitrum
│ │ │ ├─ errors.sol
│ │ │ ├─ optimism
│ │ │ └─ polygon
│ │ ├─ finance
│ │ ├─ governance
│ │ │ ├─ compatibility
│ │ │ ├─ extensions
│ │ │ └─ utils
│ │ ├─ interfaces
│ │ ├─ metatx
│ │ ├─ mocks
│ │ │ ├─ ERC165
│ │ │ ├─ compound
│ │ │ ├─ crosschain
│ │ │ ├─ docs
│ │ │ ├─ governance
│ │ │ ├─ proxy
│ │ │ ├─ token
│ │ │ └─ wizard
│ │ ├─ package.json
│ │ ├─ proxy
│ │ │ ├─ ERC1967
│ │ │ ├─ beacon
│ │ │ ├─ transparent
│ │ │ └─ utils
│ │ ├─ security
│ │ ├─ token
│ │ │ ├─ ERC1155
│ │ │ │ ├─ extensions
│ │ │ │ ├─ presets
│ │ │ │ └─ utils
│ │ │ ├─ ERC20
│ │ │ │ ├─ extensions
│ │ │ │ ├─ presets
│ │ │ │ └─ utils
│ │ │ ├─ ERC721
│ │ │ │ ├─ extensions
│ │ │ │ ├─ presets
│ │ │ │ └─ utils
│ │ │ ├─ ERC777
│ │ │ │ └─ presets
│ │ │ └─ common
│ │ ├─ utils
│ │ │ ├─ cryptography
│ │ │ ├─ escrow
│ │ │ ├─ introspection
│ │ │ ├─ math
│ │ │ └─ structs
│ │ └─ vendor
│ ├─ StakeLiGames.sol
│ ├─ abi.json
│ ├─ bytecode.txt
│ ├─ compile.py
│ ├─ compile_solidity.py
│ ├─ compiled_contract.json
│ ├─ deploy.py
│ ├─ deploy_sepolia.py
│ ├─ deployment.json
│ ├─ hardhat.config.js
│ ├─ package.json
│ ├─ requirements.txt
│ ├─ scripts
│ │ └─ deploy.js
│ └─ staking_contract.py
├─ next.config.js
├─ package-lock.json
├─ package.json
├─ postcss.config.js
├─ public
│ └─ favicon.jpg
├─ tailwind.config.ts
├─ tsconfig.json
└─ types
└─ ethereum.d.ts