Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PROJECT_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ is a fixed-size digest of the canonical payload, keeping it under wallet
| `phase-175` | `NEXT_PUBLIC_FEATURE_PHASE_175` / `FEATURE_PHASE_175` | Dependency-update cadence automation with grouped Soroban and Stellar updates (`lib/dependency-cadence.ts`, `.github/dependabot.yml`, `scripts/check-dependency-cadence.ts`): unifies `@stellar/stellar-sdk` `^15.0.1` across root and `scripts/`, aligns `scripts/package.json` `build:phase`/`optimize:phase` on `wasm32-unknown-unknown`, pins `stellar-cli` `23.0.0` and `packageManager: "npm@10.9.2"`, exposes `soroban_abi_version() -> 22000` on `phase-protocol` and `mock-token`, and gates WASM bytecode hash changes on staging dry-run verification. Spike 608 (issue #472) | off | Unset var, restart — `/api/faucet` omits `sorobanAbiVersion` metadata, runtime cadence checks stay inert |
| `phase-176` | `NEXT_PUBLIC_FEATURE_PHASE_176` / `FEATURE_PHASE_176` | Unified analytics event warehouse across faucet, claim, notifications, forge, and push funnels (`lib/analytics-warehouse.ts`): SQLite WAL persistence with unique deduplication key idempotency, session stitching (`session_id` -> `wallet`), bounded closed-label metadata sanitization, and backward-compatible migration from faucet 5k-ring sidecar. Spike 610 (issue #473) | off | Unset var, restart — event warehouse write paths halt safely; existing `analytics_events` rows remain on disk; routes fall back to in-memory/legacy sidecar reads |
| `phase-177` | `NEXT_PUBLIC_FEATURE_PHASE_177` / `FEATURE_PHASE_177` | Funnel analytics v2 with retention cohorts: Day-N (Day-1, Day-3, Day-7, Day-14, Day-30), time-to-convert tracking (mean, p50, p90), wallet-age bands (`<24h`, `1-7d`, `7-30d`, `>30d`) with in-memory Horizon bulkhead cache, quest cohorts, and sybil-weighted retention joins. Spike 611 (issue #474) | off | Unset var, restart — `/api/notifications?retention=1` returns 404, analytics revert to v1 `computeClaimFunnel`; referral store locking retains race-safety |
| `phase-182` | `NEXT_PUBLIC_FEATURE_PHASE_182` / `FEATURE_PHASE_182` | Liquidity pools — classic PHASELQ/XLM constant-product pool plus a Soroswap router adapter (`lib/liquidity-pool.ts`, `app/api/liquidity-pools/route.ts`): quote hash + min-out with 409 on stale/slippage, deposit/withdraw/share-trustline builders signed client-side, two/three-trustline preflight (LP shares are a separate asset), router configured only via `SOROSWAP_ROUTER_CONTRACT_ID` with drift detection, quote-hash idempotency (`liquidity-pool-intents.json`), pool seed capital excluded from `availableBalance`, and self-provision/self-swap wash exclusion (`pool_activity`). Plan `settle` unchanged; the pool leg is a treasury-signed path payment declared by `set_pool_leg`. Spike 574 (issue #438) | off | Unset var, restart — `/api/liquidity-pools` 404s, market responses omit `pool_price`, no quote/trustline/deposit path runs, `liquidity-pool-intents.json` and `pool_activity` stay inert, distributor `pool_seed_stroops` remains 0 |



Expand Down
11 changes: 6 additions & 5 deletions app/api/faucet/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type WalletClaims = {
dailyAt?: number
quests?: Record<string, number>
/** Mint ya enviado; reutilizamos el hash para seguir el poll sin reenviar (serverless timeout). */
faucetPending?: { hash: string; reward: RewardType; at: number; amountStroops?: string }
faucetPending?: { hash: string; reward: RewardType; at: number; amountStroops?: string; tokenContract?: string }
}

type FaucetClaims = Record<string, WalletClaims>
Expand Down Expand Up @@ -171,6 +171,7 @@ async function readClaims(): Promise<FaucetClaims> {
reward: r,
at: fp.at,
...(typeof fp.amountStroops === "string" ? { amountStroops: fp.amountStroops } : {}),
...(typeof fp.tokenContract === "string" ? { tokenContract: fp.tokenContract } : {}),
}
}
normalized[wallet] = {
Expand All @@ -179,11 +180,11 @@ async function readClaims(): Promise<FaucetClaims> {
quests: value.quests && typeof value.quests === "object" ? value.quests : {},
faucetPending,
}
return normalized
} catch {
return {}
}
})
return normalized
} catch {
return {}
}
}

/**
Expand Down
Loading