pezkuwichain
fe2cd390f6
feat(p2p): add Kurdish diaspora payment methods (130+ total)
...
- Add 61 new payment methods for diaspora countries:
- Germany (EUR): Sparkasse, Commerzbank, DKB, etc.
- Sweden (SEK): Swish, Nordea, SEB, Swedbank
- UK (GBP): Faster Payments, Barclays, HSBC, Monzo
- France (EUR): Crédit Agricole, Lydia, BNP Paribas
- Netherlands (EUR): iDEAL, ABN AMRO, Bunq, Tikkie
- Belgium (EUR): Bancontact, KBC
- Austria (EUR): Erste Bank, Raiffeisen
- Switzerland (CHF): TWINT, UBS, PostFinance
- Norway (NOK): Vipps, DNB, SpareBank 1
- Denmark (DKK): MobilePay, Danske Bank
- Australia (AUD): PayID, Commonwealth Bank
- Canada (CAD): Interac e-Transfer, TD Bank
- Expand FiatCurrency type: SEK, GBP, CHF, NOK, DKK, AUD, CAD
- Update CreateAd, BlockTrade, ExpressMode components
- Add regional labels (Bakur, Başûr, Rojhilat, EU diaspora)
2025-12-12 03:48:57 +03:00
pezkuwichain
14f5e84d15
feat(p2p): implement OKX-style internal ledger escrow system
...
Phase 5 implementation - Internal Ledger Escrow (OKX Model):
- No blockchain transactions during P2P trades
- Blockchain tx only at deposit/withdraw
- Fast and fee-free P2P trading
Database:
- Add user_internal_balances table
- Add p2p_deposit_withdraw_requests table
- Add p2p_balance_transactions table
- Add lock_escrow_internal(), release_escrow_internal() functions
- Add process_deposit(), request_withdraw() functions
UI Components:
- Add InternalBalanceCard showing available/locked balances
- Add DepositModal for crypto deposits to P2P balance
- Add WithdrawModal for withdrawals from P2P balance
- Integrate balance card into P2PDashboard
Backend:
- Add process-withdrawal Edge Function
- Add verify-deposit Edge Function
Updated p2p-fiat.ts:
- createFiatOffer() uses internal balance lock
- confirmPaymentReceived() uses internal balance transfer
- Add internal balance management functions
2025-12-12 00:41:11 +03:00
pezkuwichain
7330b2e7a6
feat(p2p): add Phase 3 dispute system components
...
- Add DisputeModal.tsx with reason selection, evidence upload, terms acceptance
- Add P2PDispute.tsx page with evidence gallery, status timeline, real-time updates
- Integrate dispute button in P2PTrade.tsx
- Add /p2p/dispute/:disputeId route to App.tsx
- Add P2P test suite with MockStore pattern (32 tests passing)
- Update P2P-BUILDING-PLAN.md with Phase 3 progress (70% complete)
- Fix lint errors in test files and components
2025-12-11 09:10:04 +03:00
pezkuwichain
da1092a06f
feat: Phase 3 - P2P Fiat Trading System (Production-Ready)
...
Backend Infrastructure:
- Add p2p-fiat.ts (20KB) - Enterprise-grade P2P trading library
- Implement blockchain escrow integration (lock/release)
- Add encrypted payment details storage
- Integrate reputation system (trust levels, badges)
- Create 65 payment methods across 5 currencies (TRY/IQD/IRR/EUR/USD)
Database Schema (Supabase):
- p2p_fiat_offers (sell offers with escrow tracking)
- p2p_fiat_trades (active trades with deadlines)
- p2p_fiat_disputes (moderator resolution)
- p2p_reputation (user trust scores, trade stats)
- payment_methods (65 methods: banks, mobile payments, cash)
- platform_escrow_balance (hot wallet tracking)
- p2p_audit_log (full audit trail)
RPC Functions:
- increment/decrement_escrow_balance (atomic operations)
- update_p2p_reputation (auto reputation updates)
- cancel_expired_trades (timeout automation)
- get_payment_method_details (secure access control)
Frontend Components:
- P2PPlatform page (/p2p route)
- P2PDashboard (Buy/Sell/My Ads tabs)
- CreateAd (dynamic payment method fields, validation)
- AdList (reputation badges, real-time data)
- TradeModal (amount validation, deadline display)
Features:
- Multi-currency support (TRY, IQD, IRR, EUR, USD)
- Payment method presets per country
- Blockchain escrow (trustless trades)
- Reputation system (verified merchants, fast traders)
- Auto-timeout (expired trades/offers)
- Field validation (IBAN patterns, regex)
- Min/max order limits
- Payment deadline enforcement
Security:
- RLS policies (row-level security)
- Encrypted payment details
- Multisig escrow (production)
- Audit logging
- Rate limiting ready
Status: Backend complete, UI functional, VPS deployment pending
Next: Trade execution flow, dispute resolution UI, moderator dashboard
2025-11-17 06:43:35 +03:00