Economy & Ledger Systems
Relevant source files
The following files were used as context for generating this wiki page:
The Economy & Ledger Systems within the TAMV ecosystem, specifically the TAMV Economic Engine (TEE) and the TCEP (Unified Access Token), facilitate a sovereign financial infrastructure. This system manages multi-level memberships, internal currency transactions (TAU/TCEP), and a transparent, audit-ready ledger integrated with external payment providers like Stripe. The system is designed to handle internal value transfers, marketplace commissions, and even lottery mechanics, all governed by the principles of the DAO Hybrid and recorded in a verifiable narrative ledger known as BookPI.
Sources: src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:13-17, federation/tamv-digital-nexus/packages/contracts/openapi/tamv.v1.yaml:12-15
1. TAMV Economic Engine (TEE) Architecture
The TEE operates as the core transactional layer, orchestrating the flow of the TAU (Token de Acceso Unificado) and managing user wallets. It enforces a strict commission structure and integrates with the MSR (Narrative Ledger) to log every economic event with evidence hashes.
Transactional Workflow
Transactions follow a strict flow from acquisition via external payment gateways to internal peer-to-peer transfers or service consumption.
The diagram shows how funds enter the system through external payments, update local wallets, and generate hashed records in the ledger.
Sources: src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:40-47, federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:109-130
2. Membership Tier System
The economy is heavily influenced by a 6-level membership tier system, which determines access to services, pricing, and voting weight within the DAO.
| Tier | Name | Access Level | Model |
|---|---|---|---|
| 0 | Free / Ciudadano | Basic wiki, community, ISNI profile | Free |
| 1 | Basic / Creador | Social feed, DreamSpaces, free UTAMV | Freemium |
| 2 | Pro / Profesional | Premium DreamSpaces, Isabella voice | Subscription |
| 3 | Business / Empresa | API access, dashboards, Odoo integration | B2B |
| 4 | Enterprise | Multi-site, white-label, dedicated support | B2B/B2G |
| 5 | Gold Plus / Alianza | Full governance, territorial nodes | Strategic |
Sources: src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:21-36, federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:143-149
3. The TCEP/TAU Token and Wallet System
The TCEP/TAU serves as the internal currency. Wallets are stored in the tcep_wallets table, maintaining balances and membership statuses.
Key Data Structures
The Unified API and OpenAPI specifications define the transaction and wallet entities.
// Wallet structure from tcep_wallets
interface Wallet {
user_id: string;
balance_tau: number;
balance_credits: number; // TCEP credits
membership_tier: string;
}
// Transaction structure from tcep_transactions
interface Transaction {
id: string;
from_user_id: string;
to_user_id: string;
amount: number;
tx_type: 'transfer' | 'purchase' | 'gift';
evidence_hash: string;
}
Sources: src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:84-88, federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:114-122, federation/tamv-digital-nexus/packages/contracts/openapi/tamv.v1.yaml:141-164
Commission Calculations
Commissions are dynamically calculated based on the user's membership level. While a standard 10% applies to gifts, the API supports various rates:
| Membership Level | Commission Rate |
|---|---|
| Free / Default | 30% |
| Premium | 25% |
| VIP | 20% |
| Elite | 15% |
| Gold / Gold Plus | 12% - 10% |
| Enterprise | 8% |
Sources: federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:142-150, src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:44
4. Ledger and Narrative Audit (MSR/BookPI)
Every transaction is registered in a ledger that implements a Saga pattern for consistency. To ensure the integrity of the economic system, events are hashed and mirrored in the MSR (Manual de Sentido y Registro) module.
This sequence ensures that every economic movement has a corresponding hashed entry in the governance audit trail.
Sources: federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:109-130, federation/tamv-digital-nexus/packages/contracts/openapi/tamv.v1.yaml:14-15
5. API Endpoints and Integration
The economy is managed via the /economy namespace in the TAMV Unified API.
| Endpoint | Method | Description |
|---|---|---|
/economy/wallet | GET | Retrieves the authenticated user's balance and tier. |
/economy/transfer | POST | Executes a P2P transfer with mandatory hashing. |
/economy/transactions | GET | Lists the user's transaction history (Ledger). |
/economy/lottery/purchase | POST | Permite la compra de tickets para sorteos internos. |
/payments/create | POST | Creates a Stripe payment intent for TAU acquisition. |
Sources: federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:98-140, federation/tamv-digital-nexus/packages/contracts/openapi/tamv.v1.yaml:385-410
6. Implementation Security
The system employs Row Level Security (RLS) in PostgreSQL to ensure users can only access their own wallet and transactions. Furthermore, the MD-X5 (Deca-V) pipeline enforces architectural invariants (L1-L9) that prevent unauthorized services from modifying economic states.
- Idempotency: Webhook events from Stripe are tracked in
processed_stripe_events. - Auditability: Every transaction requires an
evidence_hashgenerated from the sender, receiver, amount, and timestamp. - DAO Constraints: The Hybrid DAO can influence marketplace categories but is strictly prohibited from altering commissions or membership prices.
Sources: src/pages/wiki/metaverso-xr/EconomiaCuantica.tsx:64-70, src/pages/wiki/implementacion/CicdPipelines.tsx:28-40, federation/tamv-digital-nexus/supabase/functions/tamv-unified-api/index.ts:114-118
Conclusion
The Economy & Ledger Systems provide a robust, sovereign framework for value exchange within TAMV ONLINE. By combining a tiered membership model with a hashed narrative ledger (MSR/BookPI), the system ensures that economic activity is not only functional but also ethically auditable and aligned with the project's civilizatory goals.