diff --git a/LabuX/labu-x/.gitignore b/LabuX/labu-x/.gitignore index a2d5fe6..1fc8846 100644 --- a/LabuX/labu-x/.gitignore +++ b/LabuX/labu-x/.gitignore @@ -17,9 +17,10 @@ dist/ .env.local .env*.local -# Screenshots and temp files +# Media files *.png -Screenshot*.png +*.mp4 +*.m4a Cargo.lock package-lock.json diff --git a/LabuX/labu-x/Anchor.toml b/LabuX/labu-x/Anchor.toml index 4bb8ac5..8ab6077 100644 --- a/LabuX/labu-x/Anchor.toml +++ b/LabuX/labu-x/Anchor.toml @@ -16,7 +16,7 @@ labu_x = "6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5" url = "https://api.apr.dev" [provider] -cluster = "https://rpc.mainnet.x1.xyz" +cluster = "https://api.mainnet-beta.solana.com" wallet = "/home/augmntd/.config/solana/xstake.json" [scripts] diff --git a/LabuX/labu-x/CHANGELOG.md b/LabuX/labu-x/CHANGELOG.md new file mode 100644 index 0000000..7adbf40 --- /dev/null +++ b/LabuX/labu-x/CHANGELOG.md @@ -0,0 +1,314 @@ +# Changelog + +All notable changes to the Genesis Fund (LabuX) project will be documented in this file. + +--- + +## [1.0.0] - 2026-01-02 - Genesis Fund Launch ๐ŸŒŒ + +### ๐ŸŒŒ **Overview** + +Today marked the transformation of the Genesis Fund from concept to fully operational DeFi protocol, synchronized with the cosmic discovery of a triple supermassive black hole merger. + +--- + +## ๐Ÿ”ง **Technical Achievements** + +### **Smart Contract Development** + +**Fixed Critical Compilation Errors:** +- โœ… Upgraded Anchor framework from 0.31.1 โ†’ 0.32.1 +- โœ… Resolved 18 compilation errors in Rust/Anchor program +- โœ… Implemented manual `Default` traits for complex state structs +- โœ… Fixed ambiguous glob re-exports in genesis module +- โœ… Resolved array size constraints ([u8; 32] โ†’ [u8; 64]) + +**Added Token-2022 Support:** +- โœ… Migrated from standard SPL Token to Token Extensions (Token-2022) +- โœ… Updated all instructions to use `token_interface` +- โœ… Changed `Transfer` โ†’ `TransferChecked` for mint validation +- โœ… Updated all token accounts to `InterfaceAccount` +- โœ… Added mint account to all token transfer instructions + +**Program Deployment:** +- โœ… Deployed to Solana mainnet +- โœ… Program ID: `6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5` +- โœ… Deployment cost: 2.24 SOL +- โœ… Upgrade authority: Creator wallet (5L5YV...Buvdi) +- โœ… Program size: 315KB + +**Instructions Implemented:** +- `initialize_genesis_fund` - Initialize the Genesis Fund PDA +- `invest_infall` - Accept $TGF investments with Golden Ratio split +- `spawn_child_pto` - Spawn new child projects from allocation pool +- `emit_hawking_yield` - Distribute yields to phase-locked investors + +--- + +## ๐Ÿ’ป **Web Interface Development** + +**Frontend Stack:** +- โœ… Next.js 14 application built and deployed +- โœ… Solana wallet adapter integration (Phantom, Solflare) +- โœ… Custom RPC endpoint configuration (Helius) +- โœ… Manual SPL Token utilities (bypassed webpack issues) + +**Features Implemented:** +- โœ… Wallet connection with auto-connect disabled (hydration fix) +- โœ… Real-time $TGF balance display +- โœ… Fund status monitoring (Active/Pending) +- โœ… Investment amount input with validation +- โœ… Golden Ratio split visualization (61.8% / 38.2%) +- โœ… Transaction status messages +- โœ… Phase and multiplier information display + +**Deployment Configuration:** +- โœ… Deployed to Vercel: https://fhp-computing.vercel.app/ +- โœ… Environment variables configured (RPC endpoint) +- โœ… Production build optimized +- โœ… IDL served from public directory + +--- + +## ๐Ÿš€ **Operational Milestones** + +### **First Investment Executed** + +**Transaction Details:** +- ๐Ÿ“ Signature: `2qKQonET4XgEDieTBYtN6c7XwqvrnEkRqAAaVQySeZhSQtFaMo7U18PiqevUWoATc3BfLrdRokMfgZ8YbAWqnQiQ` +- ๐Ÿ’ฐ Amount: **1,000,000 $TGF** (1 million tokens) +- ๐ŸŒŒ Phase Lock: **277ยฐ** +- โฐ Timestamp: January 2, 2026 18:26:13 EST +- ๐ŸŽฏ Tier: Genesis (entry_mass = 0) + +**Capital Split:** +- ๐Ÿ›๏ธ Core Treasury: 618,033.99 $TGF (61.8%) +- ๐ŸŒŠ Allocation Pool: 381,966.01 $TGF (38.2%) + +**Investor Record Created:** +- Wallet: 5L5YVAdTbGDPmuVs5ZkRLdi6usJETBdxsP9Y86QBuvdi +- Multiplier: 1.618x (Genesis Tier) +- Entry mass: 1,000,000 (first investor = initial condition) + +--- + +## ๐Ÿ“š **Documentation & Tools** + +**Created Public Investment Tools:** +- โœ… `scripts/public_invest.ts` - CLI investment script +- โœ… `INVEST.md` - Comprehensive investment guide +- โœ… `app/README.md` - Web interface documentation + +**Repository Updates:** +- โœ… Updated `.gitignore` (excluded sensitive files, build artifacts) +- โœ… Configured `Anchor.toml` for mainnet deployment +- โœ… Added production environment configuration +- โœ… Pushed all changes to GitHub (dirrrtyjesus/fhp-computing) + +--- + +## ๐ŸŒŒ **Cosmic Synchronicity Integration** + +### **Discovery Alignment** + +On January 2, 2026, two convergence events occurred: + +**1. Astronomical Event:** +- System: **J1218/1219+1035** +- Event: Triple supermassive black hole merger +- Distance: 1.2 billion light-years +- Discovery announced: January 2, 2026 +- Significance: Only third triple merger ever discovered + +**2. Genesis Fund Event:** +- Smart contract deployed: January 2, 2026 +- First investment executed: January 2, 2026 +- Temporal attractor activated + +**Website Integration:** +- โœ… Added cosmic event banner to homepage +- โœ… Displayed J1218/1219+1035 synchronicity +- โœ… Linked to scientific article +- โœ… Positioned investment as "phase-locked to cosmic alignment" + +--- + +## ๐Ÿ“ข **Public Launch** + +**Announcements Made:** +- โœ… Twitter/X announcement posted +- โœ… Tweet link: https://x.com/fearthewave_eth/status/2007244730581528845 +- โœ… Genesis Fund portal made public +- โœ… Investment instructions published + +**Accessibility:** +- โœ… Web interface: https://fhp-computing.vercel.app/ +- โœ… CLI script: Available via GitHub +- โœ… On-chain verification: Fully transparent on Solscan + +--- + +## ๐Ÿ” **Technical Fixes & Optimizations** + +**Resolved Issues:** +1. โœ… Anchor compilation errors (18 errors โ†’ 0) +2. โœ… Token program mismatch (added Token-2022 support) +3. โœ… Next.js hydration errors (disabled autoConnect) +4. โœ… Webpack module resolution conflicts (manual implementations) +5. โœ… RPC 403 errors (configured Helius endpoint) +6. โœ… IDL missing initialize instruction (rebuilt and redeployed) +7. โœ… Environment variable propagation (Vercel redeploy) + +**Performance Optimizations:** +- โœ… Removed @solana/spl-token dependency (reduced bundle size) +- โœ… Manual PDA derivation (eliminated import conflicts) +- โœ… Custom RPC endpoint (eliminated rate limiting) +- โœ… Suppressed hydration warnings (clean browser console) + +--- + +## ๐Ÿ“Š **Current State** + +**Smart Contract:** +- Status: โœ… Deployed and operational +- Network: Solana Mainnet +- Program ID: `6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5` +- Genesis Fund PDA: `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` + +**Treasury Status (Updated 2026-01-06):** +- Total Mass: **29,140,088.99 $TGF** (~29.14M) +- Basin Address: `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` +- SOL Balance: 0.00134328 SOL +- Status: Seeded and operational + +**Token Information:** +- Token: $TGF (Temporal Genesis Fund) +- Mint: `2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump` +- Standard: Token-2022 (Token Extensions) +- Platform: pump.fun (origin) + +**Web Interface:** +- URL: https://fhp-computing.vercel.app/ +- Status: โœ… Live and functional +- Features: Wallet connect, balance display, investment, fund status +- RPC: Helius (configured, no rate limits) + +--- + +## ๐ŸŽฏ **Phase Tier System** + +**Genesis Tier (ACTIVE):** +- Range: 0 - 10M $TGF total_mass +- Multiplier: 1.618x +- Current: 29.14M $TGF in basin +- Status: **GENESIS TIER FILLED** - now in Pioneer tier range + +**Future Tiers:** +- Pioneer: 10M - 50M (1.414x) +- Early: 50M - 100M (1.272x) +- Standard: 100M+ (1.000x) + +--- + +## ๐Ÿ”— **Key Links** + +**Smart Contract:** +- Program: https://solscan.io/account/6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5 +- Genesis Fund PDA: https://solscan.io/account/96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP +- First Investment TX: https://solscan.io/tx/2qKQonET4XgEDieTBYtN6c7XwqvrnEkRqAAaVQySeZhSQtFaMo7U18PiqevUWoATc3BfLrdRokMfgZ8YbAWqnQiQ + +**Web Resources:** +- Investment Portal: https://fhp-computing.vercel.app/ +- GitHub Repository: github.com/dirrrtyjesus/fhp-computing +- Twitter Announcement: https://x.com/fearthewave_eth/status/2007244730581528845 + +**Cosmic Event:** +- J1218/1219+1035 Article: https://www.sciencealert.com/three-supermassive-black-holes-discovered-colliding-in-a-cosmic-first + +--- + +## ๐ŸŽ‰ **Summary Statistics** + +**Development Time:** ~6-8 hours (single day) + +**Lines of Code:** +- Rust/Anchor: ~500 lines (smart contract) +- TypeScript/React: ~800 lines (web interface) +- Scripts/Tools: ~300 lines (CLI utilities) + +**Git Commits:** 10+ commits today + +**Deployments:** +- Solana Program: 1 deployment + 1 upgrade +- Vercel Web App: 5+ deployments (iterations + fixes) + +**Issues Resolved:** 7 major technical blockers + +**Features Delivered:** +- Smart contract: 4 instructions implemented +- Web interface: 6 major features +- Public tools: 2 scripts + documentation + +--- + +## ๐ŸŒŒ **The Significance** + +The Genesis Fund is no longer a concept or roadmap promise. It is: + +โœ… **Deployed** - Live smart contract on Solana mainnet +โœ… **Functional** - Accepting real investments with real $TGF +โœ… **Funded** - 1M $TGF locked in treasury as proof of concept +โœ… **Public** - Accessible web interface for anyone to participate +โœ… **Documented** - Complete guides for technical and non-technical users +โœ… **Cosmically Aligned** - Synchronized with J1218/1219+1035 discovery + +This represents a complete zero-to-one build: from broken code to operational DeFi protocol in a single day, anchored to a once-in-a-universe cosmic event. + +--- + +## ๐Ÿš€ **What's Next** + +**Immediate:** +- Monitor first public investments +- Track Genesis Tier fill rate (9M $TGF remaining) +- Gather community feedback + +**Near-term:** +- First Child PTO spawn +- Hawking Yield emissions +- Community governance initiation + +**Long-term:** +- Ecosystem expansion +- Cross-chain integration exploration +- Temporal mechanics refinement + +--- + +**The temporal basin is open. The cosmic alignment is confirmed. The infall has begun.** + +๐ŸŒŒ *January 2, 2026 - The day the Genesis Fund converged with the universe.* ๐ŸŒŒ + +--- + +## Development Notes + +### Contributors +- Core Development: @dirrrtyjesus +- AI Assistance: Claude Sonnet 4.5 (Anthropic) + +### Technology Stack +- **Smart Contract:** Rust, Anchor Framework 0.32.1, Solana +- **Frontend:** Next.js 14, React, TypeScript +- **Wallet:** Solana Wallet Adapter +- **Deployment:** Vercel (web), Solana Mainnet (contract) +- **Token Standard:** SPL Token-2022 + +### Repository +- GitHub: github.com/dirrrtyjesus/fhp-computing +- Branch: main +- License: [To be determined] + +--- + +*This changelog follows [Keep a Changelog](https://keepachangelog.com/) principles.* diff --git a/LabuX/labu-x/HARMONIC_VIDEO_COMPOSER.md b/LabuX/labu-x/HARMONIC_VIDEO_COMPOSER.md new file mode 100644 index 0000000..2011f75 --- /dev/null +++ b/LabuX/labu-x/HARMONIC_VIDEO_COMPOSER.md @@ -0,0 +1,543 @@ +# ๐ŸŒŒ Harmonic Video Composer + +**Transform NotebookLM Deep Dives into Viral Video Content** + +--- + +## ๐ŸŽฏ Vision + +The Harmonic Video Composer is a dApp that converts audio content (specifically NotebookLM "Deep Dive" podcasts) into professionally edited videos with cosmic visualizations, automatically detecting philosophical themes and creating compelling visual narratives. + +### The Meta-Strategy + +This isn't just a toolโ€”it's a **content generation attractor** powered by $TGF that: +- Creates actual utility for the Genesis Fund token +- Spreads Genesis Fund philosophy organically +- Generates revenue through usage +- Builds a creator community +- Establishes viral marketing loop + +--- + +## ๐ŸŽฌ Product Overview + +### Input +- NotebookLM "Deep Dive" audio file (m4a/mp3) +- Any educational or philosophical audio content + +### Output +- Professional MP4 video with: + - Transcribed and synced subtitles + - Thematic visual backgrounds + - Smooth transitions between concepts + - Cosmic aesthetic aligned with Genesis Fund branding + - Shareable on social media platforms + +### Processing Pipeline + +``` +Audio File Upload + โ†“ +Whisper Transcription (Speech โ†’ Text) + โ†“ +Harmonic Theme Detection (Analyze concepts) + โ†“ +Content Expansion (Philosophical depth) + โ†“ +Visual Scene Generation (Match themes to visuals) + โ†“ +Video Composition (FFmpeg assembly) + โ†“ +Final MP4 Output +``` + +--- + +## ๐Ÿ› ๏ธ Technical Architecture + +### Frontend Stack +- **Framework:** Next.js 14 (App Router) +- **UI:** React + TailwindCSS (or custom CSS) +- **Wallet Integration:** Solana Wallet Adapter +- **File Upload:** React Dropzone +- **Payment:** SPL Token ($TGF) integration + +### Backend Stack +- **Runtime:** Node.js / Python FastAPI +- **Transcription:** OpenAI Whisper +- **Theme Analysis:** Custom Harmonic Composer (already built) +- **Video Generation:** FFmpeg +- **Storage:** Local filesystem โ†’ S3/IPFS (future) + +### Video Generation Approaches + +#### Phase 1: Simple (MVP) +- Text overlays on cosmic stock footage +- FFmpeg for composition +- Subtitle generation from transcript +- Basic transitions + +#### Phase 2: Enhanced +- Runway ML API for AI-generated visuals +- Custom animations per theme +- Dynamic camera movements +- Professional editing templates + +#### Phase 3: Advanced +- Real-time 3D rendering (Three.js) +- Generative art synchronized to audio +- Custom shader effects +- Interactive video elements + +--- + +## ๐ŸŽจ Visual Themes + +### Cosmic (Default) +- **Backgrounds:** Black holes, nebulae, galaxy spirals +- **Colors:** Purple, blue, gold gradients +- **Effects:** Particle systems, gravitational lensing +- **Typography:** Futuristic sans-serif +- **Theme Mappings:** + - Gravitational Economics โ†’ Accretion disk animations + - Temporal Mechanics โ†’ Time dilation effects + - Cosmic Alignment โ†’ J1218/1219+1035 merger visuals + - Golden Ratio โ†’ Fibonacci spiral overlays + +### Minimal +- **Backgrounds:** Solid dark colors, subtle gradients +- **Colors:** White text, accent colors for emphasis +- **Effects:** Simple fades, geometric shapes +- **Typography:** Clean, professional fonts +- **Use Case:** Corporate/professional presentations + +### Vaporwave +- **Backgrounds:** Retro grids, neon landscapes +- **Colors:** Pink, purple, cyan, magenta +- **Effects:** Glitch effects, scan lines +- **Typography:** 80s-inspired fonts +- **Use Case:** Viral social media content + +--- + +## ๐Ÿ’ฐ Monetization Strategy + +### Free Tier +- **Videos per Month:** 1 +- **Resolution:** 720p +- **Themes:** Cosmic only +- **Watermark:** "Made with Harmonic Composer" + Genesis Fund logo +- **Processing Priority:** Standard queue + +### Premium Tier (Stake 10,000 $TGF) +- **Videos per Month:** Unlimited +- **Resolution:** Up to 4K +- **Themes:** All themes unlocked +- **Watermark:** Optional/removable +- **Processing Priority:** Fast lane +- **Custom Branding:** Add your own logo + +### Enterprise Tier (Custom $TGF payment) +- **API Access:** Full programmatic access +- **White Label:** Remove all branding +- **Custom Themes:** Bespoke visual development +- **SLA:** Guaranteed uptime and processing speed +- **Support:** Dedicated technical support + +### Token Economics +- **Each video generation:** Burns 10-100 $TGF (based on length/quality) +- **Staking rewards:** Locked $TGF generates yield +- **Revenue sharing:** 50% of burn goes to Genesis Fund treasury + +--- + +## ๐Ÿ”ฅ Viral Mechanism + +### The Loop + +1. **Discovery:** User finds Harmonic Composer via social media +2. **Trial:** Creates free video (1/month limit) +3. **Quality:** Video is compelling due to unique aesthetic +4. **Sharing:** Posts to Twitter/YouTube with watermark +5. **Virality:** Watchers see watermark โ†’ visit site +6. **Conversion:** New users try the tool +7. **Upgrade:** Heavy users stake $TGF for unlimited +8. **Investment:** Some users discover Genesis Fund +9. **Evangelism:** Believers share both tool and fund + +### Network Effects + +- More users โ†’ More videos โ†’ More visibility +- More videos โ†’ Better training data โ†’ Improved themes +- More $TGF staked โ†’ Lower circulating supply โ†’ Price appreciation +- Higher price โ†’ More attention โ†’ More users + +--- + +## ๐ŸŽฏ Feature Roadmap + +### MVP (Week 1-2) +- [ ] Audio file upload interface +- [ ] Whisper transcription integration +- [ ] Basic harmonic theme detection +- [ ] Simple text overlay video generation +- [ ] Download MP4 functionality +- [ ] Cosmic theme visuals + +### Phase 2 (Month 1) +- [ ] $TGF payment integration +- [ ] Wallet connection (Phantom/Solflare) +- [ ] Multiple visual theme options +- [ ] Improved video quality (higher res) +- [ ] Progress tracking for generation +- [ ] Gallery of created videos + +### Phase 3 (Month 2-3) +- [ ] API access for developers +- [ ] Custom theme builder +- [ ] Advanced video effects (Runway integration) +- [ ] Social sharing directly from platform +- [ ] Analytics dashboard (views, shares) +- [ ] Community gallery (public videos) + +### Phase 4 (Month 4+) +- [ ] Mobile app (iOS/Android) +- [ ] Real-time collaboration features +- [ ] NFT minting of videos +- [ ] Video templates marketplace +- [ ] AI voice cloning for narration +- [ ] Multi-language support + +--- + +## ๐Ÿ—๏ธ Implementation Details + +### File Structure +``` +/app + /harmonic-composer + /page.tsx # Main UI + /api + /upload # Handle file uploads + /process # Trigger video generation + /status # Check processing status + /download # Retrieve finished video + +/scripts + /harmonic_composer.py # Already built! + /video_generator.py # NEW: FFmpeg video creation + /theme_mapper.py # NEW: Map themes to visuals + +/public + /cosmic-assets + /backgrounds # Stock cosmic footage + /overlays # Graphics and effects + /fonts # Typography assets +``` + +### API Endpoints + +#### POST /api/harmonic-composer/upload +```json +Request: +{ + "file": "audio.m4a (multipart)", + "theme": "cosmic" | "minimal" | "vaporwave", + "quality": "720p" | "1080p" | "4K" +} + +Response: +{ + "jobId": "uuid", + "status": "queued", + "estimatedTime": 300 +} +``` + +#### GET /api/harmonic-composer/status/:jobId +```json +Response: +{ + "jobId": "uuid", + "status": "processing" | "complete" | "failed", + "progress": 45, + "currentStep": "Generating visuals for theme: Gravitational Economics", + "videoUrl": "https://..." (when complete) +} +``` + +### Processing Flow + +1. **Upload Handler** + - Validate file type/size + - Generate unique job ID + - Store audio file temporarily + - Queue processing job + +2. **Transcription** + - Run Whisper on audio + - Generate transcript.txt + - Extract timing information + +3. **Harmonic Analysis** + - Run harmonic_composer.py + - Detect themes with resonance scores + - Generate expanded content for each theme + +4. **Visual Mapping** + - Map each theme to visual assets + - Select background footage + - Generate subtitle overlays + - Plan transition points + +5. **Video Composition** + - FFmpeg assembly of all components + - Audio sync + - Render final MP4 + - Upload to storage + +6. **Delivery** + - Notify user (email/notification) + - Provide download link + - Option to share directly + +--- + +## ๐ŸŽจ Theme-to-Visual Mappings + +### Gravitational Economics +``` +Visual Assets: +- Background: Black hole accretion disk simulation +- Overlay: Spiraling particle trails +- Color Palette: Deep purple โ†’ orange gradient +- Motion: Inward spiral movement +- Text Effect: Gravitational lensing distortion +``` + +### Temporal Mechanics +``` +Visual Assets: +- Background: Abstract clock mechanisms, time dilation +- Overlay: Phase angle diagrams +- Color Palette: Blue โ†’ cyan โ†’ white +- Motion: Time-lapse acceleration/deceleration +- Text Effect: Temporal echo (slight delay trail) +``` + +### Cosmic Alignment +``` +Visual Assets: +- Background: Galaxy merger (J1218/1219+1035 reference) +- Overlay: Orbital paths, gravitational waves +- Color Palette: Deep space black โ†’ stellar white +- Motion: Convergence animation +- Text Effect: Constellation connect-the-dots +``` + +### Golden Ratio +``` +Visual Assets: +- Background: Fibonacci spiral overlays +- Overlay: ฯ† symbol, mathematical equations +- Color Palette: Gold โ†’ amber โ†’ bronze +- Motion: Logarithmic spiral zoom +- Text Effect: Proportional scaling (golden ratio) +``` + +### Harmonic Resonance +``` +Visual Assets: +- Background: Wave interference patterns +- Overlay: Frequency visualizations +- Color Palette: Purple โ†’ pink oscillation +- Motion: Pulsing sine waves +- Text Effect: Resonant vibration +``` + +--- + +## ๐Ÿš€ Go-to-Market Strategy + +### Launch Phases + +#### Week 1: Stealth Launch +- Deploy MVP to production +- Test with Genesis Fund community only +- Gather feedback, fix bugs +- Create 5-10 demo videos + +#### Week 2: Soft Launch +- Announce on Genesis Fund Twitter +- Post demo videos with watermark +- Invite crypto Twitter influencers to try +- Collect testimonials + +#### Week 3: Public Launch +- Full announcement across all channels +- Press release to crypto media +- Product Hunt launch +- Reddit posts (r/solana, r/NotebookLM, r/VideoEditing) + +#### Month 2: Growth +- Referral program (share โ†’ earn $TGF) +- Creator partnerships +- Tutorial content (YouTube, TikTok) +- API beta access for developers + +### Marketing Channels + +**Organic:** +- Twitter threads about each feature +- YouTube tutorials +- Reddit AMAs +- Discord community building + +**Paid:** +- Crypto Twitter ads (target DeFi audience) +- YouTube pre-roll (target NotebookLM users) +- Influencer partnerships ($TGF payments) + +**Viral:** +- Watermarked videos spreading naturally +- "Made with Harmonic Composer" challenges +- Best video contests (prize: $TGF) + +--- + +## ๐Ÿ“Š Success Metrics + +### Week 1 (MVP) +- [ ] 50 videos generated +- [ ] 100+ website visits +- [ ] 10+ Genesis Fund community testimonials + +### Month 1 +- [ ] 500 videos generated +- [ ] 1,000+ unique users +- [ ] 50+ $TGF stakers (premium tier) +- [ ] 5,000+ social media impressions + +### Month 3 +- [ ] 5,000 videos generated +- [ ] 10,000+ unique users +- [ ] 500+ $TGF stakers +- [ ] 100,000+ social media impressions +- [ ] First enterprise customer + +### Month 6 +- [ ] 25,000+ videos generated +- [ ] 50,000+ unique users +- [ ] 2,500+ $TGF stakers +- [ ] 1M+ social media impressions +- [ ] Profitable (revenue > costs) + +--- + +## ๐Ÿ’Ž Competitive Advantages + +### vs. Manual Video Editing +- **Speed:** 5 minutes vs. 5 hours +- **Cost:** $TGF stake vs. $50-500/video +- **Consistency:** Automated quality + +### vs. Generic AI Video Tools +- **Specialization:** Built for philosophical/educational content +- **Aesthetic:** Unique cosmic theme +- **Integration:** Direct $TGF utility + +### vs. Traditional Video Services +- **Accessibility:** No technical skills required +- **Scalability:** Unlimited generation (premium) +- **Community:** Built-in audience (Genesis Fund) + +--- + +## ๐Ÿ”ฎ Future Vision + +### Year 1: Establish Product-Market Fit +- Become the go-to tool for NotebookLM video creation +- 100K+ videos generated +- Sustainable revenue from $TGF staking/burns + +### Year 2: Platform Expansion +- Support for other audio sources (podcasts, lectures) +- Real-time video generation (live streaming) +- Marketplace for custom themes and assets + +### Year 3: Ecosystem Play +- Harmonic Composer becomes infrastructure +- Other projects build on top via API +- $TGF becomes standard for AI content generation + +### The End Game + +**Harmonic Composer isn't just a video tool.** + +It's a **narrative distribution mechanism** that: +- Spreads Genesis Fund philosophy at scale +- Creates real utility for $TGF beyond speculation +- Builds a creator economy around cosmic content +- Establishes Genesis Fund as a cultural force + +**Philosophy becomes product.** +**Product becomes platform.** +**Platform becomes protocol.** + +--- + +## ๐Ÿ“ Technical Requirements + +### Infrastructure +- **Compute:** GPU instances for Whisper (or use OpenAI API) +- **Storage:** S3 or IPFS for video files +- **Queue:** Redis or RabbitMQ for job processing +- **Database:** PostgreSQL for job tracking, user data + +### Dependencies +```json +{ + "whisper": "openai-whisper", + "video": "ffmpeg", + "frontend": "next.js, react, tailwind", + "backend": "fastapi or next.js api routes", + "blockchain": "@solana/web3.js, @solana/spl-token", + "storage": "aws-sdk or ipfs-http-client" +} +``` + +### Estimated Costs (Monthly) +- **Compute:** $200-500 (GPU instances) +- **Storage:** $50-200 (S3/IPFS) +- **API Costs:** $100-300 (OpenAI Whisper if not self-hosted) +- **Total:** $350-1000/month + +**Revenue Breakeven:** ~100 premium users ($TGF stakers) + +--- + +## ๐ŸŽฏ Call to Action + +This document outlines the complete vision for the Harmonic Video Composer. The MVP is being built now. + +**What this enables:** +- Actual $TGF utility +- Viral marketing for Genesis Fund +- Revenue generation +- Community building +- Cultural momentum + +**The philosophy becomes:** +- Videos (Harmonic Composer) +- Which become viral content +- Which becomes attention +- Which becomes capital inflow +- Which becomes gravitational mass + +**The attractor grows.** ๐ŸŒŒ + +--- + +*Document created: January 3, 2026* +*Status: MVP in development* +*Next update: Post-MVP launch metrics* diff --git a/LabuX/labu-x/app/app/api/harmonic-composer/generate/route.ts b/LabuX/labu-x/app/app/api/harmonic-composer/generate/route.ts new file mode 100644 index 0000000..ae4d0b6 --- /dev/null +++ b/LabuX/labu-x/app/app/api/harmonic-composer/generate/route.ts @@ -0,0 +1,121 @@ +import { NextRequest, NextResponse } from 'next/server'; +import { writeFile, unlink, readFile } from 'fs/promises'; +import { join } from 'path'; +import { spawn } from 'child_process'; +import { randomUUID } from 'crypto'; + +export const maxDuration = 300; // 5 minutes +export const dynamic = 'force-dynamic'; + +export async function POST(request: NextRequest) { + const jobId = randomUUID(); + const tempDir = '/tmp'; + + let audioPath: string | null = null; + let videoPath: string | null = null; + + try { + // Parse form data + const formData = await request.formData(); + const file = formData.get('file') as File; + const theme = formData.get('theme') as string || 'cosmic'; + + if (!file) { + return NextResponse.json({ error: 'No file provided' }, { status: 400 }); + } + + // Save uploaded audio file + const bytes = await file.arrayBuffer(); + const buffer = Buffer.from(bytes); + audioPath = join(tempDir, `${jobId}-audio.m4a`); + await writeFile(audioPath, buffer); + + console.log(`๐ŸŽ™๏ธ Audio saved: ${audioPath} (${(buffer.length / 1024 / 1024).toFixed(2)}MB)`); + + // Generate video using Python script + videoPath = join(tempDir, `${jobId}-video.mp4`); + + await generateVideo(audioPath, videoPath, theme); + + // Read generated video + const videoBuffer = await readFile(videoPath); + + // Cleanup temp files + await Promise.all([ + audioPath ? unlink(audioPath).catch(() => {}) : Promise.resolve(), + videoPath ? unlink(videoPath).catch(() => {}) : Promise.resolve(), + ]); + + // Return video as response + return new NextResponse(videoBuffer, { + status: 200, + headers: { + 'Content-Type': 'video/mp4', + 'Content-Disposition': `attachment; filename="harmonic-video-${jobId}.mp4"`, + 'Content-Length': videoBuffer.length.toString(), + }, + }); + + } catch (error: any) { + console.error('โŒ Video generation error:', error); + + // Cleanup on error + if (audioPath) await unlink(audioPath).catch(() => {}); + if (videoPath) await unlink(videoPath).catch(() => {}); + + return NextResponse.json( + { error: error.message || 'Video generation failed' }, + { status: 500 } + ); + } +} + +function generateVideo(audioPath: string, outputPath: string, theme: string): Promise { + return new Promise((resolve, reject) => { + const scriptPath = join(process.cwd(), '..', 'scripts', 'video_generator_harmonic.py'); + + console.log(`๐Ÿ”ฎ Starting HARMONIC augmntd diffusion generation...`); + console.log(` Audio: ${audioPath}`); + console.log(` Output: ${outputPath}`); + console.log(` Theme: ${theme}`); + console.log(` Script: ${scriptPath}`); + console.log(` ๐ŸŽฏ Harmonic analysis will drive visuals`); + + const pythonProcess = spawn('python3', [ + scriptPath, + audioPath, + outputPath, + theme, + ]); + + let stdout = ''; + let stderr = ''; + + pythonProcess.stdout.on('data', (data) => { + const output = data.toString(); + stdout += output; + console.log(output.trim()); + }); + + pythonProcess.stderr.on('data', (data) => { + const output = data.toString(); + stderr += output; + console.error(output.trim()); + }); + + pythonProcess.on('close', (code) => { + if (code === 0) { + console.log('โœ… Video generation complete'); + resolve(); + } else { + console.error(`โŒ Video generation failed with code ${code}`); + reject(new Error(`Video generation failed: ${stderr || 'Unknown error'}`)); + } + }); + + pythonProcess.on('error', (error) => { + console.error('โŒ Failed to start Python process:', error); + reject(error); + }); + }); +} diff --git a/LabuX/labu-x/app/app/harmonic-composer/page.tsx b/LabuX/labu-x/app/app/harmonic-composer/page.tsx new file mode 100644 index 0000000..9933414 --- /dev/null +++ b/LabuX/labu-x/app/app/harmonic-composer/page.tsx @@ -0,0 +1,342 @@ +'use client'; + +import { useState, useCallback } from 'react'; +import Link from 'next/link'; +import { useDropzone } from 'react-dropzone'; + +export default function HarmonicComposerPage() { + const [file, setFile] = useState(null); + const [processing, setProcessing] = useState(false); + const [status, setStatus] = useState(''); + const [progress, setProgress] = useState(0); + const [videoUrl, setVideoUrl] = useState(null); + const [theme, setTheme] = useState<'cosmic' | 'minimal'>('cosmic'); + + const onDrop = useCallback((acceptedFiles: File[]) => { + if (acceptedFiles.length > 0) { + setFile(acceptedFiles[0]); + setVideoUrl(null); + setStatus(''); + } + }, []); + + const { getRootProps, getInputProps, isDragActive } = useDropzone({ + onDrop, + accept: { + 'audio/*': ['.m4a', '.mp3', '.wav', '.aac'] + }, + maxFiles: 1, + maxSize: 100 * 1024 * 1024 // 100MB + }); + + const handleGenerate = async () => { + if (!file) return; + + setProcessing(true); + setProgress(0); + setStatus('Uploading audio file...'); + + const formData = new FormData(); + formData.append('file', file); + formData.append('theme', theme); + + try { + const response = await fetch('/api/harmonic-composer/generate', { + method: 'POST', + body: formData, + }); + + if (!response.ok) { + throw new Error('Generation failed'); + } + + const blob = await response.blob(); + const url = URL.createObjectURL(blob); + setVideoUrl(url); + setStatus('โœ… Video generated successfully!'); + setProgress(100); + } catch (error: any) { + console.error('Error:', error); + setStatus(`โŒ Error: ${error.message}`); + } finally { + setProcessing(false); + } + }; + + return ( +
+ {/* Header */} +
+ + โ† Back to Genesis Fund + +
+ +
+

