You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,7 +61,7 @@ TrustLend is designed as a foundational layer for decentralized, inclusive credi
61
61
62
62
## 🏗️ Architecture & Workflow
63
63
64
-
TrustLend uses a practical hybrid architecture: **fast UX off-chain** (Supabase/Next.js) combined with **trust-critical logic on-chain** (Soroban/Stellar). The diagram below maps every component and data flow across all six layers of the platform.
64
+
TrustLend uses a practical hybrid architecture: **fast UX off-chain** (Next.js + Neon Postgres) combined with **trust-critical logic on-chain** (Soroban/Stellar). The diagram below maps every component and data flow across all six layers of the platform.
65
65
66
66
```mermaid
67
67
flowchart TB
@@ -84,7 +84,7 @@ flowchart TB
84
84
subgraph Backend["⚙️ Backend Layer (Next.js)"]
85
85
direction TB
86
86
SA[("📡 Server Actions & API Routes<br/>app/actions + app/api")]
1.**Onboarding:** User signs up via Supabase Auth, connects a Stellar wallet (Freighter / xBull / Albedo on desktop, or any WalletConnect v2 mobile wallet such as LOBSTR by scanning a QR code), completes KYC verification, and their on-chain reputation profile is initialized.
213
+
1.**Onboarding:** User signs in with their Stellar wallet (SEP-10 challenge signature; no passwords) (Freighter / xBull / Albedo on desktop, or any WalletConnect v2 mobile wallet such as LOBSTR by scanning a QR code), completes KYC verification, and their on-chain reputation profile is initialized.
214
214
2.**Borrowing:** Borrower submits a loan request. The Next.js backend calls `ReputationContract.calculate_max_loan` and `calculate_interest_rate` to determine eligibility and terms.
215
215
3.**Lending:** Lender reviews the request in the marketplace, approves it, and the `LendingContract.approve_loan` is called. Funds are locked via `EscrowContract.create_escrow_hold`.
216
216
4.**Disbursement:** After the 1-hour revocation window expires, the admin confirms disbursement. `EscrowContract.confirm_disbursement` releases funds to the borrower, and `LendingContract.activate_loan` marks the loan as active.
@@ -221,7 +221,7 @@ flowchart LR
221
221
222
222
| Automation | Trigger | Action |
223
223
|---|---|---|
224
-
|**Payment-Due Scheduler**| Vercel Cron (hourly) | Queries Supabase for loans due within 48h → Sends webhook & email |
224
+
|**Payment-Due Scheduler**| Vercel Cron (daily) | Queries the database for loans due within 48h → Sends webhook & email |
225
225
|**Default Management**| Vercel Cron (daily) | Checks overdue loans against ledger time → Marks defaulted on-chain → Proposes insurance payout via MultiSigAdmin (requires N-of-M human approval) |
Copy file name to clipboardExpand all lines: SECURITY.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ If you discover a security vulnerability within TrustLend, **do NOT open a publi
45
45
-**Frontend/UI Bugs:** Visual presentation flaws, CSS issues, or non-security UI bugs without impact on user funds or data.
46
46
-**Denial of Service (DoS):** Volumetric DoS/DDoS attacks against infrastructure or public Stellar RPC endpoints not caused by application design flaws.
47
47
-**Social Engineering:** Phishing, spam, or social engineering attacks targeted at TrustLend maintainers or users.
48
-
-**Third-Party Dependencies:** Vulnerabilities in underlying infrastructure (e.g. Stellar Core, Soroban SDK, Supabase platform) unless directly exploitable through TrustLend code logic.
48
+
-**Third-Party Dependencies:** Vulnerabilities in underlying infrastructure (e.g. Stellar Core, Soroban SDK, Neon, Vercel) unless directly exploitable through TrustLend code logic.
49
49
-**Known Issues:** Vulnerabilities already reported, tracked in public issues/PRs, or previously disclosed in security audit reports.
0 commit comments