A revolutionary decentralized platform where professional traders manage investment vaults through smart contracts, enabling users to earn passive income from expert trading strategies.
๐ Live Demo โข ๐ Documentation โข ๐ง Installation โข ๐ผ Contributing
TradePro is a decentralized autonomous investment platform that bridges professional traders with passive investors through blockchain-powered vaults. Each vault is managed by verified professional traders who execute sophisticated investment strategies while users earn proportional returns based on their deposits.
The platform is built on a robust smart contract infrastructure that ensures transparency, security, and automated execution of all operations.
graph LR
A[VaultFactory Contract] -->|Creates & Manages| B[Individual Vaults]
B -->|Executes| C[Trading Operations]
B -->|Tracks| D[User Deposits]
B -->|Calculates| E[Revenue Distribution]
C -->|Interfaces| F[DeFi Protocols]
subgraph "๐ Security Features"
G[Access Control]
H[Emergency Pause]
I[Multi-sig Validation]
end
B --> G
B --> H
B --> I
style A fill:#1976d2,color:#fff
style B fill:#388e3c,color:#fff
style C fill:#f57c00,color:#fff
graph TB
A[Next.js Frontend] -->|Web3 Integration| B[Wagmi Hooks]
B -->|Blockchain Connection| C[Smart Contracts]
A -->|UI Components| D[Product Cards]
A -->|State Management| E[React Context]
D -->|User Actions| F[Vault Operations]
subgraph "๐จ User Interface"
G[Vault Dashboard]
H[Trading Analytics]
I[Portfolio Tracker]
end
A --> G
A --> H
A --> I
style A fill:#000,color:#fff
style B fill:#646cff,color:#fff
style C fill:#f7931e,color:#fff
๐งช Base Sepolia Testnet Setup & Free Test ETH Guide
๐ Adding Base Sepolia Testnet to MetaMask
Follow the steps below to enable the Base Sepolia network in your MetaMask wallet:
Open MetaMask.
Click the network dropdown at the top.
Select "Show/hide test networks".
Enable the โTest networksโ toggle.
If Base Sepolia appears in the list โ select it.
If it does not appear automatically, add it manually using the details below:
- Network Name: Base Sepolia
- RPC URL: https://sepolia.base.org
- Chain ID: 84532
- Currency Symbol: ETH
- Block Explorer URL: https://sepolia.basescan.org
๐ง Getting Free Test ETH (Base Sepolia) via Google Cloud Faucet
You can request free test ETH for development directly from Google Cloud:
๐ฅ Official Faucet: https://cloud.google.com/application/web3/faucet
How to request:
Copy your MetaMask wallet address (starts with 0x...).
Open the Google Cloud Web3 Faucet.
Select Base Sepolia in the network dropdown.
Paste your wallet address.
Complete the captcha.
Click Send โ your test ETH should arrive shortly.
๐ Tips
Base Sepolia ETH is test-only, has no real value, and is used only for development.
If the faucet rate-limits you, try again later.
Ensure you selected Base Sepolia in MetaMask before testing transactions.
If you'd like the same style block for any other testnet (Polygon, Arbitrum, Optimism, BNB, etc.) โ I can generate it as well.
- Verified Traders: Each vault is managed by professionally verified traders with proven track records
- Transparent Performance: Real-time APY tracking and historical performance data
- Strategy Diversity: Multiple trading approaches from conservative to high-yield strategies
- Low Entry Barriers: Start investing with as little as 0.01 ETH
- Monthly Subscriptions: Affordable monthly fees (10-20 USD) for vault access
- Instant Liquidity: Withdraw your funds at any time without lock-up periods
- Trader Rating System: Like/dislike voting mechanism for trader performance
- Transparent Metrics: Real-time vault statistics and performance indicators
- Community Feedback: User reviews and trader accountability
sequenceDiagram
participant U as ๐ค User
participant F as ๐ฅ๏ธ Frontend
participant C as ๐ Smart Contract
participant V as ๐ฆ Vault
U->>F: Browse available vaults
F->>U: Display vault options & APY
U->>F: Select vault & enter deposit amount
F->>C: Call joinVault() function
C->>V: Add user to vault members
V->>C: Update user deposit balance
C->>U: Confirm successful join
sequenceDiagram
participant T as ๐จโ๐ผ Trader
participant V as ๐ฆ Vault Contract
participant D as ๐ DeFi Protocols
participant R as ๐ฐ Revenue Pool
T->>V: Execute trading strategy
V->>D: Interact with DEXs, lending protocols
D->>V: Generate returns/yields
V->>R: Accumulate profits
R->>V: Calculate user shares
V->>T: Distribute performance fee
sequenceDiagram
participant U as ๐ค User
participant C as ๐ Contract
participant V as ๐ฆ Vault
U->>C: Request withdrawal (amount)
C->>V: Validate user balance
V->>C: Calculate total returns
C->>U: Transfer principal + profits
V->>V: Update vault metrics
- Strategy: Low-risk, steady returns
- APY Target: 50%
- Monthly Fee: $10 USD
- Focus: Stablecoin farming, blue-chip DeFi protocols
- Strategy: Medium-risk, balanced portfolio
- APY Target: 70%
- Monthly Fee: $15 USD
- Focus: Mix of lending, DEX trading, yield farming
- Strategy: High-risk, maximum returns
- APY Target: 120%
- Monthly Fee: $20 USD
- Focus: Leveraged positions, new DeFi protocols, arbitrage
- Solidity 0.8.19: Smart contract development
- Foundry: Testing and deployment framework
- OpenZeppelin: Security standards and utilities
- Next.js 14: React-based web framework
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Wagmi: Web3 React hooks
- Viem: TypeScript Ethereum library
- ConnectKit: Wallet connection interface
- Ethereum: Primary blockchain network
node >= 18.0.0
npm >= 8.0.0
gitgit clone
cd tradepro1# Install all packages
npm install
# Install Foundry (for smart contracts)
curl -L https://foundry.paradigm.xyz | bash
foundryup# Copy environment template
cp packages/nextjs/.env.example packages/nextjs/.env.local
# Add your configuration
NEXT_PUBLIC_ALCHEMY_API_KEY=your_alchemy_key
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_wallet_connect_id# Start local blockchain (Terminal 1)
cd packages/foundry
make anvil
# Deploy contracts (Terminal 2)
cd packages/foundry
make deploy-local
# Start frontend (Terminal 3)
cd packages/nextjs
npm run devOpen http://localhost:3000 in your browser.
// Join a vault with ETH deposit
function joinVault(uint256 vaultId) external payable
// Add additional deposit to existing position
function addDeposit(uint256 vaultId) external payable
// Withdraw funds with accumulated returns
function withdrawEth(uint256 vaultId, uint256 amount) external
// Get user's deposit in a specific vault
function getUserVaultDeposits(uint256 vaultId, address user) external view returns (uint256)
// Vote for trader performance
function voteTrader(uint256 vaultId, bool isPositive) external// Create new vault (admin only)
function createVault(string memory name, address trader, uint256 fee) external onlyOwner
// Emergency pause functionality
function pause() external onlyOwner
function unpause() external onlyOwner
// Update vault parameters
function updateVaultFee(uint256 vaultId, uint256 newFee) external onlyOwnerThe platform features an intuitive dashboard displaying:
- ๐ Real-time vault performance metrics
- ๐ฐ User portfolio overview
- ๐ Historical APY trends
- ๐ Trader leaderboards
Each vault is presented with:
- Trader profile and verification status
- Current APY and performance history
- Monthly subscription fee
- Community ratings (thumbs up/down)
- Join/deposit/withdraw actions
- ๐ Dark/Light mode toggle
- ๐ฑ Mobile-responsive design
- โก Real-time balance updates
- ๐ Transaction notifications
- โ Access Control: Role-based permissions
- โ Reentrancy Protection: Secure external calls
- โ Emergency Pause: Circuit breaker mechanism
- โ Input Validation: Comprehensive parameter checking
- ๐งช Comprehensive Test Suite: 95%+ code coverage
- ๐ Static Analysis: Slither integration
- ๐ Manual Review: Professional security audit
- ๐๏ธ Formal Verification: Mathematical proofs
We welcome contributions from the community! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - ๐พ Commit your changes (
git commit -m 'Add amazing feature') - ๐ค Push to branch (
git push origin feature/amazing-feature) - ๐ Open a Pull Request
- ๐ Bug fixes and improvements
- โจ New vault strategies
- ๐จ UI/UX enhancements
- ๐ Documentation updates
- ๐งช Additional test coverage
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ง Email: tradepro.web3@gmail.com
- ๐ฆ X: @TradePro
- ๐ Pitch Deck: Full presentation
Investment Risk Warning: Trading and DeFi investments carry inherent risks. Past performance does not guarantee future results. Only invest what you can afford to lose. TradePro is experimental software - use at your own risk.
Built with โค๏ธ by the TradePro Team
๐ Star this repo โข ๐ Share with friends โข ๐ง Stay updated
