A decentralized marketplace platform with integrated token vault mechanics for revenue sharing and DeFi composability.
Tradecraft is a comprehensive decentralized marketplace platform that enables:
- Decentralized commerce with geographic market segmentation
- Secure escrow-based transactions
- Vendor verification and licensing
- Revenue sharing through tokenized vault mechanics
- DeFi composability with ERC-4626 standard
-
TradecraftManager
- Central contract registry
- Access control management
- Contract address resolution
- Cross-contract communication hub
-
Domain Contracts
- UserContract: User management and authentication
- VendorContract: Vendor profiles and verification
- ProductContract: Product listings and inventory
- OrderContract: Transaction and escrow management
- MarketContract: Geographic market segmentation
- StoresContract: Physical location management
- TradecraftVaultToken: ERC-4626 compliant token with bonding curve
-
Support Contracts
- StatsContract: Platform analytics
- KYBContract: Business verification
- MessageContract: Encrypted communication
The TRADE token implements ERC-4626 vault mechanics with:
- Bonding curve for price discovery
- Revenue sharing for stakers (40% of platform fees)
- Monthly distribution tranches
- Creator allocation with time lock
- DeFi composability
The TRADE token is designed to align incentives between platform stakeholders through a bonding curve mechanism and stake-to-earn revenue sharing model.
- Total Supply: 77,000,000 TRADE
- Creator Allocation: 20% (15,400,000 TRADE) - locked for 6 months
- Public Sale: 80% (61,600,000 TRADE) - released monthly over 12 months
The token uses a linear bonding curve where price increases with each purchase:
Price = basePrice + (slope * totalTokensSold)
Initial Price: 0.001 ETH
Slope: 0.000000001 ETH per token
Price (ETH)
│
0.002 │ ╱
│ ╱
0.0015│ ╱
│ ╱
0.001 │⎯⎯⎯⎯⎯⎯╱
│
└──────────────────────────────────────────────
0 20k 40k 60k 80k 100k Tokens Sold
Supply
│
77M │ Total Supply (77M)
│ ╭─────────────────────────────────────
61.6M│ │ Public Sale (80%)
│ │ Monthly Release = 5.13M
│ │
15.4M│────┤ Creator Lock (20%)
│ │ 6-month lock
│ │
0 │────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───►
0 1 2 3 4 5 6 7 8 9 10 11 12 Months
Platform Fees (10%)
│
▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Purchase │ │ Revenue │ │ Staked │
│ Tokens │───►│ Pool │◄───│ Tokens │
└─────────────┘ └──────────────┘ └─────────────┘
│ ▲
│ │
▼ │
┌──────────────┐ │
│Distribution to│ │
│ Stakers │───────────┘
└──────────────┘
Revenue
Share 7d 30d 90d 365d
Factor │ │ │ │
│ │ │ │ │
1.0│─────┴─────┴──────┴───────┴────►
│ Stake Duration
│
0.0│
└─────────────────────────────────►
Duration
Total Platform Revenue: 100 ETH
Total Staked: 500,000 TRADE
Revenue Share
┌──────────────────┐ 100k TRADE (20%) ┌──────────────┐
│ Large Staker │─────────────────►│ 20 ETH │
└──────────────────┘ └──────────────┘
┌──────────────────┐ 50k TRADE (10%) ┌──────────────┐
│ Medium Staker │─────────────────►│ 10 ETH │
└──────────────────┘ └──────────────┘
┌──────────────────┐ 5k TRADE (1%) ┌──────────────┐
│ Small Staker │─────────────────►│ 1 ETH │
└──────────────────┘ └──────────────┘
The platform takes 10% of all marketplace transactions as fees. Of these fees, 40% is distributed to token stakers proportionally based on their stake amount and duration.
- Minimum Stake: 7 days
- Maximum Stake: 365 days
- Revenue Share: 40% of platform fees distributed to stakers
- Distribution: Proportional to staked amount
- Claims: Revenue can be claimed at any time during active stake
- Unstaking: Tokens are locked until stake duration ends
If the platform processes 1000 ETH in transactions:
Transaction Volume: 1000 ETH
Platform Fee (10%): 100 ETH
Staking Revenue (40% of fees): 40 ETH
Distribution for stakers:
- If total staked = 1000 TRADE tokens:
- A user staking 100 TRADE (10%) would earn:
40 ETH × 10% = 4 ETH in revenue
- Monthly Base Amount: 5.13M TRADE
- Unsold tokens roll over to next month
- Example Monthly Pool:
Month 1: 5.13M TRADE available If 3M sold: 2.13M rolls to Month 2 Month 2 Pool: 5.13M + 2.13M = 7.26M TRADE
-
Short-term Staking (30 days):
Investment: 50 TRADE tokens Platform Monthly Revenue: 100 ETH Total Staked: 500 TRADE Expected Monthly Revenue: 4 ETH (Assuming 40% to staking pool and proportional share) -
Medium-term Staking (90 days):
Investment: 100 TRADE tokens Platform Quarterly Revenue: 300 ETH Total Staked: 500 TRADE Expected Quarterly Revenue: 24 ETH (Assuming consistent platform volume) -
Long-term Staking (180+ days):
Investment: 200 TRADE tokens Platform 6-Month Revenue: 600 ETH Total Staked: 500 TRADE Expected 6-Month Revenue: 96 ETH (Assuming consistent platform volume)
-
Active Staking Required:
- Must stake tokens to earn revenue
- Revenue is claimable during active stake
- Must restake after period ends to continue earning
-
Price Discovery:
- Bonding curve ensures fair price discovery
- Price formula: basePrice + (slope × totalTokensSold)
- Initial price: 0.001 ETH
- Slope: 0.000000001 ETH per token
-
Revenue Distribution:
- 40% of platform fees go to staking pool
- Distribution proportional to stake amount
- Claims processed in real-time
- Revenue must be claimed before unstaking
-
Staking Period:
- Tokens locked for chosen duration
- No early withdrawal
- Plan stake duration carefully
-
Revenue Variability:
- Returns depend on platform volume
- More stakers = smaller individual share
- Platform growth affects revenue
-
Price Impact:
- Token price follows bonding curve
- Larger purchases move price more
- Consider entry and exit timing
- Node.js v16+
- Hardhat
- TypeScript
# Clone the repository
git clone https://github.com/your-org/tradecraft.git
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Configure environment variables
# Edit .env with your settings# Compile contracts
npx hardhat compile
# Run tests
npx hardhat test
# Deploy to local network
npx hardhat node
npx hardhat run scripts/deploy.ts --network localhost-
BaseContract.sol
- Common utilities and access control
- Pagination support
- Cross-contract communication
-
TradecraftVaultToken.sol
- ERC-4626 vault implementation
- Bonding curve mechanics
- Revenue distribution
- Monthly tranche management
Each domain contract handles specific functionality:
-
UserContract.sol
- User registration and profiles
- Authentication
- Role management
-
VendorContract.sol
- Vendor profiles
- License management
- Market participation
-
ProductContract.sol
- Product listings
- Pricing
- Inventory management
-
OrderContract.sol
- Order creation
- Escrow management
- Payment processing
- Order state management
-
MarketContract.sol
- Market definition
- Geographic boundaries
- Market-specific rules
# Run all tests
npm test
# Run specific test suite
npx hardhat test test/TokenContract.test.ts
# Run tests with gas reporting
REPORT_GAS=true npx hardhat testnpx hardhat node
npx hardhat run scripts/deploy.ts --network localhostnpx hardhat run scripts/deploy.ts --network goerlinpx hardhat run scripts/deploy.ts --network mainnet- All contracts use OpenZeppelin's secure implementations
- ReentrancyGuard protection on state-changing functions
- Access control through TradecraftManager
- Regular security audits
- Bug bounty program
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
MIT License - see LICENSE.md
- Website: tradecraft.eth
- Email: tradecraf.eth@protonmail.com
- Twitter: @tradecraft