# Token Generation Tutorial - CarbonCore ## Overview Complete guide to creating carbon credit projects and managing automated token issuance. ## Prerequisites ✅ Territory status: GovernmentVerified ✅ Valid CO2 absorption data ✅ Wallet connected ✅ ETH for gas fees ## Step-by-Step Process ### 1. Verify Territory Status ``` Check territory details: - Status must be "GovernmentVerified" - Verification not expired - CO2 data present ``` ### 2. Navigate to Token Creation - Go to "My Territories" - Find your verified territory - Click "Create Project" button - Or use Token Management page ### 3. Project Creation **Automatic Process**: 1. System retrieves CO2 data from verification 2. Calculates daily token rate 3. Deploys new ERC-20 contract 4. Links contract to territory 5. Sets you as beneficiary **Transaction Details**: - Function: `createProject(territoryId, vintageYear, locationName)` - Gas: ~2-3M gas units - Time: ~15 seconds ### 4. Token Details Your new token has: - Name: "CarbonCore Territory {ID} - {Year}" - Symbol: "CCT{ID}-{Year}" - Decimals: 18 - Initial Supply: 0 (mints daily) **Example**: - Territory 24, Year 2025 - Name: "CarbonCore Territory 24 - 2025" - Symbol: "CCT24-2025" ### 5. Daily Token Issuance **How It Works**: ``` Annual CO2 = 94,000,000 kg Daily Rate = 94,000,000 / 365 = 257,534 tokens/day Monthly = 7,726,027 tokens Yearly = 94,000,000 tokens ``` **Issuance Rules**: - Minimum interval: 24 hours - Maximum accumulation: 90 days - Public function: Anyone can trigger - Automatic recipient: Your wallet ### 6. First Token Issuance **Option A - Wait 24 Hours**: - System automatically processes - Tokens appear in wallet - No action required **Option B - Manual Trigger**: ```javascript // After 24 hours await carbonCreditFactory.issueCredits(projectId); ``` ### 7. Add Token to MetaMask **Automatic**: - Platform offers auto-add - Click "Add to MetaMask" - Approve in wallet **Manual**: 1. Open MetaMask 2. "Import tokens" 3. Paste token address 4. Symbol auto-fills 5. Confirm ### 8. View Token Balance **In Platform**: - Go to "Token Management" - See all your tokens - View balances - Check daily rates **In MetaMask**: - Token appears in asset list - Shows current balance - Updates automatically ### 9. Token Operations **Transfer**: ```javascript await token.transfer(recipientAddress, amount); ``` **Sell on Marketplace**: 1. Go to "OTC Marketplace" 2. Create sell offer 3. Set price 4. Deposit tokens to escrow **Retire for Certificate**: 1. Purchase credits 2. Click "Retire" 3. Receive certificate 4. Tokens burned ### 10. Monitor Project **Check Status**: - Project active/inactive - Last issuance time - Total tokens issued - Beneficiary address **Renewal**: - Monitor validation expiry - Request renewal 30 days before - Re-verify if needed ## Token Economics ### Value Calculation ``` Token Value = Market Price × Balance Example: 10,000 tokens × $10 = $100,000 ``` ### Revenue Model ``` Daily: 257,534 tokens × $10 = $2,575,340 Monthly: 7,726,027 tokens × $10 = $77,260,270 Annually: 94,000,000 tokens × $10 = $940,000,000 ``` ## Advanced Features ### Set Beneficiary ```javascript // Delegate token rights to another NFT await carbonCreditFactory.setTerritoryBeneficiary( territoryId, newBeneficiaryTokenId ); ``` ### Transfer Beneficiary ```javascript // Change beneficiary await carbonCreditFactory.transferBeneficiary( territoryId, newBeneficiaryTokenId ); ``` ## Troubleshooting **Issue**: Cannot create project **Fix**: Verify territory is GovernmentVerified **Issue**: No tokens after 24h **Fix**: Manually trigger `issueCredits()` **Issue**: Token not in MetaMask **Fix**: Manually import using token address **Issue**: Wrong beneficiary **Fix**: Use `transferBeneficiary()` ## Best Practices ✅ Create project immediately after validation ✅ Add token to MetaMask ✅ Monitor daily issuance ✅ Keep validation current ✅ Track token value ✅ Plan for tax implications --- **Version**: 2.0 | **Updated**: January 2025