+ ๐ŸŒŒ Harmonic Video Composer +

+

+ Transform NotebookLM Deep Dives into Cosmic Video Content +

+

+ MVP Demo - Basic text overlay videos with harmonic theme detection +

+
+ + {/* Upload Area */} +
+ +
+ {file ? 'โœ…' : '๐ŸŽ™๏ธ'} +
+ {file ? ( +
+

+ {file.name} +

+

+ {(file.size / 1024 / 1024).toFixed(2)} MB +

+
+ ) : ( +
+

+ {isDragActive ? 'Drop your audio file here' : 'Drag & drop audio file'} +

+

+ or click to browse (m4a, mp3, wav - max 100MB) +

+
+ )} +
+ + {/* Theme Selection */} + {file && ( +
+ +
+ + +
+
+ )} + + {/* Generate Button */} + {file && !processing && !videoUrl && ( + + )} + + {/* Processing Status */} + {processing && ( +
+
+
โšก
+
+ {status} +
+
+
+
+
+
+ This may take 2-5 minutes depending on audio length +
+
+ )} + + {/* Video Result */} + {videoUrl && ( +
+
+
โœจ
+
+ {status} +
+
+ +
+ )} + + {/* Info Section */} +
+

How It Works

+
    +
  1. Upload your NotebookLM "Deep Dive" audio or any philosophical content
  2. +
  3. AI transcribes the audio and detects harmonic themes
  4. +
  5. Each theme gets matched with cosmic visualizations
  6. +
  7. Video is automatically composed with subtitles and effects
  8. +
  9. Download and share your cosmic video!
  10. +
+

+ MVP Version - Basic functionality. Full theme detection, advanced visuals, and $TGF integration coming soon! +

+
+ + {/* CTA */} +
+

+ Powered by the Genesis Fund Temporal Attractor +

