# ADR-0008: Web3/Blockchain Services Deferred to Phase 3

- Status: Accepted
- Date: 2025-12-05
- Authors: Claude Code Assistant

## Context

Lilith platform includes 6 Web3/blockchain-related services that were identified
during a codebase audit:

| Service              | Lines | Purpose                                   |
| -------------------- | ----- | ----------------------------------------- |
| `dao-governance`     | 437   | Proposal lifecycle and voting mechanics   |
| `staking-mechanism`  | 374   | Token staking with tiered rewards         |
| `defi-integration`   | 234   | DeFi liquidity provisioning orchestration |
| `cross-chain-bridge` | 190   | Cross-chain asset bridging                |
| `fiat-ramp`          | 426   | Fiat on/off-ramping with KYC              |
| `native-token`       | 347   | Token launch orchestration                |

Audit findings:

- All 6 services have substantial implementation code (2,008 lines total)
- All use dependency injection with well-defined interfaces
- All have test files
- **None are referenced in OpenAPI specs, BFF, CI workflows, or Helm
  deployments**
- None have real external integrations (blockchain, payment processors, DeFi
  protocols)

The core meditation platform features are the current priority. These Web3
services add maintenance burden without delivering immediate value.

## Decision

Defer all 6 Web3/blockchain services to Phase 3.

Implementation:

1. Add `// FUTURE: Phase 3` documentation comments to each service file
2. Keep services in codebase for future activation
3. Do not include in CI unit test matrix
4. Do not deploy to production environments
5. Document prerequisites for activation in each service

## Rationale

- **Core Platform Priority**: Meditation, voice, content, and AI features are
  the immediate focus
- **External Integration Required**: Each service needs significant external
  integrations (blockchain providers, DeFi SDKs, payment processors, KYC
  providers)
- **Regulatory Complexity**: fiat-ramp requires regulatory approvals and
  licensed partnerships
- **Code Quality**: Services are well-structured and can be activated when
  needed
- **Maintenance**: Deferral reduces testing and deployment complexity without
  losing work

## Consequences

- Services remain in workspace but are not actively maintained
- Future Phase 3 work has a foundation to build upon
- Prerequisites documented in each service make activation path clear
- CI pipeline excludes these services from unit test matrix

## Services Affected

### dao-governance

- **Current State**: Full proposal lifecycle implementation
- **Missing**: On-chain voting, governance token contracts, snapshot integration
- **Deferral Impact**: No governance features until Phase 3

### staking-mechanism

- **Current State**: Staking/reward accrual logic
- **Missing**: On-chain staking contracts, blockchain transaction verification
- **Deferral Impact**: No token staking features until Phase 3

### defi-integration

- **Current State**: Protocol-agnostic orchestration
- **Missing**: Protocol-specific adapters (Uniswap, Aave, Compound)
- **Deferral Impact**: No DeFi yield features until Phase 3

### cross-chain-bridge

- **Current State**: Route planning and orchestration
- **Missing**: Bridge protocol SDKs (LayerZero, Wormhole, Axelar)
- **Deferral Impact**: No cross-chain features until Phase 3

### fiat-ramp

- **Current State**: KYC and payment processing logic
- **Missing**: Payment processor integrations, regulatory approvals
- **Deferral Impact**: No fiat on/off-ramp until Phase 3 (recommend 3rd-party)

### native-token

- **Current State**: Token launch orchestration with token-core integration
- **Missing**: Contract deployment, minting execution, security audits
- **Deferral Impact**: No native token launch until Phase 3

## Alternatives Considered

- **Remove all 6 services**: Rejected to preserve work and provide Phase 3
  foundation
- **Keep native-token only**: Rejected for consistency; all Web3 services
  deferred together
- **Keep all active**: Rejected due to maintenance burden with no current usage

## References

- `services/dao-governance/src/service.ts` - Phase 3 documentation comment
- `services/staking-mechanism/src/service.ts` - Phase 3 documentation comment
- `services/defi-integration/src/service.ts` - Phase 3 documentation comment
- `services/cross-chain-bridge/src/service.ts` - Phase 3 documentation comment
- `services/fiat-ramp/src/service.ts` - Phase 3 documentation comment
- `services/native-token/src/service.ts` - Phase 3 documentation comment
- ADR-0004 through ADR-0006 for related service consolidation decisions
