TryTrade is a decentralized application (dApp) that enables users to participate in competitive fantasy trading leagues on the Ethereum blockchain. The platform combines the excitement of cryptocurrency trading with the competitive nature of fantasy sports, allowing users to test their trading strategies without financial risk while competing for real ETH prizes.
- League Creation: Users can create custom trading leagues with configurable parameters
- Start and end dates
- Maximum player capacity
- Entry fee requirements
- League Discovery: Browse and join existing leagues through an intuitive interface
- Fixed Timeframe: All leagues operate within predetermined start and end dates
- Entry Staking: Participants stake ETH as entry fees when joining leagues
- Prize Pool: All staked ETH is automatically pooled for distribution to winners
- Winner Rewards: Prize distribution follows a structured payout system:
- 1st Place: 50% of total prize pool
- 2nd Place: 30% of total prize pool
- 3rd Place: 20% of total prize pool
- Virtual Portfolio: Each participant receives 100 virtual units for portfolio allocation
- Token Selection: Allocate units across various cryptocurrencies (ETH, BTC, and other supported tokens)
- Risk-Free Trading: No actual cryptocurrency purchases occur; purely simulation-based
- Portfolio Management: Real-time tracking of allocation percentages and amounts
- Real-Time Price Integration: Platform continuously monitors actual cryptocurrency price movements
- Performance Calculation: Automated computation of portfolio returns based on real market data
- Live Standings: Dynamic leaderboard updates reflecting current performance rankings
- Winner Determination: Final rankings determined by total portfolio return percentage
- Built on Ethereum using Scaffold-ETH 2 framework
- Smart contract-based league management and prize distribution
- Decentralized and trustless operation
- Intuitive web interface for league management and portfolio tracking
- Real-time updates and notifications
- Mobile-responsive design
- All transactions and prize distributions executed through smart contracts
- Immutable league rules and parameters
- Transparent prize pool management
- Auditable performance tracking
- Advanced scoring algorithms for enhanced competition mechanics
- Additional token support and trading pairs
- Social features and community engagement tools
- Advanced analytics and performance insights
TryTrade represents the convergence of decentralized finance (DeFi) and competitive gaming, offering users a unique platform to showcase their trading acumen while competing for substantial rewards.
Before you begin, you need to install the following tools:
- Node (>= v20.18.3)
- Yarn (v1 or v2+)
- Git
To get started with Scaffold-ETH 2, follow the steps below:
- Install dependencies if it was skipped in CLI:
cd my-dapp-example
yarn install
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Foundry. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in packages/foundry/foundry.toml
.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in packages/foundry/contracts
and can be modified to suit your needs. The yarn deploy
command uses the deploy script located in packages/foundry/script
to deploy the contract to the network. You can also customize the deploy script.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with your smart contract using the Debug Contracts
page. You can tweak the app config in packages/nextjs/scaffold.config.ts
.
Run smart contract test with yarn foundry:test
- Edit your smart contracts in
packages/foundry/contracts
- Edit your frontend homepage at
packages/nextjs/app/page.tsx
. For guidance on routing and configuring pages/layouts checkout the Next.js documentation. - Edit your deployment scripts in
packages/foundry/script