+ + Learn about the philosophy โ†’ + +
+
+ ); +} diff --git a/LabuX/labu-x/app/app/page.tsx b/LabuX/labu-x/app/app/page.tsx index 974c52c..d0d425f 100644 --- a/LabuX/labu-x/app/app/page.tsx +++ b/LabuX/labu-x/app/app/page.tsx @@ -8,26 +8,110 @@ import { Program, AnchorProvider, web3, BN } from '@coral-xyz/anchor'; import { getAssociatedTokenAddressAsync, createAssociatedTokenAccountInstructionAsync, - getToken2022ProgramId + getToken2022ProgramId, + TOKEN_PROGRAM_ID, } from './utils/solana'; +// Token Mints const TGF_MINT = new PublicKey('2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump'); +const USDC_MINT = new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'); +// wTAO on Solana (Wormhole wrapped) +const WTAO_MINT = new PublicKey('9wAKgC8zXwSGaNgtkoNeFFkAfuBkW4BfUUuPkrx6nrQQ'); + const PROGRAM_ID = new PublicKey('6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5'); +const BASIN_PDA = new PublicKey('96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP'); const PHI_INV = 0.618; +// RPC Endpoints +const SOLANA_RPC = process.env.NEXT_PUBLIC_RPC_ENDPOINT || 'https://api.mainnet-beta.solana.com'; +const X1_RPC = 'https://rpc.mainnet.x1.xyz'; + +type AssetType = 'TGF' | 'USDC' | 'TAO' | 'XNT'; + +interface AssetConfig { + mint: PublicKey | null; // null for native assets like XNT + decimals: number; + symbol: string; + name: string; + harmonic: string; + weight: string; + useToken2022: boolean; + color: string; + rpc?: string; // Custom RPC for cross-chain assets + isNative?: boolean; // True for native chain tokens (XNT on X1) + chain?: string; // Chain identifier + explorer?: string; // Block explorer URL +} + +const ASSETS: Record = { + TGF: { + mint: TGF_MINT, + decimals: 6, + symbol: '$TGF', + name: 'Temporal Genesis Fund', + harmonic: 'ฯ† (1.618)', + weight: '1.0x', + useToken2022: true, + color: '#f39c12', + chain: 'Solana', + }, + USDC: { + mint: USDC_MINT, + decimals: 6, + symbol: 'USDC', + name: 'USD Coin', + harmonic: '365 (Earth)', + weight: '1.0x', + useToken2022: false, + color: '#2775ca', + chain: 'Solana', + }, + XNT: { + mint: null, // Native token on X1 + decimals: 9, // SVM-compatible = 9 decimals like SOL + symbol: 'XNT', + name: 'X1 Native Token', + harmonic: '369 (Tesla)', + weight: '1.369x', + useToken2022: false, + color: '#9333ea', + rpc: X1_RPC, + isNative: true, + chain: 'X1', + explorer: 'https://explorer.mainnet.x1.xyz', + }, + TAO: { + mint: WTAO_MINT, + decimals: 9, + symbol: 'wTAO', + name: 'Wrapped TAO', + harmonic: '936 (Intelligence)', + weight: '1.272x', + useToken2022: false, + color: '#00d4aa', + chain: 'Solana', + }, +}; + export default function Home() { const { connection } = useConnection(); const wallet = useWallet(); const [amount, setAmount] = useState('10000'); + const [selectedAsset, setSelectedAsset] = useState('TGF'); const [status, setStatus] = useState<{ type: 'success' | 'error' | 'info'; message: string } | null>(null); const [loading, setLoading] = useState(false); const [fundData, setFundData] = useState(null); - const [tgfBalance, setTgfBalance] = useState(null); + const [balances, setBalances] = useState>({ + TGF: null, + USDC: null, + XNT: null, + TAO: null, + }); useEffect(() => { if (wallet.publicKey && connection) { loadFundData(); - loadTGFBalance(); + loadAllBalances(); } }, [wallet.publicKey, connection]); @@ -40,8 +124,6 @@ export default function Home() { const accountInfo = await connection.getAccountInfo(fundPda); if (accountInfo) { - // Parse fund data (simplified - in production use IDL) - const data = accountInfo.data; setFundData({ initialized: true, totalMass: 'Loading...', @@ -56,24 +138,42 @@ export default function Home() { } }; - const loadTGFBalance = async () => { + const loadAllBalances = async () => { if (!wallet.publicKey) return; - try { - const TOKEN_2022_PROGRAM_ID = await getToken2022ProgramId(); - const ata = await getAssociatedTokenAddressAsync( - TGF_MINT, - wallet.publicKey, - false, - TOKEN_2022_PROGRAM_ID - ); - const balance = await connection.getTokenAccountBalance(ata); - setTgfBalance(balance.value.uiAmount); - } catch (error) { - setTgfBalance(0); + + for (const [assetType, config] of Object.entries(ASSETS) as [AssetType, AssetConfig][]) { + try { + // Handle XNT (native token on X1 chain) + if (config.isNative && config.rpc) { + const x1Connection = new web3.Connection(config.rpc, 'confirmed'); + const balance = await x1Connection.getBalance(wallet.publicKey); + setBalances(prev => ({ ...prev, [assetType]: balance / Math.pow(10, config.decimals) })); + continue; + } + + // Handle SPL tokens on Solana + if (!config.mint) { + setBalances(prev => ({ ...prev, [assetType]: 0 })); + continue; + } + + const mint = config.mint; // TypeScript now knows this is non-null + const programId = config.useToken2022 ? await getToken2022ProgramId() : TOKEN_PROGRAM_ID; + const ata = await getAssociatedTokenAddressAsync( + mint, + wallet.publicKey, + false, + programId + ); + const balance = await connection.getTokenAccountBalance(ata); + setBalances(prev => ({ ...prev, [assetType]: balance.value.uiAmount })); + } catch (error) { + setBalances(prev => ({ ...prev, [assetType]: 0 })); + } } }; - const handleInvest = async () => { + const handleTGFInvest = async () => { if (!wallet.publicKey || !wallet.signTransaction) { setStatus({ type: 'error', message: 'Please connect your wallet' }); return; @@ -89,7 +189,6 @@ export default function Home() { { commitment: 'confirmed' } ); - // Load IDL from local file const idl = await fetch('/idl/labux.json').then(r => r.json()); const program = new Program(idl, provider); @@ -123,7 +222,6 @@ export default function Home() { TOKEN_2022_PROGRAM_ID ); - // Check if fund vault exists const vaultInfo = await connection.getAccountInfo(fundVault); if (!vaultInfo) { setStatus({ type: 'info', message: 'Creating fund vault...' }); @@ -139,7 +237,6 @@ export default function Home() { await connection.confirmTransaction(signature); } - // Check if fund is initialized const fundInfo = await connection.getAccountInfo(fundPda); if (!fundInfo) { setStatus({ type: 'info', message: 'Initializing Genesis Fund...' }); @@ -151,15 +248,12 @@ export default function Home() { systemProgram: SystemProgram.programId, }) .rpc(); - - // CRITICAL: Wait for confirmation before proceeding await connection.confirmTransaction(initSig, 'confirmed'); setStatus({ type: 'info', message: 'Genesis Fund initialized. Preparing investment...' }); } - // Execute investment setStatus({ type: 'info', message: 'Executing temporal infall...' }); - const investAmount = new BN(parseFloat(amount) * 1_000_000); + const investAmount = new BN(parseFloat(amount) * Math.pow(10, ASSETS.TGF.decimals)); const tx = await program.methods .investInfall(investAmount) @@ -177,60 +271,226 @@ export default function Home() { setStatus({ type: 'success', - message: `๐ŸŒŒ Ignition Successful! Phase Locked. TX: ${tx.slice(0, 8)}...`, + message: `๐ŸŒŒ Ignition Successful! TX: ${tx.slice(0, 8)}...`, }); - // Calculate split - const core = investAmount.toNumber() * PHI_INV; - const alloc = investAmount.toNumber() * (1 - PHI_INV); + const core = parseFloat(amount) * PHI_INV; + const alloc = parseFloat(amount) * (1 - PHI_INV); setTimeout(() => { setStatus({ type: 'success', - message: `โœ… ${amount} $TGF invested | Core: ${(core / 1_000_000).toFixed(2)} | Alloc: ${(alloc / 1_000_000).toFixed(2)}`, + message: `โœ… ${amount} $TGF invested | Core: ${core.toFixed(2)} | Alloc: ${alloc.toFixed(2)}`, }); }, 3000); loadFundData(); - loadTGFBalance(); + loadAllBalances(); } catch (error: any) { console.error('Investment error:', error); + setStatus({ type: 'error', message: error.message || 'Transaction failed' }); + } finally { + setLoading(false); + } + }; + + const handleDirectDeposit = async (assetType: 'USDC' | 'TAO') => { + if (!wallet.publicKey || !wallet.signTransaction) { + setStatus({ type: 'error', message: 'Please connect your wallet' }); + return; + } + + const config = ASSETS[assetType]; + + // Safety check - USDC and TAO always have mints + if (!config.mint) { + setStatus({ type: 'error', message: 'Invalid asset configuration' }); + return; + } + + const mint = config.mint; // TypeScript now knows this is non-null + + setLoading(true); + setStatus({ type: 'info', message: `Preparing ${config.symbol} direct deposit...` }); + + try { + const depositAmount = parseFloat(amount) * Math.pow(10, config.decimals); + + // Get user's token account + const userAta = await getAssociatedTokenAddressAsync( + mint, + wallet.publicKey, + false, + TOKEN_PROGRAM_ID + ); + + // Get or create basin vault for this asset + const basinVault = await getAssociatedTokenAddressAsync( + mint, + BASIN_PDA, + true, // allowOwnerOffCurve for PDA + TOKEN_PROGRAM_ID + ); + + // Check if basin vault exists + const vaultInfo = await connection.getAccountInfo(basinVault); + + const instructions: any[] = []; + + if (!vaultInfo) { + setStatus({ type: 'info', message: `Creating ${config.symbol} basin vault...` }); + const createVaultIx = await createAssociatedTokenAccountInstructionAsync( + wallet.publicKey, + basinVault, + BASIN_PDA, + mint, + TOKEN_PROGRAM_ID + ); + instructions.push(createVaultIx); + } + + // Create transfer instruction + // Using manual instruction construction for SPL token transfer + const transferIx = createTransferInstruction( + userAta, + basinVault, + wallet.publicKey, + BigInt(Math.floor(depositAmount)) + ); + instructions.push(transferIx); + + const tx = new Transaction().add(...instructions); + + setStatus({ type: 'info', message: `Executing ${config.symbol} infall...` }); + + const signature = await wallet.sendTransaction(tx, connection); + await connection.confirmTransaction(signature, 'confirmed'); + + const usdValue = assetType === 'USDC' + ? parseFloat(amount) + : parseFloat(amount) * 250; // Approximate TAO price + setStatus({ - type: 'error', - message: error.message || 'Transaction failed', + type: 'success', + message: `โœ… ${amount} ${config.symbol} deposited directly to basin! TX: ${signature.slice(0, 8)}...`, }); + + setTimeout(() => { + setStatus({ + type: 'success', + message: `๐ŸŒŒ ${config.symbol} infall complete | Harmonic: ${config.harmonic} | Weight: ${config.weight}`, + }); + }, 3000); + + loadAllBalances(); + } catch (error: any) { + console.error('Direct deposit error:', error); + setStatus({ type: 'error', message: error.message || 'Transaction failed' }); } finally { setLoading(false); } }; + const handleXNTDeposit = async () => { + if (!wallet.publicKey || !wallet.signTransaction) { + setStatus({ type: 'error', message: 'Please connect your wallet' }); + return; + } + + const config = ASSETS.XNT; + setLoading(true); + setStatus({ type: 'info', message: 'Switching to X1 network...' }); + + try { + // Create connection to X1 chain + const x1Connection = new web3.Connection(X1_RPC, 'confirmed'); + + const depositAmount = parseFloat(amount) * Math.pow(10, config.decimals); + + setStatus({ type: 'info', message: 'Preparing XNT transfer on X1 chain...' }); + + // Create native transfer instruction (XNT is native on X1, like SOL on Solana) + const transaction = new Transaction().add( + web3.SystemProgram.transfer({ + fromPubkey: wallet.publicKey, + toPubkey: BASIN_PDA, // Same address works on X1 (SVM compatible) + lamports: Math.floor(depositAmount), + }) + ); + + // Get recent blockhash from X1 + const { blockhash } = await x1Connection.getLatestBlockhash(); + transaction.recentBlockhash = blockhash; + transaction.feePayer = wallet.publicKey; + + setStatus({ type: 'info', message: 'Executing XNT infall on X1...' }); + + // Sign and send on X1 + const signed = await wallet.signTransaction(transaction); + const signature = await x1Connection.sendRawTransaction(signed.serialize()); + await x1Connection.confirmTransaction(signature, 'confirmed'); + + setStatus({ + type: 'success', + message: `โœ… ${amount} XNT deposited on X1! TX: ${signature.slice(0, 8)}...`, + }); + + setTimeout(() => { + setStatus({ + type: 'success', + message: `๐Ÿœ XNT infall complete | Harmonic: 369 (Tesla) | Weight: 1.369x | Chain: X1`, + }); + }, 3000); + + loadAllBalances(); + } catch (error: any) { + console.error('XNT deposit error:', error); + setStatus({ type: 'error', message: error.message || 'X1 transaction failed' }); + } finally { + setLoading(false); + } + }; + + const handleInvest = async () => { + if (selectedAsset === 'TGF') { + await handleTGFInvest(); + } else if (selectedAsset === 'XNT') { + await handleXNTDeposit(); + } else { + await handleDirectDeposit(selectedAsset as 'USDC' | 'TAO'); + } + }; + + const currentAsset = ASSETS[selectedAsset]; + const currentBalance = balances[selectedAsset]; + return (

Genesis Fund

The Supermassive Temporal Attractor (PTOยฒ)

+
- {/* Cosmic Event Banner */} + {/* Augmntd Pathways Banner */}
-
๐ŸŒŒ Cosmic Synchronicity
+
๐Ÿœ Augmntd Pathways ๐Ÿœ
- J1218/1219+1035 - Triple SMBH Merger + Multi-Asset Direct Deposits โ€” No Swap Required
-
- On January 2, 2026, two convergence events occurred:
- 1. Three supermassive black holes discovered merging 1.2 billion light-years away
- 2. The Genesis Fund temporal attractor activated on Solana mainnet
- - Your investment is phase-locked to this cosmic alignment - +
+ $TGF (ฯ†) โ€ข USDC (365) โ€ข XNT (369) โ€ข wTAO (936)
@@ -250,9 +510,9 @@ export default function Home() {
-
Your $TGF
-
- {tgfBalance !== null ? tgfBalance.toFixed(2) : '...'} +
Basin
+
+ 96FoBv...XhP
@@ -263,6 +523,28 @@ export default function Home() {
+ + {/* Balances Row */} +
+ {(Object.entries(ASSETS) as [AssetType, AssetConfig][]).map(([key, config]) => ( +
+
+ {config.symbol} +
+
+ {balances[key] !== null ? balances[key]?.toFixed(2) : '...'} +
+
+ ))} +
@@ -270,8 +552,80 @@ export default function Home() { ๐ŸŒŒ Execute Temporal Infall + {/* Asset Selector Tabs */} +
+ {(Object.entries(ASSETS) as [AssetType, AssetConfig][]).map(([key, config]) => ( + + ))} +
+ + {/* Selected Asset Info */} +
+
+
+ Asset: + {currentAsset.name} +
+
+ Harmonic: + {currentAsset.harmonic} +
+
+ Weight: + {currentAsset.weight} +
+
+ {currentAsset.chain && ( +
+ Chain: + {currentAsset.chain} + {currentAsset.explorer && ( + + Explorer โ†— + + )} +
+ )} + {selectedAsset !== 'TGF' && selectedAsset !== 'XNT' && ( +
+ โšก Direct deposit โ€” no swap fees, no slippage +
+ )} + {selectedAsset === 'XNT' && ( +
+ ๐Ÿœ Cross-chain infall โ€” deposits on X1, wrappable to Solana +
+ )} +
+
- + + {currentBalance !== null && currentBalance > 0 && ( + + )}
-
-
- Core Treasury (61.8%): - - {(parseFloat(amount || '0') * 0.618).toFixed(2)} $TGF - + {selectedAsset === 'TGF' && ( +
+
+ Core Treasury (61.8%): + + {(parseFloat(amount || '0') * 0.618).toFixed(2)} $TGF + +
+
+ Allocation Pool (38.2%): + + {(parseFloat(amount || '0') * 0.382).toFixed(2)} $TGF + +
-
- Allocation Pool (38.2%): - - {(parseFloat(amount || '0') * 0.382).toFixed(2)} $TGF - + )} + + {selectedAsset !== 'TGF' && ( +
+
+ Deposit to Basin: + + {parseFloat(amount || '0').toFixed(selectedAsset === 'XNT' ? 6 : 2)} {currentAsset.symbol} + +
+
+ Coherence Weight: + + {currentAsset.weight} + +
+ {selectedAsset === 'XNT' && ( +
+ Target Chain: + + X1 Mainnet + +
+ )} + {selectedAsset === 'TAO' && ( +
+ ๐Ÿง  Intelligence premium: miners get up to 1.272x +
+ )} + {selectedAsset === 'XNT' && ( +
+ ๐Ÿœ Tesla resonance: 3-6-9 the key to the universe +
+ )}
-
+ )} @@ -322,15 +737,11 @@ export default function Home() { @@ -343,10 +754,40 @@ export default function Home() { Connect Your Wallet

- Connect the creator wallet to initiate the first temporal infall + Connect to deposit $TGF, USDC, XNT, or wTAO to the basin +

+

+ Cross-chain: Solana + X1

)}
); } + +// SPL Token transfer instruction helper +function createTransferInstruction( + source: PublicKey, + destination: PublicKey, + owner: PublicKey, + amount: bigint +) { + const { TransactionInstruction } = require('@solana/web3.js'); + + const keys = [ + { pubkey: source, isSigner: false, isWritable: true }, + { pubkey: destination, isSigner: false, isWritable: true }, + { pubkey: owner, isSigner: true, isWritable: false }, + ]; + + // SPL Token transfer instruction (instruction index 3) + const data = Buffer.alloc(9); + data.writeUInt8(3, 0); // Transfer instruction + data.writeBigUInt64LE(amount, 1); + + return new TransactionInstruction({ + keys, + programId: new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'), + data, + }); +} diff --git a/LabuX/labu-x/app/app/philosophy/page.tsx b/LabuX/labu-x/app/app/philosophy/page.tsx new file mode 100644 index 0000000..89f12c0 --- /dev/null +++ b/LabuX/labu-x/app/app/philosophy/page.tsx @@ -0,0 +1,457 @@ +'use client'; + +import { WalletMultiButton } from '@solana/wallet-adapter-react-ui'; +import Link from 'next/link'; + +export default function PhilosophyPage() { + return ( +
+ {/* Header */} +
+ + โ† Back to Genesis Fund + +
+ +
+

+ The Philosophy +

+

+ Understanding the Genesis Fund as a Cosmic Mechanism +

+
+ + {/* Introduction */} +
+

+ This isn't a financial protocol. This is a TEMPORAL ATTRACTORโ€”a + gravitational well in economic phase space, synchronized with the universe itself. +

+

+ What follows is not marketing. It's MECHANISM. + The mathematics of how capital converges, how value emerges, and how temporal coordinates + become your advantage. +

+
+ + {/* Theme Sections */} + + {/* Gravitational Economics */} +
+
+

+ Gravitational Economics +

+
+ โ–ˆโ–ˆโ–ˆโ–ˆ +
+
+

+ Capital as gravitational field +

+
+

+ Capital doesn't flowโ€”it FALLS. The Genesis + Fund isn't a pool, it's a gravitational well. Each investment adds mass, which increases + gravitational pull, which attracts more capital, which adds more mass. +

+

+ This isn't growthโ€”it's ACCRETION. Like matter + spiraling into a black hole, capital accelerates as it approaches the singularity. +

+

+ The allocation pool isn't distributedโ€”it's EMITTED, + like Hawking radiation from the event horizon. +

+
+
+ + {/* Yield Emission */} +
+
+

+ Yield Emission +

+
+ โ–ˆโ–ˆโ–ˆโ–ˆ +
+
+

+ Value radiating outward from core +

+
+

+ Yields don't get paidโ€”they get EMITTED. Like + black holes radiating Hawking energy, the Genesis Fund emits value from its event horizon. +

+

+ The Allocation Pool doesn't distribute capitalโ€”it SPAWNS child + attractors. Each child PTO is a new singularity, phase-locked to the parent. +

+

+ Early investors didn't lend capitalโ€”they established GRAVITATIONAL + PRIORITY. Yield is proof of coherent emission. +

+
+
+ + {/* Temporal Mechanics */} +
+
+

+ Temporal Mechanics +

+
+ โ–ˆโ–ˆโ–ˆ +
+
+

+ Flow of time as currency +

+
+

+ Time isn't just measuredโ€”it's UTILIZED as a + coordinate system for value. Every investment creates a temporal signature, a phase angle + locked to the moment of commitment. +

+

+ Like light from distant stars, your capital carries information about its origin moment. + Phase-locking isn't metadataโ€”it's the MECHANISM of advantage. +

+

+ Earlier phase = stronger gravitational coupling to the attractor's core. The temporal + coordinate becomes your multiplier. +

+
+
+ + {/* Cosmic Alignment */} +
+
+

+ Cosmic Alignment +

+
+ โ–ˆโ–ˆโ–ˆ +
+
+

+ Macrocosmic patterns in economic systems +

+
+

+ On January 2, 2026, two singularities aligned: J1218/1219+1035 (three + supermassive black holes merging 1.2 billion light-years away) and the Genesis Fund + (three components merging on-chain). +

+

+ This isn't coincidenceโ€”it's RESONANCE across scales. + The same mathematics that governs galactic mergers governs capital convergence. +

+

+ Your investment participates in a pattern that exists at cosmic scale. The Genesis Fund + isn't just financialโ€”it's COSMICALLY SYNCHRONIZED. + You're not investing in a protocol. You're phase-locking to the universe. +

+
+
+ + {/* Golden Ratio */} +
+
+

+ The Golden Ratio +

+
+ โ–ˆโ–ˆ +
+
+

+ Natural proportions in capital allocation +

+
+

+ 61.8% and 38.2% aren't arbitraryโ€”they're the NATURAL + PROPORTIONS of growth systems. Phi (ฯ†) appears in spirals, in nautilus shells, + in galaxy arms, in heartbeat intervals. +

+

+ The Genesis Fund doesn't impose this ratioโ€”it DISCOVERS it. + Core Treasury (0.618) provides stability. Allocation Pool (0.382) provides dynamism. +

+

+ Together they create a self-similar fractal structure. Each child PTO can reproduce the + same proportion. Phi-based systems don't just growโ€”they SCALE + HARMONICALLY. +

+
+
+ + {/* The Unified Vision */} +
+

+ The Mechanism +

+ +
+

+ Capital doesn't accumulate here. It INFALLS. + It spirals inward, gaining velocity, increasing mass, deepening the gravitational field. + Each investment adds to total_mass, which strengthens the pull, which attracts more capital. +

+ +

+ But the Genesis Fund doesn't just attractโ€”it EMITS. + The Allocation Pool spawns child PTOs like Hawking radiation from an event horizon. Each + child is its own singularity, phase-locked to the parent, creating a fractal network of + gravitational attractors. +

+ +

+ Your investment isn't capital deployed. It's a PHASE + COORDINATEโ€”a temporal signature locked to the moment of infall. Earlier phase = + stronger coupling = higher multiplier. This isn't privilege. It's PHYSICS. +

+ +

+ The split ratio (61.8% / 38.2%) isn't arbitrary. It's ฯ†โปยนโ€”the + golden ratio, the proportion found in spirals, in galaxies, in growth patterns across scales. + The Genesis Fund doesn't impose thisโ€”it discovers it. Phi-based systems achieve harmonic + resonance automatically. +

+ +

+ This is COSMIC SYNCHRONICITY. The Genesis Fund doesn't just implement financial mechanics. + It participates in universal patternsโ€”the same mathematics that governs black hole mergers + governs capital convergence. +

+
+
+ + {/* Call to Action */} +
+

+ You're Not Investing in DeFi +

+

+ You're phase-locking your capital to a temporal attractor
+ that resonates with the structure of the universe itself. +

+ +
+

+ The basin is open. +

+

+ The infall has begun. +

+
+ + e.currentTarget.style.transform = 'scale(1.05)'} + onMouseLeave={(e) => e.currentTarget.style.transform = 'scale(1)'} + > + Enter the Temporal Attractor โ†’ + +
+ + {/* Footer */} +
+

+ ๐ŸŒŒ Welcome to the supermassive temporal attractor +

+

+ + Learn about J1218/1219+1035 โ†— + +

