Economic System
Relevant source files
The following files were used as context for generating this wiki page:
The Economic System (TCEP) of the TAMV MD-X4 ecosystem is a centralized financial infrastructure designed to manage digital assets, memberships, and marketplace transactions. It facilitates the flow of the TAU currency and credit transfers while maintaining strict integration with Stripe for external fiat-to-crypto conversions. The system is architected as a "non-money" governance model where Hybrid DAOs can influence product types but lack control over core economic parameters such as commissions, prices, or ledger logic.
Sources: PLAN-TAMV-MODULAR.md:200-213, supabase/functions/tamv-unified-api/index.ts:117-158, 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:1-10
Core Architecture and Components
The system operates through a unified API and specialized Edge Functions that handle identity-linked wallets, transaction ledgers, and external payment webhooks.
Component Overview
| Component | Description |
|---|---|
| TAU Ledger | The primary database for tracking balances and movements of the TAU currency. |
| TCEP Wallets | User-specific digital wallets storing credit balances and membership tiers. |
| Unified API | Orchestrates economy endpoints like /economy/wallet and /economy/transfer. |
| Stripe Gateway | Manages fiat transactions for memberships and TAU purchases via create-checkout. |
| MSR Registry | Logs all economic events with cryptographic hashes for auditability. |
Sources: PLAN-TAMV-MODULAR.md:267-272, supabase/functions/tamv-unified-api/index.ts:117-158, 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:85-98
Economic Data Flow
The following diagram illustrates the relationship between the user interface, the unified API, and the underlying database/payment infrastructure.
The diagram shows how the Unified API handles internal transfers while the Stripe Webhook Function processes external payments to update the TCEP Wallets and Transaction tables.
Sources: 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:12-42, supabase/functions/tamv-unified-api/index.ts:124-158
Transaction Logic and TAU Currency
The system supports several transaction types, including internal peer-to-peer transfers, membership subscriptions, and premium gift consumption.
Internal Transfer Process
When a user initiates a transfer, the system validates the balance, generates a cryptographic hash of the transaction data for the MSR (MSR Registry), and updates the ledgers.
Commission Structure
The system calculates commissions based on membership levels for specific transactions.
| Membership Level | Commission Rate |
|---|---|
| Free | 30% |
| Premium | 25% |
| VIP | 20% |
| Elite | 15% |
| Celestial | 10% |
| Enterprise | 8% |
Sources: supabase/functions/tamv-unified-api/index.ts:161-169
Marketplace Integration
The Marketplace handles the purchase of TAU and subscriptions through a secure Stripe-based workflow. It emphasizes idempotency and event queuing to ensure reliability.
Stripe Webhook Workflow
To prevent duplicate processing, the system utilizes a processed_stripe_events table as an idempotency guard.
- Verification: Validates the Stripe signature using
STRIPE_WEBHOOK_SECRET. - Idempotency Check: Queries
processed_stripe_eventsfor the currentstripe_event_id. - State Update: Updates
tcep_wallets(e.g., incrementsbalance_tauor updatesmembership_tier). - Logging: Records the transaction and the event ID to prevent re-processing.
Sources: 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:44-70
Premium Gifts and Consumption
Gifts consumed within the platform involve a 10% platform commission. The flow is as follows:
- Step 1: Frontend verifies
balance_tau >= gift.cost. - Step 2: Transaction recorded with negative amount for sender.
- Step 3: Wallet update for sender (
-cost) and receiver (+reward). - Step 4: Realtime notification triggered to the recipient.
Sources: 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:33-42
Governance and Restrictions
A critical design choice in the TAMV MD-X4 project is the isolation of the Economic System from DAO governance. While Hybrid DAOs (SCAOs) exist for quality assurance and community policy, they are constitutionally prohibited from modifying economic logic.
Governance Boundaries
- DAOs Can: Propose types of products permitted in the marketplace and vote on marketplace categories.
- DAOs Cannot: Change commission rates, modify the TAU/MSR ledger, alter Stripe logic, or change membership pricing.
- Enforcement: The
eslint-plugin-tamvenforces theno-hidden-economyrule, requiring explicit UI transparency for any economic operations.
Sources: PLAN-TAMV-MODULAR.md:209-213, 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:99-108, eslint-plugin-tamv/index.js:338-369
Fenix Fund
The Fenix Fund is a redistribution module within the economy, aimed at pooling and distributing resources according to specific cycles.
- Redistribution Rule: 20/30/50.
- Total Pool Tracking: Managed via the
/economy/fenix/statusendpoint. - Status: Active as of the current architectural cycle (2026-Q1).
Sources: supabase/functions/tamv-unified-api/index.ts:219-230
Conclusion
The Economic System provides a robust and auditable foundation for the TAMV MD-X4 ecosystem. By combining high-performance Edge Functions with a strict separation between community governance and financial logic, the system ensures transactional integrity and platform stability. Key metrics, such as a <500ms webhook processing time and 100% ledger consistency, remain the primary targets for operational success.
Sources: 02_MODULOS/M04_ECONOMIA/INTERNO/MARKETPLACE-TAU-SPEC.md:90-98, TASKS-TAMV-MODULAR.md:183-189