Repository navigation
docs(docs): registrar el spike G2 de P2 y el primer deployments/testnet.json - #35
Merged
Merged
Conversation
…et.json - DECISIONS: vault propio de DeFindex desplegado en testnet (CDKNUOYY…KDOQO), deposit(invest=true) basta para el escrow tras el rebalance inicial, el faucet de Blend no da USDC (se compra en Soroswap), comisión de protocolo = 20 % de la comisión del vault, e identidades. - deployments/testnet.json: token, vault y estrategia por defecto, DeFindex, Soroswap, identidades, Relayer y smart account (de P3). factory y escrow a null hasta el primer deploy.
jzelada97
requested review from
CarlosJX7,
Diego-Matoss and
RicardoMatosR
as code owners
October 25, 2026 18:48
2 tasks done
CarlosJX7
approved these changes
Oct 25, 2026
CarlosJX7
left a comment
Collaborator
There was a problem hiding this comment.
OK de P1. deployments/testnet.json es JSON válido y sin secretos. Tomo nota para el escrow: deposit(…, invest = true) y withdraw, y la comisión de protocolo es el 20 % de la del vault (pf = 2000 bps sobre vf), que es lo que la factory copia en Terms.defindex_protocol_fee_bps.
jzelada97
added a commit
that referenced
this pull request
Oct 25, 2026
## Qué cambia
Primer esqueleto de **`apps/api`** (`@fianzas/api`), la API compatible
con la Core API v2 de Trustless Work (arquitectura § 6.8, INTERFACES §
8):
- Hono con `basePath("/api")`, configuración desde
`deployments/testnet.json` + variables del servidor (ninguna
`NEXT_PUBLIC_`).
- **Problem Details** RFC 9457 con códigos de TW y `FZ_*`; las rutas de
TW que no encajan responden **`501 FZ_ENDPOINT_NOT_SUPPORTED`** con
`extensions.replacement` (`dispute` → `/fianzas/v1/…/stop`,
`resolve-dispute` → `…/resolve`, `deploy` → `POST
/fianzas/v1/fianzas`…).
- `POST /stellar/send-transaction` (misma forma que TW; nunca
patrocina).
- `GET /fianzas/v1/config`, `GET /fianzas/v1/strategies` (comisiones y
precio por share leídos del vault en vivo) y `GET
/fianzas/v1/strategies/:id/price`.
- Montaje de **`/fianzas/v1/relay`** (`createRelayHandler` de
@RicardoMatosR) y **`/fianzas/v1/ramp`** (`createSimRampHandler`), con
`RelayPolicy` construida desde `deployments`.
- Cliente tipado `@fianzas/api/client` para web y backoffice.
- Las rutas que dependen de la factory y los bindings (builds de
fund/approve/create, lecturas por fianza) responden `501
FZ_NOT_IMPLEMENTED_YET` hasta la fase 3a.
**`cross-area`:** una línea en `apps/web/package.json` (dependencia
`@fianzas/api`) y el catch-all `apps/web/app/api/[[...path]]/route.ts`
(área `api`). @Diego-Matoss, revisa por favor. Esta rama incluye además
la de #35 (`deployments/testnet.json`), que la API necesita.
## Cómo probarlo
```
pnpm install && pnpm --filter @fianzas/api test && pnpm --filter @fianzas/web build
pnpm --filter @fianzas/api dev # http://localhost:8787/api/health
```
En local: typecheck limpio, 9 tests, `next build` con `ƒ
/api/[[...path]]`, y lecturas reales de testnet (vault propio) desde el
dev server.
## Checklist
- [x] Áreas: `api` (P2), `harness` con lock (#23), `web` con
`cross-area`
- [x] Commits con el formato del hook
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué cambia
docs/DECISIONS.md: entrada Spike G2 de P2 con el resultado del spike del vault y las pendientes de P2 tachadas:CDKNUOYYDNSHVOKVT7XNQAYUQ7U4OGNJ4Z5DGXY5QW6AIYG6VUPKDOQO(USDC Blend Strategy,vault_fee1 %, manager = admin, fee receiver = tesorería). Ya tiene 110 USDC invertidos en Blend y acumula rendimiento.deposit(…, invest = true): el rebalance inicial lo hace P2 una vez; los depósitos siguientes se invierten solos (comprobado).deployments/testnet.json(área P2): primera versión según INTERFACES § 6, con token, estrategia por defecto, DeFindex, Soroswap, identidades, Relayer y los datos de smart account de P3.factoryyescrowWasmHashanullhasta el primer deploy.Para quién
depositconinvest = trueywithdraw; no hace falta rol de rebalance.deployments/testnet.json(token, vault, relayer, smartAccount).🤖 Generated with Claude Code