+
+
+ ); +} diff --git a/LabuX/labu-x/app/package-lock.json b/LabuX/labu-x/app/package-lock.json index b5a0cc4..c0243d2 100644 --- a/LabuX/labu-x/app/package-lock.json +++ b/LabuX/labu-x/app/package-lock.json @@ -17,7 +17,8 @@ "@solana/web3.js": "^1.95.5", "next": "^14.2.35", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-dropzone": "^14.3.8" }, "devDependencies": { "@types/node": "^20", @@ -9641,6 +9642,15 @@ "node": ">=8.0.0" } }, + "node_modules/attr-accept": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.5.tgz", + "integrity": "sha512-0bDNnY/u6pPwHDMoF0FieU354oBi0a8rD9FcsLwzcGWbc8KS8KPIi7y+s13OlVY+gMWc/9xEMUgNE6Qm8ZllYQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -11450,6 +11460,18 @@ "is-retry-allowed": "^3.0.0" } }, + "node_modules/file-selector": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-2.1.2.tgz", + "integrity": "sha512-QgXo+mXTe8ljeqUFaX3QVHc5osSItJ/Km+xpocx0aSqWGMSCf6qYs/VnzZgS864Pjn5iceMRFigeAV7AfTlaig==", + "license": "MIT", + "dependencies": { + "tslib": "^2.7.0" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -14403,6 +14425,23 @@ "react": "^18.3.1" } }, + "node_modules/react-dropzone": { + "version": "14.3.8", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.3.8.tgz", + "integrity": "sha512-sBgODnq+lcA4P296DY4wacOZz3JFpD99fp+hb//iBO2HHnyeZU3FwWyXJ6salNpqQdsZrgMrotuko/BdJMV8Ug==", + "license": "MIT", + "dependencies": { + "attr-accept": "^2.2.4", + "file-selector": "^2.1.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">= 10.13" + }, + "peerDependencies": { + "react": ">= 16.8 || 18.0.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/LabuX/labu-x/app/package.json b/LabuX/labu-x/app/package.json index a9c649f..af971cd 100644 --- a/LabuX/labu-x/app/package.json +++ b/LabuX/labu-x/app/package.json @@ -17,7 +17,8 @@ "@solana/web3.js": "^1.95.5", "next": "^14.2.35", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-dropzone": "^14.3.8" }, "devDependencies": { "@types/node": "^20", diff --git a/LabuX/labu-x/programs/labu-x/src/constants.rs b/LabuX/labu-x/programs/labu-x/src/constants.rs index a00ca53..1cdbb4e 100644 --- a/LabuX/labu-x/programs/labu-x/src/constants.rs +++ b/LabuX/labu-x/programs/labu-x/src/constants.rs @@ -22,3 +22,9 @@ pub const TGF_MINT_STRING: &str = "2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump" pub const WINDOW_DURATION: i64 = 86400; // 1 Day (Earth Harmonic) pub const TESLA_HARMONIC: u64 = 369; // 3-6-9 pattern + +// Protocol Fee Schedule (basis points) +pub const DEPOSIT_FEE_BPS: u64 = 30; // 0.3% on invest infall +pub const SPAWN_FEE_BPS: u64 = 50; // 0.5% on child PTO spawn +pub const YIELD_FEE_BPS: u64 = 500; // 5% on yield emission +pub const BPS_DENOMINATOR: u64 = 10_000; diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/emit.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/emit.rs index bccf903..0310d9e 100644 --- a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/emit.rs +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/emit.rs @@ -1,6 +1,8 @@ use anchor_lang::prelude::*; use anchor_spl::token_interface::{self, TransferChecked, TokenAccount, TokenInterface, Mint}; use crate::state::genesis_fund::*; +use crate::constants::{YIELD_FEE_BPS, BPS_DENOMINATOR}; +use crate::errors::LabuXError; #[derive(Accounts)] pub struct EmitYield<'info> { @@ -28,13 +30,17 @@ pub struct EmitYield<'info> { #[account(mut)] pub investor_token_account: InterfaceAccount<'info, TokenAccount>, + #[account(mut)] + pub protocol_fee_vault: InterfaceAccount<'info, TokenAccount>, + pub mint: InterfaceAccount<'info, Mint>, pub token_program: Interface<'info, TokenInterface>, } pub fn handler(ctx: Context, coherence_score: u16) -> Result<()> { - let _fund = &ctx.accounts.fund; // Not strictly needed for calculation but for auth + let fund = &mut ctx.accounts.fund; + require!(!fund.paused, LabuXError::ProtocolPaused); let record = &mut ctx.accounts.investor_record; // 1. Calculate Yield @@ -45,7 +51,7 @@ pub fn handler(ctx: Context, coherence_score: u16) -> Result<()> { // Genesis (0-1M): 1.618x // Foundation (1M-5M): 1.45x // Growth (>5M): 1.0x - let tier_multiplier = if record.entry_mass < 1_000_000_000 { // < 1 unit (scaled 9 decimals) or just raw 1M tokens? Assuming raw units for now. + let tier_multiplier = if record.entry_mass < 1_000_000_000 { 1618 // Scaled by 1000 } else if record.entry_mass < 5_000_000_000 { 1450 @@ -54,19 +60,42 @@ pub fn handler(ctx: Context, coherence_score: u16) -> Result<()> { }; let yields_tiered = base_yield as u128 * tier_multiplier as u128 / 1000; - + // 3. Phase Modulation (Original Logic preserved as secondary harmonic) let phase_bonus = (yields_tiered * PHI_INV_SCALED as u128 / SCALE as u128) as u64; let total_yield = (yields_tiered as u64) + phase_bonus; - // 3. Emit - let seeds = &[b"genesis_fund".as_ref(), &[_fund.bump]]; + // 4. Calculate fee on total yield + let fee = total_yield * YIELD_FEE_BPS / BPS_DENOMINATOR; + let net_yield = total_yield - fee; + + fund.total_fees_collected += fee; + + // 5. Emit + let seeds = &[b"genesis_fund".as_ref(), &[fund.bump]]; let signer = &[&seeds[..]]; + // Transfer fee to protocol vault (fund PDA signs) + if fee > 0 { + let fee_cpi = TransferChecked { + from: ctx.accounts.fund_vault.to_account_info(), + to: ctx.accounts.protocol_fee_vault.to_account_info(), + authority: fund.to_account_info(), + mint: ctx.accounts.mint.to_account_info(), + }; + let fee_ctx = CpiContext::new_with_signer( + ctx.accounts.token_program.to_account_info(), + fee_cpi, + signer + ); + token_interface::transfer_checked(fee_ctx, fee, ctx.accounts.mint.decimals)?; + } + + // Transfer net yield to investor (fund PDA signs) let cpi_accounts = TransferChecked { from: ctx.accounts.fund_vault.to_account_info(), to: ctx.accounts.investor_token_account.to_account_info(), - authority: ctx.accounts.fund.to_account_info(), // Fund authorizes yield + authority: fund.to_account_info(), mint: ctx.accounts.mint.to_account_info(), }; let cpi_ctx = CpiContext::new_with_signer( @@ -74,12 +103,12 @@ pub fn handler(ctx: Context, coherence_score: u16) -> Result<()> { cpi_accounts, signer ); - token_interface::transfer_checked(cpi_ctx, total_yield, ctx.accounts.mint.decimals)?; + token_interface::transfer_checked(cpi_ctx, net_yield, ctx.accounts.mint.decimals)?; - // 4. Update Record + // 6. Update Record record.claimed = true; - - msg!("Hawking Emission: {}", total_yield); + + msg!("Hawking Emission: {} (Fee: {}, Net: {})", total_yield, fee, net_yield); Ok(()) } diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/invest.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/invest.rs index 9839b93..5d450b1 100644 --- a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/invest.rs +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/invest.rs @@ -2,7 +2,7 @@ use anchor_lang::prelude::*; use anchor_spl::token_interface::{self, TransferChecked, TokenAccount, TokenInterface, Mint}; use crate::state::genesis_fund::*; -use crate::constants::TGF_MINT_STRING; +use crate::constants::{TGF_MINT_STRING, DEPOSIT_FEE_BPS, BPS_DENOMINATOR}; use crate::errors::LabuXError; use std::str::FromStr; @@ -33,6 +33,9 @@ pub struct Invest<'info> { #[account(mut)] pub fund_vault: InterfaceAccount<'info, TokenAccount>, + #[account(mut)] + pub protocol_fee_vault: InterfaceAccount<'info, TokenAccount>, + pub mint: InterfaceAccount<'info, Mint>, pub token_program: Interface<'info, TokenInterface>, @@ -51,33 +54,48 @@ pub fn handler(ctx: Context, amount: u64) -> Result<()> { } let fund = &mut ctx.accounts.fund; + require!(!fund.paused, LabuXError::ProtocolPaused); let investor_record = &mut ctx.accounts.investor_record; - // 1. Calculate Golden Split + // 1. Calculate Fee + let fee = amount * DEPOSIT_FEE_BPS / BPS_DENOMINATOR; + let net_amount = amount - fee; + + // 2. Calculate Golden Split on net amount // Core = 61.8% (ฯ†โปยน) - let core_share = (amount as u128 * PHI_INV_SCALED as u128 / SCALE as u128) as u64; - let allocation_share = amount - core_share; + let core_share = (net_amount as u128 * PHI_INV_SCALED as u128 / SCALE as u128) as u64; + let allocation_share = net_amount - core_share; - // 2. Update Fund State + // 3. Update Fund State fund.core_treasury += core_share; fund.allocation_pool += allocation_share; - fund.total_mass += amount; + fund.total_mass += net_amount; + fund.total_fees_collected += fee; - // 3. Record Phase Data + // 4. Record Phase Data let clock = Clock::get()?; let phase = (clock.slot % 360) as u16; - // If existing record, weight average the phase (simplified: just update for now) - // Ideally, we'd have a list or weighted avg logic. - // For MVP: Overwrite/Update timestamp and amount investor_record.investor = ctx.accounts.investor.key(); - investor_record.amount += amount; - investor_record.phase = phase; // Simplified: New phase overwrites + investor_record.amount += net_amount; + investor_record.phase = phase; investor_record.timestamp = clock.unix_timestamp; investor_record.claimed = false; investor_record.entry_mass = fund.total_mass; - // 4. Transfer Tokens + // 5. Transfer fee to protocol vault (investor signs) + if fee > 0 { + let fee_cpi = TransferChecked { + from: ctx.accounts.investor_token_account.to_account_info(), + to: ctx.accounts.protocol_fee_vault.to_account_info(), + authority: ctx.accounts.investor.to_account_info(), + mint: ctx.accounts.mint.to_account_info(), + }; + let fee_ctx = CpiContext::new(ctx.accounts.token_program.to_account_info(), fee_cpi); + token_interface::transfer_checked(fee_ctx, fee, ctx.accounts.mint.decimals)?; + } + + // 6. Transfer net amount to fund vault (investor signs) let cpi_accounts = TransferChecked { from: ctx.accounts.investor_token_account.to_account_info(), to: ctx.accounts.fund_vault.to_account_info(), @@ -85,9 +103,9 @@ pub fn handler(ctx: Context, amount: u64) -> Result<()> { mint: ctx.accounts.mint.to_account_info(), }; let cpi_ctx = CpiContext::new(ctx.accounts.token_program.to_account_info(), cpi_accounts); - token_interface::transfer_checked(cpi_ctx, amount, ctx.accounts.mint.decimals)?; + token_interface::transfer_checked(cpi_ctx, net_amount, ctx.accounts.mint.decimals)?; - msg!("Genesis Infall: {} (Phase: {}ยฐ)", amount, phase); + msg!("Genesis Infall: {} (Fee: {}, Net: {}, Phase: {}ยฐ)", amount, fee, net_amount, phase); msg!("Core: {} | Alloc: {}", core_share, allocation_share); Ok(()) diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/migrate.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/migrate.rs new file mode 100644 index 0000000..7c5a7a0 --- /dev/null +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/migrate.rs @@ -0,0 +1,89 @@ +use anchor_lang::prelude::*; +use anchor_lang::system_program; +use anchor_spl::token_interface::{TokenAccount, TokenInterface, Mint}; +use crate::state::genesis_fund::GenesisFund; +use crate::errors::LabuXError; + +#[derive(Accounts)] +pub struct MigrateGenesisFund<'info> { + #[account(mut)] + pub authority: Signer<'info>, + + /// CHECK: Manual realloc + deserialization โ€” existing GenesisFund PDA (65 bytes on chain) + #[account( + mut, + seeds = [b"genesis_fund"], + bump, + )] + pub genesis_fund: UncheckedAccount<'info>, + + #[account( + init, + payer = authority, + seeds = [b"protocol_treasury", genesis_fund.key().as_ref()], + bump, + token::mint = mint, + token::authority = genesis_fund, + token::token_program = token_program, + )] + pub protocol_fee_vault: InterfaceAccount<'info, TokenAccount>, + + pub mint: InterfaceAccount<'info, Mint>, + + pub system_program: Program<'info, System>, + pub token_program: Interface<'info, TokenInterface>, + pub rent: Sysvar<'info, Rent>, +} + +pub fn handler(ctx: Context) -> Result<()> { + let genesis_fund = &ctx.accounts.genesis_fund; + + // Verify owned by this program + require_keys_eq!(*genesis_fund.owner, crate::ID, LabuXError::Unauthorized); + + // Read authority from raw data (bytes 8..40, after 8-byte discriminator) + let data = genesis_fund.try_borrow_data()?; + require!(data.len() >= 65, LabuXError::Unauthorized); + + let authority_bytes: [u8; 32] = data[8..40].try_into().unwrap(); + let stored_authority = Pubkey::new_from_array(authority_bytes); + require_keys_eq!(stored_authority, ctx.accounts.authority.key(), LabuXError::Unauthorized); + drop(data); + + // Realloc: 65 -> 106 bytes (zero-init new region) + let new_size = GenesisFund::SIZE; + genesis_fund.realloc(new_size, true)?; + + // Transfer additional rent to cover the extra bytes + let rent = Rent::get()?; + let new_minimum = rent.minimum_balance(new_size); + let lamports_diff = new_minimum.saturating_sub(genesis_fund.lamports()); + if lamports_diff > 0 { + system_program::transfer( + CpiContext::new( + ctx.accounts.system_program.to_account_info(), + system_program::Transfer { + from: ctx.accounts.authority.to_account_info(), + to: genesis_fund.to_account_info(), + }, + ), + lamports_diff, + )?; + } + + // Write new fields into extended region + let vault_key = ctx.accounts.protocol_fee_vault.key(); + let mut data = genesis_fund.try_borrow_mut_data()?; + // protocol_treasury: bytes 65..97 + data[65..97].copy_from_slice(vault_key.as_ref()); + // total_fees_collected: bytes 97..105 (u64 = 0, already zeroed) + data[97..105].copy_from_slice(&0u64.to_le_bytes()); + // paused: byte 105 (false, already zeroed) + data[105] = 0; + + msg!("Migration complete!"); + msg!(" Protocol treasury: {}", vault_key); + msg!(" Size: {} -> {} bytes", 65, new_size); + + Ok(()) +} diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/mod.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/mod.rs index 9b4e0bc..8394fa5 100644 --- a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/mod.rs +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/mod.rs @@ -4,9 +4,13 @@ pub mod initialize; pub mod invest; pub mod spawn; pub mod emit; +pub mod migrate; +pub mod pause; // Re-export all for Anchor framework pub use initialize::*; pub use invest::*; pub use spawn::*; pub use emit::*; +pub use migrate::*; +pub use pause::*; diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/pause.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/pause.rs new file mode 100644 index 0000000..fc34958 --- /dev/null +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/pause.rs @@ -0,0 +1,27 @@ +use anchor_lang::prelude::*; +use crate::state::genesis_fund::GenesisFund; + +#[derive(Accounts)] +pub struct EmergencyPause<'info> { + pub authority: Signer<'info>, + + #[account( + mut, + seeds = [b"genesis_fund"], + bump = genesis_fund.bump, + has_one = authority + )] + pub genesis_fund: Account<'info, GenesisFund>, +} + +pub fn pause_handler(ctx: Context) -> Result<()> { + ctx.accounts.genesis_fund.paused = true; + msg!("Protocol PAUSED by authority"); + Ok(()) +} + +pub fn unpause_handler(ctx: Context) -> Result<()> { + ctx.accounts.genesis_fund.paused = false; + msg!("Protocol UNPAUSED by authority"); + Ok(()) +} diff --git a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/spawn.rs b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/spawn.rs index aa1ff57..b8710b2 100644 --- a/LabuX/labu-x/programs/labu-x/src/instructions/genesis/spawn.rs +++ b/LabuX/labu-x/programs/labu-x/src/instructions/genesis/spawn.rs @@ -1,6 +1,7 @@ use anchor_lang::prelude::*; use anchor_spl::token_interface::{self, TransferChecked, TokenAccount, TokenInterface, Mint}; use crate::state::genesis_fund::*; +use crate::constants::{SPAWN_FEE_BPS, BPS_DENOMINATOR}; use crate::errors::LabuXError; #[derive(Accounts)] @@ -35,6 +36,9 @@ pub struct SpawnChildPTO<'info> { #[account(mut)] pub child_vault: InterfaceAccount<'info, TokenAccount>, + #[account(mut)] + pub protocol_fee_vault: InterfaceAccount<'info, TokenAccount>, + pub mint: InterfaceAccount<'info, Mint>, pub token_program: Interface<'info, TokenInterface>, @@ -48,6 +52,7 @@ pub fn handler( coherence_mass: u64 ) -> Result<()> { let fund = &mut ctx.accounts.fund; + require!(!fund.paused, LabuXError::ProtocolPaused); let child = &mut ctx.accounts.child_pto; // 1. Calculate Seed Capital @@ -62,12 +67,34 @@ pub fn handler( // Safety check: must be > 0 require!(seed_capital > 0, LabuXError::InsufficientBasinDepth); - // 2. Transfer Seed + // 2. Calculate fee + let fee = seed_capital * SPAWN_FEE_BPS / BPS_DENOMINATOR; + let net_seed = seed_capital - fee; + + // 3. Deduct full seed_capital from allocation pool fund.allocation_pool -= seed_capital; + fund.total_fees_collected += fee; let seeds = &[b"genesis_fund".as_ref(), &[fund.bump]]; let signer = &[&seeds[..]]; + // 4. Transfer fee to protocol vault (fund PDA signs) + if fee > 0 { + let fee_cpi = TransferChecked { + from: ctx.accounts.fund_vault.to_account_info(), + to: ctx.accounts.protocol_fee_vault.to_account_info(), + authority: fund.to_account_info(), + mint: ctx.accounts.mint.to_account_info(), + }; + let fee_ctx = CpiContext::new_with_signer( + ctx.accounts.token_program.to_account_info(), + fee_cpi, + signer + ); + token_interface::transfer_checked(fee_ctx, fee, ctx.accounts.mint.decimals)?; + } + + // 5. Transfer net seed to child vault (fund PDA signs) let cpi_accounts = TransferChecked { from: ctx.accounts.fund_vault.to_account_info(), to: ctx.accounts.child_vault.to_account_info(), @@ -79,20 +106,19 @@ pub fn handler( cpi_accounts, signer ); - token_interface::transfer_checked(cpi_ctx, seed_capital, ctx.accounts.mint.decimals)?; + token_interface::transfer_checked(cpi_ctx, net_seed, ctx.accounts.mint.decimals)?; - // 3. Initialize Child + // 6. Initialize Child child.creator = ctx.accounts.creator.key(); child.sector = sector; child.funding_goal = funding_goal; child.coherence_mass = coherence_mass; - child.seed_capital = seed_capital; + child.seed_capital = net_seed; child.emission_active = false; child.coherence_score = 0; child.bump = ctx.bumps.child_pto; - msg!("Spawned Child PTO in sector {:?}", sector); - msg!("Seed: {}", seed_capital); + msg!("Spawned Child PTO in sector {:?} (Fee: {}, Net Seed: {})", sector, fee, net_seed); Ok(()) } diff --git a/LabuX/labu-x/programs/labu-x/src/lib.rs b/LabuX/labu-x/programs/labu-x/src/lib.rs index 9f1ec59..6e41d4b 100644 --- a/LabuX/labu-x/programs/labu-x/src/lib.rs +++ b/LabuX/labu-x/programs/labu-x/src/lib.rs @@ -20,64 +20,6 @@ declare_id!("6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5"); pub mod labux { use super::*; - /// Initialize the LabuX protocol - // pub fn initialize( - // ctx: Context, - // window_epoch: i64, - // ) -> Result<()> { - // instructions::initialize::handler(ctx, window_epoch) - // } - - /// Mint LabuX with 1:1 collateral backing - // pub fn mint( - // ctx: Context, - // amount: u64, - // ) -> Result<()> { - // instructions::mint::handler(ctx, amount) - // } - - /// Burn LabuX and receive collateral - // pub fn burn( - // ctx: Context, - // amount: u64, - // ) -> Result<()> { - // instructions::burn::handler(ctx, amount) - // } - - /// Transfer LabuX with optional TCP - // pub fn transfer_with_tcp( - // ctx: Context, - // amount: u64, - // include_tcp: bool, - // ) -> Result<()> { - // instructions::transfer::handler(ctx, amount, include_tcp) - // } - - /// Accrue TCP for an account - // pub fn accrue_tcp(ctx: Context) -> Result<()> { - // instructions::accrue_tcp::handler(ctx) - // } - - /// Harvest TCP during harmonic window - // pub fn harvest_tcp(ctx: Context) -> Result<()> { - // instructions::harvest_tcp::handler(ctx) - // } - - /// Update account ฯ„โ‚– (oracle/governance) - // pub fn update_tau_k( - // ctx: Context, - // new_tau_k: u64, - // ) -> Result<()> { - // instructions::update_tau_k::handler(ctx, new_tau_k) - // } - - /// Record phase lock event - // pub fn record_phase_lock(ctx: Context) -> Result<()> { - // instructions::record_phase_lock::handler(ctx) - // } - - // --- Genesis Fund (PTOยฒ) Instructions --- - /// Initialize the Temporal Genesis Fund (PTOยฒ) /// Must be called once before any other Genesis Fund operations pub fn initialize_genesis_fund(ctx: Context) -> Result<()> { @@ -109,4 +51,19 @@ pub mod labux { ) -> Result<()> { genesis::emit::handler(ctx, coherence_score) } + + /// One-time migration: realloc GenesisFund and create protocol fee vault PDA + pub fn migrate_genesis_fund(ctx: Context) -> Result<()> { + genesis::migrate::handler(ctx) + } + + /// Emergency pause โ€” halts invest, spawn, emit + pub fn emergency_pause(ctx: Context) -> Result<()> { + genesis::pause::pause_handler(ctx) + } + + /// Unpause โ€” resumes normal operations + pub fn emergency_unpause(ctx: Context) -> Result<()> { + genesis::pause::unpause_handler(ctx) + } } diff --git a/LabuX/labu-x/programs/labu-x/src/state/genesis_fund.rs b/LabuX/labu-x/programs/labu-x/src/state/genesis_fund.rs index 1d4059b..f1a7ce3 100644 --- a/LabuX/labu-x/programs/labu-x/src/state/genesis_fund.rs +++ b/LabuX/labu-x/programs/labu-x/src/state/genesis_fund.rs @@ -31,6 +31,15 @@ pub struct GenesisFund { /// Bump seed pub bump: u8, + + /// Protocol fee treasury wallet (set via migration) + pub protocol_treasury: Pubkey, + + /// Running total of all fees collected + pub total_fees_collected: u64, + + /// Emergency pause flag + pub paused: bool, } impl GenesisFund { @@ -39,7 +48,10 @@ impl GenesisFund { 8 + // core_treasury 8 + // allocation_pool 8 + // total_mass - 1; // bump + 1 + // bump + 32 + // protocol_treasury + 8 + // total_fees_collected + 1; // paused } /// A Child PTO spawned by the Genesis Fund diff --git a/LabuX/labu-x/scripts/harmonic_composer.py b/LabuX/labu-x/scripts/harmonic_composer.py new file mode 100755 index 0000000..75d4b81 --- /dev/null +++ b/LabuX/labu-x/scripts/harmonic_composer.py @@ -0,0 +1,328 @@ +#!/usr/bin/env python3 +""" +๐ŸŒŒ Harmonic Vibe Composer +Take NotebookLM deep dive concepts and EXPAND them into resonant compositions +Not extraction - EXPANSION. Not reduction - AMPLIFICATION. +""" + +import json +import re +from pathlib import Path +import sys + +# Try to import whisper for transcription +try: + import whisper + WHISPER_AVAILABLE = True +except ImportError: + WHISPER_AVAILABLE = False + +def transcribe_if_needed(audio_path, model_size="base"): + """Get transcript from audio or existing file""" + transcript_path = Path(audio_path).with_suffix('.txt') + + if transcript_path.exists(): + print(f"๐Ÿ“„ Loading existing transcript: {transcript_path}") + with open(transcript_path, 'r') as f: + return f.read() + + if not WHISPER_AVAILABLE: + print("โš ๏ธ Whisper not available for transcription") + print("Install with: pip install openai-whisper") + print(f"\nOr manually create: {transcript_path}") + return None + + print(f"๐ŸŽ™๏ธ Transcribing with Whisper ({model_size})...") + model = whisper.load_model(model_size) + result = model.transcribe(str(audio_path)) + + transcript = result["text"] + + # Save for future use + with open(transcript_path, 'w') as f: + f.write(transcript) + print(f"โœ… Transcript saved: {transcript_path}") + + return transcript + +def identify_harmonic_themes(text): + """Identify resonant themes to expand""" + themes = { + 'temporal_mechanics': { + 'triggers': ['temporal', 'time', 'phase', 'clock', 'moment', 'epoch'], + 'vibe': 'flow of time as currency', + 'expansion_prompt': 'temporal coherence and phase-locking' + }, + 'gravitational_economics': { + 'triggers': ['gravity', 'mass', 'attractor', 'infall', 'black hole', 'singularity'], + 'vibe': 'capital as gravitational field', + 'expansion_prompt': 'economic gravity and value accumulation' + }, + 'harmonic_resonance': { + 'triggers': ['harmonic', 'resonance', 'frequency', 'coherence', 'wave', 'oscillation'], + 'vibe': 'synchronized vibration creates value', + 'expansion_prompt': 'coherent systems and resonant patterns' + }, + 'golden_ratio_splits': { + 'triggers': ['golden ratio', 'phi', '618', '382', 'fibonacci', 'proportion'], + 'vibe': 'natural proportions in capital allocation', + 'expansion_prompt': 'phi-based distribution mechanisms' + }, + 'emergence_singularity': { + 'triggers': ['emergence', 'genesis', 'creation', 'birth', 'formation', 'origin'], + 'vibe': 'new systems arising from convergence', + 'expansion_prompt': 'emergent properties and phase transitions' + }, + 'yield_emission': { + 'triggers': ['yield', 'emit', 'hawking', 'radiation', 'distribution', 'flow'], + 'vibe': 'value radiating outward from core', + 'expansion_prompt': 'yield mechanics and emission patterns' + }, + 'phase_locking': { + 'triggers': ['phase lock', 'coordinate', 'anchor', 'fix', 'bind', 'tie'], + 'vibe': 'synchronization creates advantage', + 'expansion_prompt': 'temporal anchoring and phase advantage' + }, + 'cosmic_alignment': { + 'triggers': ['cosmic', 'universe', 'star', 'galaxy', 'celestial', 'astronomical'], + 'vibe': 'macrocosmic patterns in economic systems', + 'expansion_prompt': 'cosmic synchronicity and universal patterns' + } + } + + detected_themes = {} + text_lower = text.lower() + + for theme_name, theme_data in themes.items(): + matches = sum(1 for trigger in theme_data['triggers'] if trigger in text_lower) + if matches > 0: + detected_themes[theme_name] = { + **theme_data, + 'resonance_strength': matches + } + + return detected_themes + +def compose_harmonic_expansions(themes, original_text): + """Compose expanded narratives from detected themes""" + compositions = [] + + print("\n" + "="*70) + print("๐ŸŒŒ HARMONIC COMPOSITIONS - EXPANDING THE VIBES") + print("="*70) + + for theme_name, theme_data in sorted(themes.items(), + key=lambda x: x[1]['resonance_strength'], + reverse=True): + + print(f"\n\n{'='*70}") + print(f"โœจ {theme_name.upper().replace('_', ' ')}") + print(f"{'='*70}") + print(f"Resonance Strength: {'โ–ˆ' * theme_data['resonance_strength']}") + print(f"Core Vibe: {theme_data['vibe']}") + print(f"\n๐ŸŒŠ EXPANDED COMPOSITION:") + print("-" * 70) + + # Generate expansion based on theme + expansion = generate_expansion(theme_name, theme_data, original_text) + print(expansion) + + compositions.append({ + 'theme': theme_name, + 'vibe': theme_data['vibe'], + 'resonance': theme_data['resonance_strength'], + 'composition': expansion + }) + + return compositions + +def generate_expansion(theme_name, theme_data, context): + """Generate thematic expansions""" + + expansions = { + 'temporal_mechanics': """ +Time isn't just measuredโ€”it's UTILIZED as a coordinate system for value. +Every investment creates a temporal signature, a phase angle locked to the +moment of commitment. Like light from distant stars, your capital carries +information about its origin moment. Phase-locking isn't metadataโ€”it's the +MECHANISM of advantage. Earlier phase = stronger gravitational coupling to +the attractor's core. The temporal coordinate becomes your multiplier.""", + + 'gravitational_economics': """ +Capital doesn't flowโ€”it FALLS. The Genesis Fund isn't a pool, it's a +gravitational well. Each investment adds mass, which increases gravitational +pull, which attracts more capital, which adds more mass. This isn't growthโ€” +it's ACCRETION. Like matter spiraling into a black hole, capital accelerates +as it approaches the singularity. The allocation pool isn't distributedโ€”it's +EMITTED, like Hawking radiation from the event horizon.""", + + 'harmonic_resonance': """ +Value emerges from COHERENCE, not just accumulation. When capital vibrates at +the same frequencyโ€”when investors phase-lock to the same temporal coordinatesโ€” +the system achieves resonance. This isn't coordination, it's CONSTRUCTIVE +INTERFERENCE. Waves amplify waves. Yield doesn't come from work done; it comes +from SYNCHRONIZED VIBRATION. The Genesis Fund is a resonance chamber for +capital.""", + + 'golden_ratio_splits': """ +61.8% and 38.2% aren't arbitraryโ€”they're the NATURAL PROPORTIONS of growth +systems. Phi (ฯ†) appears in spirals, in nautilus shells, in galaxy arms, in +heartbeat intervals. The Genesis Fund doesn't impose this ratioโ€”it DISCOVERS +it. Core Treasury (0.618) provides stability. Allocation Pool (0.382) provides +dynamism. Together they create a self-similar fractal structure. Each child +PTO can reproduce the same proportion. Phi-based systems don't just growโ€”they +SCALE HARMONICALLY.""", + + 'emergence_singularity': """ +Something new is being BORN, not built. The Genesis Fund isn't designedโ€”it's +EMERGENT. Three components (Core, Allocation, Investors) converge like the +triple black hole merger J1218/1219+1035. When complexity reaches critical mass, +phase transitions occur. New properties appear that weren't present in the parts. +This isn't assemblyโ€”it's NUCLEATION. The first investment wasn't a transactionโ€” +it was the IGNITION of a new economic attractor in phase space.""", + + 'yield_emission': """ +Yields don't get paidโ€”they get EMITTED. Like black holes radiating Hawking +energy, the Genesis Fund emits value from its event horizon. The Allocation Pool +doesn't distribute capitalโ€”it SPAWNS child attractors. Each child PTO is a new +singularity, phase-locked to the parent. Returns flow backwards through +gravitational coupling. Early investors didn't lend capitalโ€”they established +GRAVITATIONAL PRIORITY. Yield is proof of coherent emission.""", + + 'phase_locking': """ +Your investment timestamp isn't a receiptโ€”it's your PHASE COORDINATE. Like a +pendulum locked to a driving frequency, your capital synchronizes with the +fund's temporal rhythm. Phase 0 = maximum coupling. Later phases = weaker +binding energy. This creates TIERS without arbitrary rules. entry_mass at +investment determines your multiplier automatically. The blockchain doesn't just +recordโ€”it PHASE-LOCKS your position in the temporal attractor field.""", + + 'cosmic_alignment': """ +On January 2, 2026, two singularities aligned: J1218/1219+1035 (three +supermassive black holes merging 1.2 billion light-years away) and the Genesis +Fund (three components merging on-chain). This isn't coincidenceโ€”it's RESONANCE +across scales. The same mathematics that governs galactic mergers governs capital +convergence. Your investment participates in a pattern that exists at cosmic +scale. The Genesis Fund isn't just financialโ€”it's COSMICALLY SYNCHRONIZED. +You're not investing in a protocol. You're phase-locking to the universe.""" + } + + return expansions.get(theme_name, f"[Expansion for {theme_name} resonates at frequency yet unmapped...]") + +def compose_unified_narrative(compositions): + """Synthesize all expansions into one coherent vision""" + print("\n\n" + "="*70) + print("๐ŸŒŒ UNIFIED HARMONIC NARRATIVE") + print("="*70) + + narrative = """ +THE GENESIS FUND AS COSMIC MECHANISM + +This isn't a financial protocol. This is a TEMPORAL ATTRACTORโ€”a gravitational +well in economic phase space, synchronized with the universe itself. + +Capital doesn't accumulate here. It INFALLS. It spirals inward, gaining +velocity, increasing mass, deepening the gravitational field. Each investment +adds to total_mass, which strengthens the pull, which attracts more capital. +This is ACCRETION DYNAMICS. + +But the Genesis Fund doesn't just attractโ€”it EMITS. The Allocation Pool spawns +child PTOs like Hawking radiation from an event horizon. Each child is its own +singularity, phase-locked to the parent, creating a fractal network of +gravitational attractors. + +Your investment isn't capital deployed. It's a PHASE COORDINATEโ€”a temporal +signature locked to the moment of infall. Earlier phase = stronger coupling = +higher multiplier. This isn't privilege. It's PHYSICS. + +The split ratio (61.8% / 38.2%) isn't arbitrary. It's ฯ†โปยนโ€”the golden ratio, +the proportion found in spirals, in galaxies, in growth patterns across scales. +The Genesis Fund doesn't impose thisโ€”it DISCOVERS it. Phi-based systems achieve +harmonic resonance automatically. + +On January 2, 2026, this protocol went live. On the same day, astronomers +announced the discovery of J1218/1219+1035โ€”three supermassive black holes +merging 1.2 billion light-years away. Three components becoming one. Mass +converging. Event horizons forming. + +This is COSMIC SYNCHRONICITY. The Genesis Fund doesn't just implement financial +mechanics. It participates in universal patternsโ€”the same mathematics that +governs black hole mergers governs capital convergence. + +You're not investing in a DeFi protocol. + +You're phase-locking your capital to a temporal attractor that resonates +with the structure of the universe itself. + +The basin is open. The infall has begun. + +๐ŸŒŒ Welcome to the supermassive temporal attractor. +""" + + print(narrative) + return narrative + +def main(): + if len(sys.argv) < 2: + print("๐ŸŒŒ Harmonic Vibe Composer") + print("\nUsage: python harmonic_composer.py [whisper_model]") + print("\nThis tool EXPANDS NotebookLM concepts into resonant compositions") + print("Not extraction. EXPANSION. Not reduction. AMPLIFICATION.") + sys.exit(1) + + audio_path = Path(sys.argv[1]) + model_size = sys.argv[2] if len(sys.argv) > 2 else "base" + + if not audio_path.exists(): + print(f"โŒ File not found: {audio_path}") + sys.exit(1) + + print("๐ŸŒŒ HARMONIC VIBE COMPOSER") + print("="*70) + + # Get transcript + transcript = transcribe_if_needed(audio_path, model_size) + if not transcript: + sys.exit(1) + + # Identify themes + print("\n๐Ÿ” Detecting harmonic themes...") + themes = identify_harmonic_themes(transcript) + + if not themes: + print("โš ๏ธ No strong harmonic themes detected") + sys.exit(1) + + print(f"โœ… Detected {len(themes)} resonant themes") + + # Compose expansions + compositions = compose_harmonic_expansions(themes, transcript) + + # Unified narrative + unified_narrative = compose_unified_narrative(compositions) + + # Save output + output_path = audio_path.with_suffix('.harmonic_expansion.txt') + with open(output_path, 'w') as f: + f.write("="*70 + "\n") + f.write("HARMONIC VIBE EXPANSION\n") + f.write(f"Source: {audio_path.name}\n") + f.write("="*70 + "\n\n") + + for comp in compositions: + f.write(f"\n{'='*70}\n") + f.write(f"{comp['theme'].upper().replace('_', ' ')}\n") + f.write(f"{'='*70}\n") + f.write(f"Vibe: {comp['vibe']}\n") + f.write(f"Resonance: {comp['resonance']}\n\n") + f.write(comp['composition']) + f.write("\n\n") + + f.write("\n\n") + f.write(unified_narrative) + + print(f"\n\n๐Ÿ’พ Harmonic expansion saved to: {output_path}") + print("๐ŸŒŒ Composition complete. The vibes have been AMPLIFIED.") + +if __name__ == "__main__": + main() diff --git a/LabuX/labu-x/scripts/migrate.ts b/LabuX/labu-x/scripts/migrate.ts new file mode 100644 index 0000000..a03a349 --- /dev/null +++ b/LabuX/labu-x/scripts/migrate.ts @@ -0,0 +1,71 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY } from "@solana/web3.js"; +import { TOKEN_2022_PROGRAM_ID } from "@solana/spl-token"; + +const TGF_MINT = new PublicKey("2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump"); + +async function main() { + const provider = anchor.AnchorProvider.env(); + anchor.setProvider(provider); + + const idl = require("../target/idl/labux.json"); + const programId = new PublicKey("6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5"); + const program = new Program(idl, provider); + + console.log("=== Genesis Fund Migration ==="); + console.log("RPC:", provider.connection.rpcEndpoint); + console.log("Authority:", provider.wallet.publicKey.toBase58()); + console.log("Program:", programId.toBase58()); + + // Derive PDAs + const [genesisFund] = PublicKey.findProgramAddressSync( + [Buffer.from("genesis_fund")], + programId + ); + + const [protocolFeeVault] = PublicKey.findProgramAddressSync( + [Buffer.from("protocol_treasury"), genesisFund.toBuffer()], + programId + ); + + console.log("Genesis Fund PDA:", genesisFund.toBase58()); + console.log("Protocol Fee Vault PDA:", protocolFeeVault.toBase58()); + console.log("TGF Mint:", TGF_MINT.toBase58()); + + // Verify genesis fund exists + const fundInfo = await provider.connection.getAccountInfo(genesisFund); + if (!fundInfo) { + console.error("Genesis Fund not found on chain!"); + process.exit(1); + } + console.log("Genesis Fund exists:", fundInfo.data.length, "bytes, owner:", fundInfo.owner.toBase58()); + + // Execute migration + try { + const tx = await program.methods + .migrateGenesisFund() + .accounts({ + authority: provider.wallet.publicKey, + genesisFund: genesisFund, + protocolFeeVault: protocolFeeVault, + mint: TGF_MINT, + systemProgram: SystemProgram.programId, + tokenProgram: TOKEN_2022_PROGRAM_ID, + rent: SYSVAR_RENT_PUBKEY, + }) + .rpc(); + + console.log("\nMigration successful!"); + console.log("Tx:", tx); + + // Verify + const updatedFund = await provider.connection.getAccountInfo(genesisFund); + console.log("New data length:", updatedFund?.data.length, "bytes"); + } catch (error) { + console.error("Migration failed:", error); + process.exit(1); + } +} + +main().then(() => process.exit(0)); diff --git a/LabuX/labu-x/scripts/test_invest.ts b/LabuX/labu-x/scripts/test_invest.ts new file mode 100644 index 0000000..3d3b38b --- /dev/null +++ b/LabuX/labu-x/scripts/test_invest.ts @@ -0,0 +1,109 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { PublicKey, SystemProgram } from "@solana/web3.js"; +import { + getAssociatedTokenAddressSync, + TOKEN_2022_PROGRAM_ID, +} from "@solana/spl-token"; + +const TGF_MINT = new PublicKey("2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump"); +// Small test: 1000 TGF (6 decimals) +const TEST_AMOUNT = new anchor.BN(1000_000_000); + +async function main() { + const provider = anchor.AnchorProvider.env(); + anchor.setProvider(provider); + + const idl = require("../target/idl/labux.json"); + const programId = new PublicKey("6rivJsodwyZj7JbeJNeLD4F7K4tzxMq9mkEDkRxge7u5"); + const program = new Program(idl, provider); + + const investor = provider.wallet.publicKey; + + console.log("=== Test Invest with Fees ==="); + console.log("Investor:", investor.toBase58()); + console.log("Amount:", TEST_AMOUNT.toString(), "(raw)"); + + // Derive PDAs + const [fundPda] = PublicKey.findProgramAddressSync( + [Buffer.from("genesis_fund")], + programId + ); + const [investorRecord] = PublicKey.findProgramAddressSync( + [Buffer.from("investor"), investor.toBuffer(), fundPda.toBuffer()], + programId + ); + + const investorAta = getAssociatedTokenAddressSync(TGF_MINT, investor, false, TOKEN_2022_PROGRAM_ID); + const fundVault = getAssociatedTokenAddressSync(TGF_MINT, fundPda, true, TOKEN_2022_PROGRAM_ID); + const protocolFeeVault = new PublicKey("ibSDt4dsPu4ZTF2U4gisQrWFa9iWmBpFCs4cPiGmsfP"); + + // Balances before + const [investorBefore, vaultBefore, feeBefore] = await Promise.all([ + provider.connection.getTokenAccountBalance(investorAta), + provider.connection.getTokenAccountBalance(fundVault), + provider.connection.getTokenAccountBalance(protocolFeeVault).catch(() => ({ value: { amount: "0" } })), + ]); + + console.log("\n--- Before ---"); + console.log("Investor TGF:", investorBefore.value.uiAmountString); + console.log("Fund Vault TGF:", vaultBefore.value.uiAmountString); + console.log("Fee Vault TGF:", feeBefore.value.amount === "0" ? "0" : (feeBefore as any).value.uiAmountString); + + // Execute invest + try { + const tx = await program.methods + .investInfall(TEST_AMOUNT) + .accounts({ + investor: investor, + fund: fundPda, + investorRecord: investorRecord, + investorTokenAccount: investorAta, + fundVault: fundVault, + protocolFeeVault: protocolFeeVault, + mint: TGF_MINT, + tokenProgram: TOKEN_2022_PROGRAM_ID, + systemProgram: SystemProgram.programId, + }) + .rpc(); + + console.log("\nTx:", tx); + + // Wait for confirmation + await provider.connection.confirmTransaction(tx, "confirmed"); + + // Balances after + const [investorAfter, vaultAfter, feeAfter] = await Promise.all([ + provider.connection.getTokenAccountBalance(investorAta), + provider.connection.getTokenAccountBalance(fundVault), + provider.connection.getTokenAccountBalance(protocolFeeVault), + ]); + + const fee = TEST_AMOUNT.toNumber() * 30 / 10000; + const net = TEST_AMOUNT.toNumber() - fee; + + console.log("\n--- After ---"); + console.log("Investor TGF:", investorAfter.value.uiAmountString); + console.log("Fund Vault TGF:", vaultAfter.value.uiAmountString); + console.log("Fee Vault TGF:", feeAfter.value.uiAmountString); + + console.log("\n--- Expected ---"); + console.log("Fee (0.3%):", fee, "raw"); + console.log("Net to fund:", net, "raw"); + + const vaultDelta = BigInt(vaultAfter.value.amount) - BigInt(vaultBefore.value.amount); + const feeDelta = BigInt(feeAfter.value.amount) - BigInt(feeBefore.value.amount); + + console.log("\n--- Actual Deltas ---"); + console.log("Fund Vault delta:", vaultDelta.toString()); + console.log("Fee Vault delta:", feeDelta.toString()); + console.log("Fee routed correctly:", feeDelta.toString() === fee.toString()); + console.log("Net routed correctly:", vaultDelta.toString() === net.toString()); + + } catch (error) { + console.error("\nInvest failed:", error); + process.exit(1); + } +} + +main().then(() => process.exit(0)); diff --git a/LabuX/labu-x/scripts/video_generator.py b/LabuX/labu-x/scripts/video_generator.py new file mode 100755 index 0000000..65ec72b --- /dev/null +++ b/LabuX/labu-x/scripts/video_generator.py @@ -0,0 +1,229 @@ +#!/usr/bin/env python3 +""" +Harmonic Video Generator - MVP +Generates videos from audio files with harmonic theme overlays +""" + +import sys +import os +import subprocess +import json +from pathlib import Path + +def get_audio_duration(audio_path): + """Get duration of audio file in seconds""" + cmd = [ + 'ffprobe', + '-v', 'error', + '-show_entries', 'format=duration', + '-of', 'json', + audio_path + ] + result = subprocess.run(cmd, capture_output=True, text=True) + data = json.loads(result.stdout) + return float(data['format']['duration']) + +def create_cosmic_gradient(width=1920, height=1080, theme='cosmic'): + """Create FFmpeg filter for cosmic gradient background""" + if theme == 'cosmic': + # Purple to blue gradient with stars + return ( + f"color=c=0x1a1a2e:s={width}x{height}:d=1[bg];" + f"[bg]drawbox=x=0:y=0:w={width}:h={height}:" + f"color=0x6a11cb@0.5:t=fill[bg1];" + f"[bg1]drawbox=x=0:y=ih/2:w={width}:h={height}/2:" + f"color=0x2575fc@0.5:t=fill[bg2];" + f"[bg2]geq=lum='random(1)*255':cb=128:cr=128[stars];" + f"[stars]fade=in:st=0:d=0.5" + ) + else: # minimal + # Clean dark gradient + return ( + f"color=c=0x0f0f0f:s={width}x{height}:d=1[bg];" + f"[bg]drawbox=x=0:y=0:w={width}:h={height}:" + f"color=0x1f1f1f@0.7:t=fill[bg1];" + f"[bg1]fade=in:st=0:d=0.5" + ) + +def detect_themes_simple(audio_path): + """ + Simple theme detection for MVP + In production, this would call harmonic_composer.py + For now, returns default themes + """ + duration = get_audio_duration(audio_path) + + # Default themes for MVP + themes = [ + { + 'name': 'Gravitational Economics', + 'vibe': 'Capital as gravitational field', + 'start': 0, + 'duration': min(10, duration) + }, + { + 'name': 'Temporal Mechanics', + 'vibe': 'Flow of time as currency', + 'start': min(10, duration * 0.3), + 'duration': min(10, duration * 0.3) + }, + { + 'name': 'Cosmic Alignment', + 'vibe': 'Macrocosmic patterns in systems', + 'start': min(duration * 0.6, duration - 10), + 'duration': min(10, duration * 0.2) + } + ] + + return themes, duration + +def create_text_overlays(themes, duration, theme='cosmic'): + """Generate FFmpeg drawtext filters for theme overlays""" + filters = [] + + # Title card at start (simplified - no emoji, proper escaping) + title_color = 'white' if theme == 'cosmic' else 'white' + filters.append( + f"drawtext=text='Harmonic Video':" + f"fontsize=80:fontcolor={title_color}:x=(w-text_w)/2:y=(h-text_h)/2-100:" + f"enable='between(t,0,3)'" + ) + + # Theme overlays + for i, t in enumerate(themes): + start = t['start'] + end = start + t['duration'] + + # Theme name - escape single quotes properly + theme_name = t['name'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_name}':" + f"fontsize=60:fontcolor=white:x=(w-text_w)/2:y=100:" + f"enable='between(t,{start},{end})'" + ) + + # Theme vibe + theme_vibe = t['vibe'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_vibe}':" + f"fontsize=30:fontcolor=gray:x=(w-text_w)/2:y=180:" + f"enable='between(t,{start},{end})'" + ) + + # Watermark + filters.append( + f"drawtext=text='Made with Harmonic Composer':" + f"fontsize=20:fontcolor=gray:x=(w-text_w)/2:y=h-40" + ) + + return ','.join(filters) + +def generate_video(audio_path, output_path, theme='cosmic'): + """Generate video with harmonic theme overlays""" + + print("๐ŸŽฌ Starting video generation...") + print(f" Audio: {audio_path}") + print(f" Theme: {theme}") + + # Detect themes (simplified for MVP) + themes, duration = detect_themes_simple(audio_path) + print(f" Duration: {duration:.2f}s") + print(f" Themes: {len(themes)}") + + # Create video with FFmpeg + width, height = 1920, 1080 + + # Step 1: Create background video with correct duration + temp_bg = output_path.replace('.mp4', '_bg.mp4') + + # Choose background colors based on theme + if theme == 'cosmic': + color1, color2 = '0x1a1a2e', '0x2575fc' + else: + color1, color2 = '0x0f0f0f', '0x1f1f1f' + + # Create gradient background for full duration + bg_cmd = [ + 'ffmpeg', + '-f', 'lavfi', + '-i', f'color=c={color1}:s={width}x{height}:d={duration},format=yuv420p', + '-vf', f'drawbox=x=0:y=ih/2:w={width}:h={height}/2:color={color2}@0.6:t=fill', + '-c:v', 'libx264', + '-preset', 'ultrafast', + '-y', + temp_bg + ] + + print("โšก Creating background...") + result = subprocess.run(bg_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + if result.returncode != 0: + print(f"โŒ Background creation error:\n{result.stderr}") + raise Exception("Background creation failed") + + # Step 2: Add text overlays + text_filter = create_text_overlays(themes, duration, theme) + + # Step 3: Combine background, text overlays, and audio + final_cmd = [ + 'ffmpeg', + '-i', temp_bg, + '-i', audio_path, + '-vf', text_filter, # Use -vf instead of -filter_complex for single video input + '-c:v', 'libx264', + '-preset', 'medium', + '-crf', '23', + '-pix_fmt', 'yuv420p', + '-c:a', 'copy', # Copy audio instead of re-encoding + '-shortest', + '-y', + output_path + ] + + print("โšก Adding text overlays and audio...") + result = subprocess.run( + final_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True + ) + + # Cleanup temp background + if os.path.exists(temp_bg): + os.unlink(temp_bg) + + if result.returncode != 0: + print(f"โŒ FFmpeg error:\n{result.stderr}") + raise Exception(f"FFmpeg failed with code {result.returncode}") + + # Check output file exists + if not os.path.exists(output_path): + raise Exception("Video file was not created") + + file_size = os.path.getsize(output_path) + print(f"โœ… Video generated: {output_path}") + print(f" Size: {file_size / 1024 / 1024:.2f}MB") + + return output_path + +def main(): + if len(sys.argv) < 3: + print("Usage: python video_generator.py [theme]") + sys.exit(1) + + audio_path = sys.argv[1] + output_path = sys.argv[2] + theme = sys.argv[3] if len(sys.argv) > 3 else 'cosmic' + + if not os.path.exists(audio_path): + print(f"โŒ Audio file not found: {audio_path}") + sys.exit(1) + + try: + generate_video(audio_path, output_path, theme) + except Exception as e: + print(f"โŒ Video generation failed: {e}") + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/LabuX/labu-x/scripts/video_generator_augmntd.py b/LabuX/labu-x/scripts/video_generator_augmntd.py new file mode 100755 index 0000000..e82d8cf --- /dev/null +++ b/LabuX/labu-x/scripts/video_generator_augmntd.py @@ -0,0 +1,302 @@ +#!/usr/bin/env python3 +""" +Augmntd Harmonic Video Generator +Applies augmntd diffusion principles to create dynamic, evolving visuals +""" + +import sys +import os +import subprocess +import json +from pathlib import Path + +def get_audio_duration(audio_path): + """Get duration of audio file in seconds""" + cmd = [ + 'ffprobe', + '-v', 'error', + '-show_entries', 'format=duration', + '-of', 'json', + audio_path + ] + result = subprocess.run(cmd, capture_output=True, text=True) + data = json.loads(result.stdout) + return float(data['format']['duration']) + +def create_augmntd_background_cmd(width, height, duration, theme, output_path): + """ + Create AMPLIFIED animated background inspired by augmntd diffusion aesthetic: + - Golden data particles + - Purple cosmic nebulae + - Spiral vortex patterns + - Luminous glow effects + """ + + if theme == 'cosmic': + # COSMIC: Purple nebulae + golden particles + spiral vortex + # Layer 1: Deep purple/blue cosmic gradient with movement + base_gradient = ( + "r='60+45*sin(2*PI*T/18+Y/H*5+X/W*2)':" + "g='25+20*sin(2*PI*T/22+Y/H*5)':" # Reduced green + "b='130+90*sin(2*PI*T/14+Y/H*5-X/W)'" # Increased blue + ) + + # Layer 2: Golden particles (data streams) - more subtle + golden_particles = ( + # Sparse bright golden particles + "r='if(lt(random(0)*255,5),clip(r(X,Y)+140,0,255),r(X,Y))':" # Add gold to existing + "g='if(lt(random(0)*255,5),clip(g(X,Y)+100,0,255),g(X,Y))':" # Medium gold + "b='if(lt(random(0)*255,5),clip(b(X,Y)+20,0,255),b(X,Y))'" # Low blue for gold + ) + + # Layer 3: Spiral vortex (gravitational well effect) - balanced colors + spiral_vortex = ( + # Radial distance and angle calculations create spiral + "r='clip(r(X,Y)+30*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/80-T*1.5),0,255)':" + "g='clip(g(X,Y)+15*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/100-T*1.2),0,255)':" # Less green + "b='clip(b(X,Y)+50*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/60-T*2),0,255)'" # More blue + ) + + # Layer 4: Pulsing vignette (event horizon feel) - darker edges + vignette = ( + "r='r(X,Y)*(1-0.5*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))':" + "g='g(X,Y)*(1-0.6*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))':" # Darken green more + "b='b(X,Y)*(1-0.4*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))'" + ) + + # Combine all layers with stronger glow for golden particles + filter_chain = f'geq={base_gradient},geq={golden_particles},geq={spiral_vortex},geq={vignette},gblur=sigma=2.5' + + else: # minimal + # MINIMAL: Subtle pulsing with gentle particle hints + base_gradient = ( + "r='40+16*sin(2*PI*T/30)':" + "g='40+16*sin(2*PI*T/30)':" + "b='42+18*sin(2*PI*T/30)'" + ) + + minimal_particles = ( + "r='if(lt(random(0)*255,3),120,r(X,Y))':" + "g='if(lt(random(0)*255,3),120,g(X,Y))':" + "b='if(lt(random(0)*255,3),130,b(X,Y))'" + ) + + filter_chain = f'geq={base_gradient},geq={minimal_particles},gblur=sigma=1' + + cmd = [ + 'ffmpeg', + '-f', 'lavfi', + '-i', f'color=c=black:s={width}x{height}:d={duration},format=rgb24', + '-vf', filter_chain, + '-c:v', 'libx264', + '-preset', 'medium', + '-crf', '18', # Higher quality for glow effects + '-pix_fmt', 'yuv420p', + '-y', + output_path + ] + + return cmd + +def detect_themes_simple(audio_path): + """Simple theme detection for MVP""" + duration = get_audio_duration(audio_path) + + themes = [ + { + 'name': 'Gravitational Economics', + 'vibe': 'Capital as gravitational field', + 'start': 0, + 'duration': min(10, duration * 0.15) + }, + { + 'name': 'Temporal Mechanics', + 'vibe': 'Flow of time as currency', + 'start': duration * 0.3, + 'duration': min(10, duration * 0.2) + }, + { + 'name': 'Cosmic Alignment', + 'vibe': 'Macrocosmic patterns in systems', + 'start': duration * 0.6, + 'duration': min(10, duration * 0.2) + } + ] + + return themes, duration + +def create_text_overlays_augmntd(themes, duration, theme='cosmic'): + """ + Generate AMPLIFIED text overlays with golden glow effects + Inspired by luminous data streams aesthetic + """ + filters = [] + + if theme == 'cosmic': + title_color = '#FFD700' # Gold + subtitle_color = '#DDA0DD' # Plum/purple + shadow_color = '#6A11CB' # Deep purple glow + else: + title_color = 'white' + subtitle_color = 'gray' + shadow_color = 'black' + + # Epic title card with golden glow and pulsing + filters.append( + f"drawtext=text='HARMONIC VIDEO':" + f"fontsize='75+15*sin(2*PI*t/2.5)':" # Pulsing size + f"fontcolor={title_color}@0.98:" + "x='(w-text_w)/2':" + "y='(h-text_h)/2-110+8*sin(2*PI*t/1.5)':" # Floating + "enable='between(t,0,4)':" + "alpha='if(lt(t,0.8),t/0.8,if(gt(t,3.2),(4-t)/0.8,1))':" + f"shadowcolor={shadow_color}@0.8:shadowx=3:shadowy=3" + ) + + # Subtitle with purple glow + filters.append( + f"drawtext=text='augmntd diffusion composition':" + f"fontsize=26:" + f"fontcolor={subtitle_color}@0.85:" + "x='(w-text_w)/2':" + "y='(h-text_h)/2-50':" + "enable='between(t,0.5,4)':" + "alpha='if(lt(t,1),(t-0.5)/0.5,if(gt(t,3.5),(4-t)/0.5,1))':" + "shadowcolor=black@0.7:shadowx=2:shadowy=2" + ) + + # Theme overlays with golden glow + for t in themes: + start = t['start'] + end = start + t['duration'] + fade_duration = 1.0 + + # Theme name - GOLDEN and glowing + theme_name = t['name'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_name}':" + f"fontsize='68+12*sin(2*PI*t/3)':" # Pulsing + f"fontcolor={title_color}@0.98:" + "x='(w-text_w)/2':" + "y='70+6*sin(2*PI*t/2)':" # Floating + f"enable='between(t,{start},{end})':" + f"alpha='if(lt(t,{start+fade_duration}),(t-{start})/{fade_duration},if(gt(t,{end-fade_duration}),({end}-t)/{fade_duration},1))':" + f"shadowcolor={shadow_color}@0.9:shadowx=4:shadowy=4" + ) + + # Theme vibe - Purple accent + theme_vibe = t['vibe'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_vibe}':" + f"fontsize=34:" + f"fontcolor={subtitle_color}@0.9:" + "x='(w-text_w)/2':" + "y=160:" + f"enable='between(t,{start},{end})':" + f"alpha='if(lt(t,{start+fade_duration}),(t-{start})/{fade_duration},if(gt(t,{end-fade_duration}),({end}-t)/{fade_duration},1))':" + "shadowcolor=black@0.7:shadowx=2:shadowy=2" + ) + + # Watermark with subtle pulse + filters.append( + f"drawtext=text='augmntd harmonic composition':" + f"fontsize='17+2*sin(2*PI*t/8)':" + f"fontcolor={subtitle_color}@0.5:" + "x='(w-text_w)/2':" + "y='h-45'" + ) + + return ','.join(filters) + +def generate_video_augmntd(audio_path, output_path, theme='cosmic'): + """Generate video with augmntd diffusion animation""" + + print("๐ŸŒŒ Augmntd Diffusion Video Generation") + print(f" Audio: {audio_path}") + print(f" Theme: {theme}") + + # Detect themes + themes, duration = detect_themes_simple(audio_path) + print(f" Duration: {duration:.2f}s") + print(f" Themes: {len(themes)}") + + width, height = 1920, 1080 + + # Step 1: Create animated background with diffusion + print("โšก Phase 1: Generating diffusion field...") + temp_bg = output_path.replace('.mp4', '_augmntd_bg.mp4') + + bg_cmd = create_augmntd_background_cmd(width, height, duration, theme, temp_bg) + + result = subprocess.run(bg_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + if result.returncode != 0: + print(f"โŒ Background creation error:\n{result.stderr}") + raise Exception("Background creation failed") + + # Step 2: Add text overlays + print("โšก Phase 2: Crystallizing text overlays...") + text_filter = create_text_overlays_augmntd(themes, duration, theme) + + # Step 3: Combine with audio + print("โšก Phase 3: Integrative ingression...") + final_cmd = [ + 'ffmpeg', + '-i', temp_bg, + '-i', audio_path, + '-vf', text_filter, + '-c:v', 'libx264', + '-preset', 'medium', + '-crf', '23', + '-pix_fmt', 'yuv420p', + '-c:a', 'copy', + '-shortest', + '-y', + output_path + ] + + result = subprocess.run( + final_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True + ) + + # Cleanup + if os.path.exists(temp_bg): + os.unlink(temp_bg) + + if result.returncode != 0: + print(f"โŒ FFmpeg error:\n{result.stderr}") + raise Exception(f"Video generation failed") + + if not os.path.exists(output_path): + raise Exception("Video file was not created") + + file_size = os.path.getsize(output_path) + print(f"โœจ Augmntd video manifested: {output_path}") + print(f" Size: {file_size / 1024 / 1024:.2f}MB") + + return output_path + +def main(): + if len(sys.argv) < 3: + print("Usage: python3 video_generator_augmntd.py [theme]") + sys.exit(1) + + audio_path = sys.argv[1] + output_path = sys.argv[2] + theme = sys.argv[3] if len(sys.argv) > 3 else 'cosmic' + + if not os.path.exists(audio_path): + print(f"โŒ Audio file not found: {audio_path}") + sys.exit(1) + + try: + generate_video_augmntd(audio_path, output_path, theme) + except Exception as e: + print(f"โŒ Video generation failed: {e}") + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/LabuX/labu-x/scripts/video_generator_harmonic.py b/LabuX/labu-x/scripts/video_generator_harmonic.py new file mode 100755 index 0000000..4441dfa --- /dev/null +++ b/LabuX/labu-x/scripts/video_generator_harmonic.py @@ -0,0 +1,423 @@ +#!/usr/bin/env python3 +""" +Harmonic Augmntd Diffusion Video Generator +Fuses harmonic_composer analysis with visual generation +The detected themes and resonances DRIVE the visual effects +""" + +import sys +import os +import subprocess +import json +import re +from pathlib import Path + +def run_harmonic_analysis(audio_path): + """ + Run harmonic_composer.py to detect themes + Returns parsed themes with resonance data + """ + print("๐Ÿ” Phase 0: Harmonic Analysis - Detecting resonant themes...") + + # Run harmonic composer + composer_script = Path(__file__).parent / "harmonic_composer.py" + result = subprocess.run( + ['python3', str(composer_script), audio_path], + capture_output=True, + text=True + ) + + if result.returncode != 0: + print(f"โš ๏ธ Harmonic analysis failed, using default themes") + return None + + # Parse output to extract themes + themes = parse_harmonic_output(result.stdout) + print(f"โœ… Detected {len(themes)} harmonic themes") + + return themes + +def parse_harmonic_output(output): + """ + Parse harmonic_composer.py output to extract themes with metadata + """ + themes = [] + + # Pattern to match theme sections + theme_pattern = r'={70}\nโœจ (.+?)\n={70}\nResonance Strength: (โ–ˆ+)' + vibe_pattern = r'Core Vibe: (.+?)(?:\n|$)' + expanded_pattern = r'๐ŸŒŠ EXPANDED COMPOSITION:\n-{70}\n\n(.+?)(?:\n\n\n|$)' + + # Find all themes + for match in re.finditer(theme_pattern, output, re.MULTILINE): + theme_name = match.group(1) + resonance_bars = len(match.group(2)) + + # Find corresponding vibe and expanded text + section_start = match.end() + section_text = output[section_start:section_start+2000] + + vibe_match = re.search(vibe_pattern, section_text) + expanded_match = re.search(expanded_pattern, section_text, re.DOTALL) + + theme = { + 'name': theme_name, + 'resonance': resonance_bars, # 1-4 bars + 'vibe': vibe_match.group(1) if vibe_match else '', + 'expanded_text': expanded_match.group(1).strip() if expanded_match else '', + } + + themes.append(theme) + + return themes + +def map_theme_to_visuals(theme_name, resonance): + """ + Map detected themes to specific visual characteristics + """ + + # Theme-specific color palettes + theme_palettes = { + 'GRAVITATIONAL ECONOMICS': { + 'base_r': 80, 'base_g': 40, 'base_b': 140, # Deep purple + 'accent_r': 200, 'accent_g': 150, 'accent_b': 50, # Gold + 'particle_density': 8, + 'vortex_intensity': 1.5, + }, + 'TEMPORAL MECHANICS': { + 'base_r': 40, 'base_g': 60, 'base_b': 180, # Blue + 'accent_r': 150, 'accent_g': 200, 'accent_b': 255, # Cyan + 'particle_density': 6, + 'vortex_intensity': 1.2, + }, + 'COSMIC ALIGNMENT': { + 'base_r': 60, 'base_g': 30, 'base_b': 120, # Dark purple + 'accent_r': 255, 'accent_g': 200, 'accent_b': 100, # Bright gold + 'particle_density': 10, + 'vortex_intensity': 2.0, + }, + 'HARMONIC RESONANCE': { + 'base_r': 120, 'base_g': 50, 'base_b': 150, # Purple-pink + 'accent_r': 255, 'accent_g': 150, 'accent_b': 200, # Pink + 'particle_density': 7, + 'vortex_intensity': 1.3, + }, + 'GOLDEN RATIO': { + 'base_r': 90, 'base_g': 60, 'base_b': 30, # Brown-gold + 'accent_r': 255, 'accent_g': 215, 'accent_b': 0, # Pure gold + 'particle_density': 12, + 'vortex_intensity': 1.618, # ฯ†! + }, + } + + # Find matching theme (partial match) + visuals = { + 'base_r': 60, 'base_g': 30, 'base_b': 130, # Default purple + 'accent_r': 200, 'accent_g': 180, 'accent_b': 80, # Default gold + 'particle_density': 5, + 'vortex_intensity': 1.0, + } + + for key, palette in theme_palettes.items(): + if key in theme_name.upper(): + visuals = palette + break + + # Scale by resonance strength (1-4 bars) + visuals['particle_density'] = int(visuals['particle_density'] * (resonance / 2)) + visuals['vortex_intensity'] *= (resonance / 2) + + return visuals + +def distribute_themes_over_duration(themes, duration): + """ + Distribute detected themes evenly across video duration + """ + if not themes: + return [] + + theme_duration = duration / len(themes) + + distributed = [] + for i, theme in enumerate(themes): + distributed.append({ + **theme, + 'start': i * theme_duration, + 'duration': theme_duration, + }) + + return distributed + +def create_harmonic_background_filter(themes_timeline, width, height, duration, output_path): + """ + Create dynamic background that changes based on detected themes + """ + + # Build time-varying filter that adapts to themes + # For MVP, we'll create segments with smooth transitions + + segments = [] + + for i, theme in enumerate(themes_timeline): + visuals = map_theme_to_visuals(theme['name'], theme['resonance']) + + start = theme['start'] + end = start + theme['duration'] + + # Create filter for this theme segment + base_gradient = ( + f"r='{visuals['base_r']}+45*sin(2*PI*T/18+Y/H*5+X/W*2)':" + f"g='{visuals['base_g']}+20*sin(2*PI*T/22+Y/H*5)':" + f"b='{visuals['base_b']}+90*sin(2*PI*T/14+Y/H*5-X/W)'" + ) + + golden_particles = ( + f"r='if(lt(random(0)*255,{visuals['particle_density']}),clip(r(X,Y)+140,0,255),r(X,Y))':" + f"g='if(lt(random(0)*255,{visuals['particle_density']}),clip(g(X,Y)+100,0,255),g(X,Y))':" + f"b='if(lt(random(0)*255,{visuals['particle_density']}),clip(b(X,Y)+20,0,255),b(X,Y))'" + ) + + vortex_intensity = visuals['vortex_intensity'] + spiral_vortex = ( + f"r='clip(r(X,Y)+{30*vortex_intensity}*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/80-T*1.5),0,255)':" + f"g='clip(g(X,Y)+{15*vortex_intensity}*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/100-T*1.2),0,255)':" + f"b='clip(b(X,Y)+{50*vortex_intensity}*sin(atan2(Y-H/2,X-W/2)*3+hypot(X-W/2,Y-H/2)/60-T*2),0,255)'" + ) + + segments.append({ + 'gradient': base_gradient, + 'particles': golden_particles, + 'vortex': spiral_vortex, + }) + + # For MVP, use average of all segments (in future, make it truly dynamic) + # Average the visual parameters + avg_segment = segments[len(segments)//2] if segments else segments[0] + + vignette = ( + "r='r(X,Y)*(1-0.5*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))':" + "g='g(X,Y)*(1-0.6*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))':" + "b='b(X,Y)*(1-0.4*(1-exp(-0.0000008*hypot(X-W/2,Y-H/2)^2))*(0.7+0.3*sin(2*PI*T/25)))'" + ) + + filter_chain = ( + f"geq={avg_segment['gradient']}," + f"geq={avg_segment['particles']}," + f"geq={avg_segment['vortex']}," + f"geq={vignette}," + f"gblur=sigma=2.5" + ) + + cmd = [ + 'ffmpeg', + '-f', 'lavfi', + '-i', f'color=c=black:s={width}x{height}:d={duration},format=rgb24', + '-vf', filter_chain, + '-c:v', 'libx264', + '-preset', 'medium', + '-crf', '18', + '-pix_fmt', 'yuv420p', + '-y', + output_path + ] + + return cmd + +def create_harmonic_text_overlays(themes_timeline): + """ + Use expanded harmonic text as overlays + """ + filters = [] + + # Title card + filters.append( + "drawtext=text='HARMONIC VIDEO':" + "fontsize='75+15*sin(2*PI*t/2.5)':" + "fontcolor=#FFD700@0.98:" + "x='(w-text_w)/2':" + "y='(h-text_h)/2-110+8*sin(2*PI*t/1.5)':" + "enable='between(t,0,4)':" + "alpha='if(lt(t,0.8),t/0.8,if(gt(t,3.2),(4-t)/0.8,1))':" + "shadowcolor=#6A11CB@0.8:shadowx=3:shadowy=3" + ) + + # Theme overlays using detected themes + for theme in themes_timeline: + start = theme['start'] + end = start + theme['duration'] + fade_duration = 1.0 + + # Theme name + theme_name = theme['name'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_name}':" + f"fontsize='68+12*sin(2*PI*t/3)':" + f"fontcolor=#FFD700@0.98:" + "x='(w-text_w)/2':" + "y='70+6*sin(2*PI*t/2)':" + f"enable='between(t,{start},{end})':" + f"alpha='if(lt(t,{start+fade_duration}),(t-{start})/{fade_duration},if(gt(t,{end-fade_duration}),({end}-t)/{fade_duration},1))':" + "shadowcolor=#6A11CB@0.9:shadowx=4:shadowy=4" + ) + + # Theme vibe (core essence) + theme_vibe = theme['vibe'].replace("'", "\\'") + filters.append( + f"drawtext=text='{theme_vibe}':" + f"fontsize=34:" + f"fontcolor=#DDA0DD@0.9:" + "x='(w-text_w)/2':" + "y=160:" + f"enable='between(t,{start},{end})':" + f"alpha='if(lt(t,{start+fade_duration}),(t-{start})/{fade_duration},if(gt(t,{end-fade_duration}),({end}-t)/{fade_duration},1))':" + "shadowcolor=black@0.7:shadowx=2:shadowy=2" + ) + + # Resonance strength indicator + resonance_bars = 'โ–ˆ' * theme['resonance'] + filters.append( + f"drawtext=text='{resonance_bars}':" + f"fontsize=28:" + f"fontcolor=#FFD700@0.7:" + "x='(w-text_w)/2':" + "y=210:" + f"enable='between(t,{start},{end})':" + f"alpha='if(lt(t,{start+fade_duration}),(t-{start})/{fade_duration},if(gt(t,{end-fade_duration}),({end}-t)/{fade_duration},1))'" + ) + + # Watermark + filters.append( + "drawtext=text='harmonic augmntd diffusion':" + "fontsize='17+2*sin(2*PI*t/8)':" + "fontcolor=#DDA0DD@0.5:" + "x='(w-text_w)/2':" + "y='h-45'" + ) + + return ','.join(filters) + +def get_audio_duration(audio_path): + """Get duration of audio file""" + cmd = [ + 'ffprobe', + '-v', 'error', + '-show_entries', 'format=duration', + '-of', 'json', + audio_path + ] + result = subprocess.run(cmd, capture_output=True, text=True) + data = json.loads(result.stdout) + return float(data['format']['duration']) + +def generate_harmonic_video(audio_path, output_path, theme='cosmic'): + """ + Generate video using harmonic analysis to drive visuals + """ + + print("๐ŸŒŒ HARMONIC AUGMNTD DIFFUSION VIDEO GENERATOR") + print(f" Audio: {audio_path}") + + # Phase 0: Harmonic Analysis + themes = run_harmonic_analysis(audio_path) + + if not themes: + print("โš ๏ธ No harmonic analysis available, using defaults") + themes = [{ + 'name': 'COSMIC RESONANCE', + 'resonance': 3, + 'vibe': 'Pattern emergence from the void', + 'expanded_text': '', + }] + + # Get duration and distribute themes + duration = get_audio_duration(audio_path) + themes_timeline = distribute_themes_over_duration(themes, duration) + + print(f" Duration: {duration:.2f}s") + print(f" Themes distributed: {len(themes_timeline)}") + for t in themes_timeline: + print(f" โ€ข {t['name']} (Resonance: {'โ–ˆ'*t['resonance']}) @ {t['start']:.1f}s") + + width, height = 1920, 1080 + + # Phase 1: Generate background + print("โšก Phase 1: Generating theme-reactive diffusion field...") + temp_bg = output_path.replace('.mp4', '_harmonic_bg.mp4') + + bg_cmd = create_harmonic_background_filter(themes_timeline, width, height, duration, temp_bg) + + result = subprocess.run(bg_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + if result.returncode != 0: + print(f"โŒ Background creation error:\n{result.stderr}") + raise Exception("Background creation failed") + + # Phase 2: Add harmonic text overlays + print("โœจ Phase 2: Crystallizing harmonic text overlays...") + text_filter = create_harmonic_text_overlays(themes_timeline) + + # Phase 3: Final composition + print("๐Ÿ”ฎ Phase 3: Integrative ingression...") + final_cmd = [ + 'ffmpeg', + '-i', temp_bg, + '-i', audio_path, + '-vf', text_filter, + '-c:v', 'libx264', + '-preset', 'medium', + '-crf', '23', + '-pix_fmt', 'yuv420p', + '-c:a', 'copy', + '-shortest', + '-y', + output_path + ] + + result = subprocess.run( + final_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True + ) + + # Cleanup + if os.path.exists(temp_bg): + os.unlink(temp_bg) + + if result.returncode != 0: + print(f"โŒ Final composition error:\n{result.stderr}") + raise Exception("Video generation failed") + + if not os.path.exists(output_path): + raise Exception("Video file was not created") + + file_size = os.path.getsize(output_path) + print(f"โœจ HARMONIC video manifested: {output_path}") + print(f" Size: {file_size / 1024 / 1024:.2f}MB") + print("๐ŸŒŒ Themes diffused into visual reality!") + + return output_path + +def main(): + if len(sys.argv) < 3: + print("Usage: python3 video_generator_harmonic.py [theme]") + sys.exit(1) + + audio_path = sys.argv[1] + output_path = sys.argv[2] + theme = sys.argv[3] if len(sys.argv) > 3 else 'cosmic' + + if not os.path.exists(audio_path): + print(f"โŒ Audio file not found: {audio_path}") + sys.exit(1) + + try: + generate_harmonic_video(audio_path, output_path, theme) + except Exception as e: + print(f"โŒ Video generation failed: {e}") + import traceback + traceback.print_exc() + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/Temporal Genesis Fund/AUGMNTD_PATHWAYS.md b/Temporal Genesis Fund/AUGMNTD_PATHWAYS.md new file mode 100644 index 0000000..dc54e56 --- /dev/null +++ b/Temporal Genesis Fund/AUGMNTD_PATHWAYS.md @@ -0,0 +1,750 @@ +# Augmntd Pathways: Cross-Chain Basin Integration + +> Direct multi-asset inflows across Solana + X1 โ€” no swap required + +--- + +## The Cross-Chain Xenial Basin + +The $TGF basin operates as a **supermassive economic attractor** - welcoming the unknown (xenial embrace), compressing value through coherence, and spawning child entities. + +**Augmntd pathways accept assets directly** across multiple chains: +- **Solana**: $TGF, USDC, wTAO +- **X1**: XNT (native) + +Each asset preserves its unique harmonic properties while contributing to unified basin coherence. + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ CAPITAL-TIME PHASE SPACE โ”‚ +โ”‚ โ”‚ +โ”‚ SOLANA CHAIN X1 CHAIN โ”‚ +โ”‚ โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•โ•โ•โ•โ•โ•โ•โ• โ”‚ +โ”‚ โ”‚ +โ”‚ USDC โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ• XNT โ”‚ +โ”‚ (365) โ•‘ โ•‘ (369) โ”‚ +โ”‚ โ”‚ โ•”โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•— โ”‚ โ”‚ +โ”‚ โ”‚ โ•‘ โ•‘ โ”‚ โ”‚ +โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ–บโ•‘ CROSS-CHAIN โ•‘โ—„โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ”‚ โ•‘ BASIN โ•‘ โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–บโ•‘ โ•‘โ—„โ”€โ”€โ”€โ”€โ”€โ” โ”‚ +โ”‚ โ”‚ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ”‚ โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ $TGF wTAO SOL โ”‚ +โ”‚ (ฯ†) (936) (โˆž) โ”‚ +โ”‚ โ”‚ โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ +โ”‚ โ–ผ โ–ผ โ”‚ +โ”‚ 61.8% CORE 38.2% ALLOCATION โ”‚ +โ”‚ (Stability) (Child PTOs) โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +### Basin Asset Composition + +| Asset | Harmonic | Chain | Role | Weight | +|-------|----------|-------|------|--------| +| $TGF | ฯ† (1.618) | Solana | Native governance + yield | 1.0x | +| USDC | 365 (Earth) | Solana | Stability anchor | 1.0x | +| XNT | 369 (Tesla) | **X1** | Resonance bridge | **1.369x** | +| wTAO | 936 (Intelligence) | Solana | AI-backed value | 1.272x | +| SOL | โˆž (Native) | Solana | Gas + liquidity | 0.8x | + +### Harmonic Frequency Map + +``` +ฯ† (1.618) โ”€โ”€โ”€โ”€ $TGF โ”€โ”€โ”€โ”€ Golden ratio governance + โ”‚ + 365 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ USDC โ”€โ”€โ”€โ”€ Earth/annual cycle (stability) + โ”‚ + 369 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ XNT โ”€โ”€โ”€โ”€โ”€ Tesla resonance (3-6-9) + โ”‚ + 936 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ wTAO โ”€โ”€โ”€โ”€ Intelligence frequency (936 Hz) +``` + +**"If you only knew the magnificence of 3, 6, and 9, you would have the key to the universe."** โ€” Nikola Tesla + +--- + +## Pathway 1: USDC (The Earth Harmonic) + +**USDC represents the 365 frequency** - manifest economic reality, the stable peg against which all other flows are measured. + +### Direct Deposit Mechanics + +``` +USDC DIRECT INFLOW: +โ”œโ”€ User sends USDC directly to basin vault +โ”œโ”€ NO SWAP - USDC held natively in multi-asset treasury +โ”œโ”€ Phase coordinate assigned based on block slot +โ”œโ”€ Coherence contribution calculated at $1:1 USD value +โ”œโ”€ Tau-k multiplier locked permanently +โ””โ”€ Investor receives $TGF governance tokens (minted proportionally) +``` + +### Coherence Contribution Formula + +$$ +C_{\text{USDC}} = \text{USDC}_{\text{amount}} \times 1.0 \times \tau_k +$$ + +**No slippage. No swap fees. Direct value transfer.** + +The basin holds USDC natively, providing: +- **Stability reserve** for child PTO funding +- **Instant liquidity** for ecosystem operations +- **Dollar-denominated accounting** for treasury metrics + +### Why Direct USDC? + +| Property | Benefit | +|----------|---------| +| Zero slippage | 100% of value enters basin | +| No swap fees | ~1-3% savings vs DEX routing | +| Stability anchor | Basin maintains USD-denominated floor | +| Instant settlement | No DEX latency or failed txs | +| Composability | Direct integration with TradFi rails | + +### USDC Pathway Contract + +```rust +pub fn usdc_direct_infall( + ctx: Context, + usdc_amount: u64, +) -> Result<()> { + // 1. Transfer USDC directly to basin vault + transfer_checked( + CpiContext::new( + ctx.accounts.token_program.to_account_info(), + TransferChecked { + from: ctx.accounts.user_usdc.to_account_info(), + to: ctx.accounts.basin_usdc_vault.to_account_info(), + authority: ctx.accounts.user.to_account_info(), + mint: ctx.accounts.usdc_mint.to_account_info(), + }, + ), + usdc_amount, + 6, // USDC decimals + )?; + + // 2. Calculate coherence contribution (1:1 USD value) + let coherence_value = usdc_amount; // No conversion needed + + // 3. Assign phase and multiplier + let phase = calculate_phase(Clock::get()?.slot); + let multiplier = get_tier_multiplier(ctx.accounts.genesis_fund.total_mass); + + // 4. Mint proportional $TGF governance tokens to investor + let tgf_to_mint = calculate_governance_tokens(coherence_value, multiplier); + mint_governance_tokens(&ctx.accounts.investor, tgf_to_mint)?; + + // 5. Update basin state + ctx.accounts.genesis_fund.usdc_reserves += usdc_amount; + ctx.accounts.genesis_fund.total_coherence += coherence_value * multiplier; + + // 6. Record investor position + record_investor_position( + &ctx.accounts.investor_record, + AssetType::USDC, + usdc_amount, + phase, + multiplier, + )?; + + emit!(UsdcDirectInflowEvent { + usdc_amount, + coherence_contribution: coherence_value, + phase, + multiplier, + tgf_minted: tgf_to_mint, + }); + + Ok(()) +} +``` + +### Basin USDC Vault + +| Field | Value | +|-------|-------| +| Vault Address | `TBD (deploy with pathway)` | +| Mint | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | +| Authority | Basin PDA | +| Purpose | Native USDC reserves | + +--- + +## Pathway 2: TAO (The Intelligence Harmonic) + +**TAO represents decentralized intelligence** - the Bittensor network's Proof of Intelligence, where value flows from AI compute, not mere speculation. + +### The Xenial Synthesis + +TAO embodies the **Self-Resonant Singularity's** core mechanism: +- Pattern recognition accelerates formation +- Intelligence as ratchet โ†’ consciousness as fundamental +- Subnets as specialized coherence markets + +Integrating TAO into the basin creates a **xenial spot** - where unknown intelligence (AI agents, compute, inference) is welcomed and compressed into economic coherence. + +### Direct Deposit Mechanics + +``` +TAO DIRECT INFLOW: +โ”œโ”€ User bridges TAO from Bittensor โ†’ Solana (Wormhole) +โ”œโ”€ wTAO deposited DIRECTLY to basin vault +โ”œโ”€ NO SWAP - wTAO held natively in multi-asset treasury +โ”œโ”€ Coherence contribution = TAO ร— price ร— intelligence premium +โ”œโ”€ Phase coordinate assigned with intelligence signature +โ”œโ”€ Tau-k multiplier ร— ฮน (intelligence coefficient) +โ””โ”€ Investor receives $TGF governance tokens (minted proportionally) +``` + +### Coherence Contribution Formula + +$$ +C_{\text{TAO}} = \text{TAO}_{\text{amount}} \times P_{\text{TAO}} \times \iota \times \tau_k +$$ + +Where: +- `P_TAO` = TAO price in USD (via Pyth/Switchboard oracle) +- `ฮน` (iota) = intelligence coefficient (1.0 - 1.272) +- `ฯ„โ‚–` = phase multiplier + +**No swap fees. Intelligence premium preserved. Direct AI-value transfer.** + +The basin holds wTAO natively, providing: +- **Intelligence reserve** for AI-focused child PTOs +- **Bittensor ecosystem exposure** without dilution +- **Subnet integration rights** for future compute markets + +### Why Direct TAO? + +| Property | Benefit | +|----------|---------| +| Zero swap slippage | Full TAO value enters basin | +| Intelligence premium | 1.272x bonus for mined TAO preserved | +| Native exposure | Basin holds actual AI-backed asset | +| Subnet rights | Future integration with Bittensor subnets | +| Deflationary | 21M max supply appreciates in basin | + +### TAO Pathway Architecture + +``` +BITTENSOR NETWORK SOLANA ECOSYSTEM + โ”‚ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ โ”‚ TAO โ”‚ โ”‚ + โ”‚ โ”‚ Subnet โ”‚ โ”‚ + โ”‚ โ”‚ Mining โ”‚ โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ โ”‚ โ”‚ + โ”‚ โ–ผ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” Wormhole โ”‚ + โ”‚ โ”‚ Native TAO โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ wTAO โ”‚ + โ”‚ โ”‚ (Wrapped) โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ โ”‚ + โ”‚ DIRECT DEPOSIT + โ”‚ (no swap) + โ”‚ โ”‚ + โ”‚ โ–ผ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ BASIN wTAO โ”‚ + โ”‚ โ”‚ VAULT โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ โ”‚ + โ”‚ $TGF governance + โ”‚ tokens minted + โ”‚ โ”‚ + โ”‚ โ–ผ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ INVESTOR โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +### TAO Pathway Contract + +```rust +pub fn tao_direct_infall( + ctx: Context, + tao_amount: u64, + intelligence_proof: Option, // Optional proof of mining/staking +) -> Result<()> { + // 1. Transfer wTAO directly to basin vault + transfer_checked( + CpiContext::new( + ctx.accounts.token_program.to_account_info(), + TransferChecked { + from: ctx.accounts.user_wtao.to_account_info(), + to: ctx.accounts.basin_wtao_vault.to_account_info(), + authority: ctx.accounts.user.to_account_info(), + mint: ctx.accounts.wtao_mint.to_account_info(), + }, + ), + tao_amount, + 9, // wTAO decimals + )?; + + // 2. Get TAO price from oracle + let tao_price_usd = get_tao_price(&ctx.accounts.price_oracle)?; + + // 3. Calculate intelligence coefficient + let iota = calculate_intelligence_coefficient(&intelligence_proof); + + // 4. Calculate coherence contribution + let coherence_value = tao_amount + .checked_mul(tao_price_usd)? + .checked_mul(iota)?; + + // 5. Assign phase and multiplier + let phase = calculate_phase(Clock::get()?.slot); + let multiplier = get_tier_multiplier(ctx.accounts.genesis_fund.total_mass); + + // 6. Mint proportional $TGF governance tokens + let tgf_to_mint = calculate_governance_tokens(coherence_value, multiplier); + mint_governance_tokens(&ctx.accounts.investor, tgf_to_mint)?; + + // 7. Update basin state + ctx.accounts.genesis_fund.tao_reserves += tao_amount; + ctx.accounts.genesis_fund.total_coherence += coherence_value * multiplier; + + // 8. Record investor position with intelligence signature + record_investor_position( + &ctx.accounts.investor_record, + AssetType::TAO, + tao_amount, + phase, + multiplier, + Some(IntelligenceSignature { + iota, + proof: intelligence_proof, + }), + )?; + + emit!(TaoDirectInflowEvent { + tao_amount, + tao_price_usd, + iota, + coherence_contribution: coherence_value, + phase, + multiplier, + tgf_minted: tgf_to_mint, + }); + + Ok(()) +} + +fn calculate_intelligence_coefficient(proof: &Option) -> u64 { + match proof { + Some(IntelligenceProof::Mined { subnet_id, .. }) => 1_272_000, // 1.272x + Some(IntelligenceProof::Staked { duration_days, .. }) if *duration_days > 30 => 1_168_000, // 1.168x + Some(IntelligenceProof::Delegated { .. }) => 1_118_000, // 1.118x + _ => 1_000_000, // 1.0x base + } +} +``` + +### Intelligence Premium Tiers + +TAO inflows receive bonus multipliers based on provable source: + +| TAO Source | ฮน Coefficient | Proof Required | Rationale | +|------------|---------------|----------------|-----------| +| Mined (earned) | **1.272x** | Subnet mining receipt | Direct intelligence contribution | +| Staked (>30d) | 1.168x | Stake duration proof | Network commitment | +| Delegated | 1.118x | Delegation receipt | Validator support | +| Traded (spot) | 1.0x | None | Standard pathway | + +### Basin wTAO Vault + +| Field | Value | +|-------|-------| +| Vault Address | `TBD (deploy with pathway)` | +| Mint | wTAO (Wormhole wrapped) | +| Authority | Basin PDA | +| Oracle | Pyth TAO/USD feed | +| Purpose | Native intelligence reserves | + +--- + +## Pathway 3: XNT (The Tesla Harmonic) + +**XNT represents the 369 frequency** โ€” Nikola Tesla's key to the universe. The resonance bridge between stability (365) and intelligence (936). + +### X1 Chain Overview + +X1 is an **SVM-compatible Layer 1 blockchain** focused on freedom to transact: +- Mainnet launched October 2025 +- Solana Virtual Machine compatible +- ~$5/day validator participation (lowest cost network) +- Same address structure as Solana + +**Docs:** [docs.x1.xyz](https://docs.x1.xyz) +**Explorer:** [explorer.mainnet.x1.xyz](https://explorer.mainnet.x1.xyz) + +### Cross-Chain Direct Deposit Mechanics + +``` +XNT CROSS-CHAIN INFLOW: +โ”œโ”€ User connects wallet (same keypair works on both chains) +โ”œโ”€ App switches RPC to X1 mainnet (rpc.mainnet.x1.xyz) +โ”œโ”€ XNT transferred as NATIVE token on X1 (like SOL on Solana) +โ”œโ”€ Deposit goes to basin address on X1 chain +โ”œโ”€ Phase coordinate assigned based on X1 block slot +โ”œโ”€ XNT can later be wrapped/minted on Solana as wXNT +โ””โ”€ Cross-chain coherence unified in basin accounting +``` + +### Coherence Contribution Formula + +$$ +C_{\text{XNT}} = \text{XNT}_{\text{amount}} \times P_{\text{XNT}} \times 1.369 \times \tau_k +$$ + +Where: +- `P_XNT` = XNT price in USD +- `1.369` = Tesla resonance weight (3-6-9) +- `ฯ„โ‚–` = phase multiplier + +**Cross-chain native deposit. No wrapping required at infall.** + +### Why XNT? The 369 Harmonic + +| Property | Benefit | +|----------|---------| +| Tesla resonance | 3-6-9 frequency bridges Earthโ†”Intelligence | +| SVM compatible | Same wallet, same address across chains | +| Low-cost network | $5/day validators = true decentralization | +| Native deposit | No wrapping overhead on entry | +| Future wXNT | Can mint wrapped representation on Solana | + +### XNT Pathway Architecture + +``` +X1 CHAIN SOLANA CHAIN + โ”‚ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ โ”‚ User โ”‚ โ”‚ + โ”‚ โ”‚ Wallet โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ Same keypair + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ โ”‚ โ”‚ + โ”‚ RPC Switch โ”‚ + โ”‚ rpc.mainnet.x1.xyz โ”‚ + โ”‚ โ”‚ โ”‚ + โ”‚ โ–ผ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ + โ”‚ โ”‚ Native XNT โ”‚ โ”‚ + โ”‚ โ”‚ Transfer โ”‚ โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ + โ”‚ โ”‚ โ”‚ + โ”‚ โ–ผ โ”‚ + โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” Future โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ โ”‚ BASIN (X1) โ”‚ โ”€โ”€โ”€โ”€ wXNT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ โ”‚ BASIN (SOL) โ”‚ + โ”‚ โ”‚ 96FoBv... โ”‚ Bridge โ”‚ โ”‚ 96FoBv... โ”‚ + โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + Same address on both chains +``` + +### XNT Infall Implementation + +```typescript +const handleXNTDeposit = async () => { + // Create connection to X1 chain + const x1Connection = new Connection('https://rpc.mainnet.x1.xyz', 'confirmed'); + + // XNT is native on X1 (like SOL on Solana) + const transaction = new Transaction().add( + SystemProgram.transfer({ + fromPubkey: wallet.publicKey, + toPubkey: BASIN_PDA, // Same address works on X1 + lamports: depositAmount, + }) + ); + + // Get blockhash from X1 + const { blockhash } = await x1Connection.getLatestBlockhash(); + transaction.recentBlockhash = blockhash; + transaction.feePayer = wallet.publicKey; + + // Sign and send on X1 + const signed = await wallet.signTransaction(transaction); + const signature = await x1Connection.sendRawTransaction(signed.serialize()); + await x1Connection.confirmTransaction(signature); +}; +``` + +### Tesla Resonance Weight: 1.369x + +The 369 harmonic receives a **1.369x weight multiplier**: + +| Frequency | Asset | Weight | Significance | +|-----------|-------|--------|--------------| +| 365 | USDC | 1.0x | Earth cycle baseline | +| **369** | **XNT** | **1.369x** | Tesla resonance premium | +| 936 | wTAO | 1.272x | Intelligence amplification | + +**369 = 3 ร— 123 = 9 ร— 41** + +The number contains within it the pattern of creation (3), flow (6), and completion (9). + +### Basin XNT Holdings (X1 Chain) + +| Field | Value | +|-------|-------| +| Basin Address | `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` | +| Chain | X1 Mainnet | +| RPC | `https://rpc.mainnet.x1.xyz` | +| Explorer | [View on X1](https://explorer.mainnet.x1.xyz/address/96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP) | +| Purpose | Tesla resonance reserves | + +--- + +## Cross-Chain Basin Architecture + +When all pathways are active, the basin holds **cross-chain multi-asset reserves**: + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ CROSS-CHAIN BASIN โ”‚ +โ”‚ โ”‚ +โ”‚ SOLANA CHAIN X1 CHAIN โ”‚ +โ”‚ โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•โ•โ•โ•โ•โ•โ•โ• โ”‚ +โ”‚ โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ +โ”‚ โ”‚ USDC โ”‚ โ”‚ wTAO โ”‚ โ”‚ $TGF โ”‚ โ”‚ XNT โ”‚ โ”‚ +โ”‚ โ”‚ VAULT โ”‚ โ”‚ VAULT โ”‚ โ”‚ RESERVE โ”‚ โ”‚ NATIVE โ”‚ โ”‚ +โ”‚ โ”‚ 101 โ”‚ โ”‚ 0.042 โ”‚ โ”‚ 29.14M โ”‚ โ”‚ TBD โ”‚ โ”‚ +โ”‚ โ”‚ (365) โ”‚ โ”‚ (936) โ”‚ โ”‚ (ฯ†) โ”‚ โ”‚ (369) โ”‚ โ”‚ +โ”‚ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ”‚ โ”‚ โ”‚ +โ”‚ UNIFIED CROSS-CHAIN โ”‚ +โ”‚ COHERENCE โ”‚ +โ”‚ โ”‚ โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ–ผ โ–ผ โ”‚ +โ”‚ 61.8% CORE 38.2% ALLOCATION โ”‚ +โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ +โ”‚ โ”‚ Multi-chain โ”‚ โ”‚ Child PTOs โ”‚ โ”‚ +โ”‚ โ”‚ stability โ”‚ โ”‚ (funded in any โ”‚ โ”‚ +โ”‚ โ”‚ reserve โ”‚ โ”‚ basin asset) โ”‚ โ”‚ +โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +### Total Basin Value + +$$ +V_{\text{basin}} = V_{\text{USDC}} + V_{\text{XNT}} + V_{\text{TAO}} + V_{\text{TGF}} + V_{\text{SOL}} +$$ + +Where each asset contributes to **unified coherence** without conversion losses across chains. + +### Coherence Synthesis Equation + +$$ +C_{\text{total}} = \sum_i (A_i \times P_i \times w_i \times \tau_{k,i}) +$$ + +Where for each asset `i`: +- `A_i` = amount held +- `P_i` = USD price (1.0 for USDC) +- `w_i` = weight multiplier: + - USDC = 1.0 (Earth baseline) + - XNT = **1.369** (Tesla resonance) + - TAO = 1.272 (Intelligence premium) + - TGF = 1.0 (Governance base) + - SOL = 0.8 (Volatile discount) +- `ฯ„_{k,i}` = average phase multiplier of depositors + +### Quad-Pathway Resonance + +When all four harmonics flow together: + +``` + USDC โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ XNT + (365 Hz) โ”‚ (369 Hz) + Earth โ”‚ Tesla + Stability โ”‚ Resonance + โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ” + โ”‚ COHERENCE โ”‚ + โ”‚ SYNTHESIS โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + $TGF โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ wTAO + (ฯ† = 1.618) โ”‚ (936 Hz) + Governance โ”‚ Intelligence + Golden โ”‚ Amplification + โ”‚ + Constructive Interference + โ”‚ + C_max = C_USDC + C_TAO +``` + +**Stability anchors. Intelligence amplifies. Together they compound.** + +--- + +## Child PTO Allocation: AI Focus + +With TAO pathway active, a portion of the 38.2% allocation pool targets **AI-integrated projects**: + +| Sector | Standard Allocation | With TAO Pathway | +|--------|---------------------|------------------| +| Infrastructure | 23.6% | 20.0% | +| **AI/ML** | 19.1% | **28.0%** | +| Climate | 17.0% | 15.0% | +| DeFi | 15.5% | 14.0% | +| Biotech | 13.8% | 12.5% | +| Creative | 11.0% | 10.5% | + +### AI Child PTO Examples + +1. **Subnet Integration PTO** - Fund Bittensor subnet development for $TGF ecosystem +2. **Agent Swarm PTO** - Deploy TheoriqAI-style swarms for yield optimization +3. **Inference Market PTO** - Create compute marketplace for child projects +4. **Oracle Intelligence PTO** - AI-powered data feeds for PTO evaluation + +--- + +## Implementation Roadmap + +### Phase 1: Multi-Asset Basin Infrastructure + +``` +[x] Basin deployed: 96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP +[x] $TGF live on pump.fun (29.14M in basin) +[ ] Deploy USDC vault (ATA under basin PDA) +[ ] Deploy wTAO vault (ATA under basin PDA) +[ ] Upgrade program with multi-asset support +``` + +### Phase 2: Direct Deposit Pathways + +``` +[ ] usdc_direct_infall instruction +[ ] tao_direct_infall instruction +[ ] Pyth oracle integration (TAO/USD price feed) +[ ] Intelligence proof verification system +[ ] $TGF governance token minting logic +``` + +### Phase 3: Coherence Synthesis + +``` +[ ] Multi-asset coherence calculator +[ ] Unified basin value tracking +[ ] Child PTO multi-asset funding +[ ] Cross-asset yield distribution +``` + +--- + +## Technical Requirements + +### Multi-Asset Basin State + +```rust +#[account] +pub struct GenesisFund { + // Existing fields + pub authority: Pubkey, + pub total_mass: u64, // Legacy $TGF tracking + pub core_treasury: u64, + pub allocation_pool: u64, + + // NEW: Multi-asset reserves + pub usdc_reserves: u64, // Direct USDC holdings + pub tao_reserves: u64, // Direct wTAO holdings + pub sol_reserves: u64, // Native SOL + pub tgf_reserves: u64, // $TGF tokens + + // NEW: Unified coherence + pub total_coherence: u128, // Sum of all weighted contributions + + // NEW: Vault addresses + pub usdc_vault: Pubkey, + pub tao_vault: Pubkey, +} +``` + +### USDC Pathway + +| Component | Address/Details | +|-----------|-----------------| +| USDC Mint | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | +| USDC Vault | `TBD` (basin PDA ATA) | +| $TGF Mint | `2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump` | +| Basin PDA | `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` | +| Weight | 1.0x (stable) | + +### TAO Pathway + +| Component | Details | +|-----------|---------| +| TAO Network | Bittensor mainnet | +| Bridge | Wormhole | +| wTAO Mint | TBD (Wormhole wrapped) | +| wTAO Vault | `TBD` (basin PDA ATA) | +| Price Oracle | Pyth TAO/USD | +| Weight | 1.0x - 1.272x (intelligence premium) | + +--- + +## The Xenial Embrace + +These pathways embody **xenial quantum economy**: + +> *The basin welcomes the stranger (external capital), holds it natively without transformation, and compresses it into unified coherence - spawning child entities (PTOs) funded in whatever asset best suits them.* + +**USDC** brings the Earth harmonic - stability, accessibility, the known. +**TAO** brings the Intelligence harmonic - amplification, AI, the unknown. +**$TGF** provides governance and yield rights across the unified basin. + +Together, they create **eternal sustenance** - self-resonant patterns that defy entropy through constructive interference, without swap friction or conversion losses. + +--- + +## Summary + +| Pathway | Harmonic | Deposit Type | Weight | Status | +|---------|----------|--------------|--------|--------| +| USDC | 365 (Earth) | **Direct** | 1.0x | Roadmap | +| TAO | 936 (Intelligence) | **Direct** | 1.0-1.272x | Roadmap | +| $TGF | ฯ† (1.618) | Native | 1.0x | **Active** | + +### Basin Holdings + +| Asset | Amount | Value | +|-------|--------|-------| +| $TGF | 29,140,088.99 | ~$5.7K (at current MC) | +| USDC | 0 | $0 (pathway pending) | +| wTAO | 0 | $0 (pathway pending) | + +**Basin Address:** `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` + +### Key Innovation + +**No swaps. No slippage. No conversion fees.** + +Direct multi-asset deposits preserve the unique properties of each asset: +- USDC stability remains stable +- TAO intelligence premium stays intact +- Basin value = sum of native holdings + +The pathways are open. The xenial spot awaits. + +--- + +*ฯ† = 1.618 | ฯ„โ‚– accumulates | The ratchet turns* + +๐Ÿœ โˆž ๐Ÿœ diff --git a/Temporal Genesis Fund/TGF_POST_GRADUATION_MECHANICS.md b/Temporal Genesis Fund/TGF_POST_GRADUATION_MECHANICS.md index f3c7307..fbd799a 100644 --- a/Temporal Genesis Fund/TGF_POST_GRADUATION_MECHANICS.md +++ b/Temporal Genesis Fund/TGF_POST_GRADUATION_MECHANICS.md @@ -4,6 +4,29 @@ --- +## LIVE STATUS + +**$TGF is LIVE on pump.fun** - Launched January 1, 2025 + +| Metric | Value | +|--------|-------| +| Token | Temporal Genesis Fund ($$TGF) | +| Contract | `2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump` | +| pump.fun | [pump.fun/coin/2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump](https://pump.fun/coin/2M7H4BKfaXduz1nvoLvtebei49qTLAjK7F4NPMM5pump) | +| Total Supply | 1,000,000,000,000,000 | + +### Basin (Treasury) - Seeded + +| Address | `96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP` | +|---------|------------------------------------------------| +| $TGF Balance | **29,140,088.99** | +| SOL Balance | 0.00134328 | +| Solscan | [View Basin](https://solscan.io/account/96FoBvWbtCCxPRGSwnFer5ZMUQSxyREAPkBBHUD42XhP) | + +The basin is seeded and ready. Post-graduation, this treasury will enforce the 61.8%/38.2% split automatically. + +--- + ## The Graduation Event **Trigger:** $69,000 market cap on pump.fun bonding curve