Summary
Score Gatekeeper PoC: Soroban contract or middleware that reads ZCore on-chain tier via get_score and rejects transactions below a minimum tier (e.g. Blend borrow requires Tier B+).
Proves portable credit gating for #18 Blend integration.
Background
Proposed PoC
Option A — Soroban gatekeeper contract:
require_min_tier(wallet, min_tier_code) → panic if get_score(wallet).tier < min
- Invoked as sub-call from lending pool adapter
Option B — Server-side pre-check (faster PoC):
POST /api/user/request already evaluates lender eligibility
- Extend with public
GET /api/user/{wallet}/tier for protocols
Start with Option B if #16 not deployed; add Option A when contract ID is live.
Deliverables
| Path |
Action |
Docs/integrations/score-gatekeeper.md |
Tier gating flow, tier codes 0–3 |
Server/src/controllers/user.controller.ts |
Optional GET .../tier if needed |
Contracts/gatekeeper/ |
Optional Soroban PoC |
Acceptance criteria
Related
Summary
Score Gatekeeper PoC: Soroban contract or middleware that reads ZCore on-chain tier via
get_scoreand rejects transactions below a minimum tier (e.g. Blend borrow requires Tier B+).Proves portable credit gating for #18 Blend integration.
Background
Contracts/score-registry/(Deploy score-registry Soroban contract to Stellar testnet #16 deploy required)Contracts/interfaces/README.md,Server/src/types/soroban/score-types.tsContracts/mock-score-registry/Proposed PoC
Option A — Soroban gatekeeper contract:
require_min_tier(wallet, min_tier_code)→ panic ifget_score(wallet).tier < minOption B — Server-side pre-check (faster PoC):
POST /api/user/requestalready evaluates lender eligibilityGET /api/user/{wallet}/tierfor protocolsStart with Option B if #16 not deployed; add Option A when contract ID is live.
Deliverables
Docs/integrations/score-gatekeeper.mdServer/src/controllers/user.controller.tsGET .../tierif neededContracts/gatekeeper/Acceptance criteria
tierCodeToLabel/ on-chain read — no duplicate scoring logicwithMockContractId)Related