Phiên bản tài liệu: 1.1.0 | Cập nhật lần cuối: 2025 | Trạng thái: Đang triển khai thí điểm
Nền tảng: Bicrypto Exchange Platform v6.5.2 | Domain: goldvninvest.online
Hành lang pháp lý: Nghị quyết 05/2025/NQ-CP · Luật 71/2025/QH15
Hệ thống GVI Network được xây dựng trên nền tảng Bicrypto Exchange v6.5.2 — một kiến trúc fullstack chuyên biệt cho sàn giao dịch tài sản kỹ thuật số, hoạt động tại domain goldvninvest.online. Hệ thống được thiết kế theo cấu trúc mô-đun hóa hoàn toàn (Modular Monorepo) với khả năng tích hợp Smart Contract, tuân thủ pháp lý Việt Nam và tiêu chuẩn quốc tế.
Hành lang pháp lý từ Nghị quyết 05/2025/NQ-CP và Luật 71/2025/QH15 đặt ra các yêu cầu bắt buộc mà hệ thống GVI đang triển khai:
| Yêu cầu Pháp lý | Trạng thái Hệ thống GVI | Mô-đun |
|---|---|---|
| eKYC/Định danh điện tử | ✅ Đã có (kycApplication, kycLevel) |
KYC Module |
| AML / Chống rửa tiền | ✅ Đã có (amlScreening, transactionMonitoring) |
Compliance |
| 1 tài khoản / nhà đầu tư | ✅ Unique constraint trên (userId, currency, type) |
Wallet |
| Lưu ký tách biệt | ✅ ecosystemCustodialWallet vs ecosystemMasterWallet |
Custody |
| Nhật ký 10 năm | ✅ walletAuditLog, auditLog, transaction (paranoid) |
Audit |
| Bảo mật Cấp 4 | 🔄 Đang triển khai (JWT RSA-256, Session tracking) | Security |
| Thuế tự động | 🔄 Cần phát triển thêm Tax Calculator Engine | Tax Module |
| Circuit Breaker | 🔄 Cần phát triển emergencyPause contract |
Smart Contract |
┌─────────────────────────────────────────────────────────────────────┐
│ PRODUCTION STACK │
├─────────────────────────────────────────────────────────────────────┤
│ Frontend │ Next.js 16.1.6 · React 19.1.1 · TypeScript 5.9 │
│ │ Tailwind CSS 4 · Radix UI · Zustand · SWR │
│ │ Port: 3000 (PM2 fork mode) │
├─────────────────────────────────────────────────────────────────────┤
│ Backend │ Node.js · TypeScript 5.9 · uWebSockets.js (v20.51.0) │
│ │ Sequelize 6 · MySQL2 · BullMQ / Bull │
│ │ Redis (ioredis) · PM2 fork mode · Port: 4000 │
├─────────────────────────────────────────────────────────────────────┤
│ Database │ MySQL (Sequelize ORM, paranoid soft-delete) │
│ │ ScyllaDB (time-series, monitoring) │
│ │ Redis (cache, pub/sub, session, rate-limit) │
├─────────────────────────────────────────────────────────────────────┤
│ Infra │ Nginx (SSL/TLS · HTTP/2 · gzip · security headers) │
│ │ Let's Encrypt · PM2 process manager │
│ │ pnpm workspaces (monorepo) │
├─────────────────────────────────────────────────────────────────────┤
│ Web3 │ viem 2.54 · wagmi 2.19 · @reown/appkit 1.8.15 │
│ │ ethers 6.17 · bitcoinjs-lib · @solana/web3.js │
│ │ tonweb · tronweb · CCXT 4.5 │
└─────────────────────────────────────────────────────────────────────┘
/var/app/public_html/
├── backend/
│ ├── src/
│ │ ├── ecosystem/ ← Bootstrap ecosystem, VNF routes
│ │ ├── dex/ ← DEX event listener, providers, services
│ │ └── futures/ ← Futures engine
│ ├── models/
│ │ ├── exchange/ ← Spot trading markets & orders
│ │ ├── finance/ ← Wallet, Transaction, GIV token
│ │ ├── kyc/ ← KYC/AML compliance stack
│ │ ├── system/ ← AuditLog, Session, Settings
│ │ ├── investment/ ← Investment plans & durations
│ │ └── ext/ ← Extensions: P2P, NFT, ICO, Staking,
│ │ ├── ecosystem/ ← Blockchain, Token, DEX orders
│ │ ├── ico/ ← ICO/ITO token offering
│ │ ├── nft/ ← NFT marketplace
│ │ ├── p2p/ ← P2P trading
│ │ ├── staking/ ← Staking pools
│ │ ├── lending/ ← DeFi Lending
│ │ ├── futures/ ← Perpetual futures
│ │ ├── copy-trading/ ← Copy trading
│ │ ├── trading-bot/ ← AI Trading bots
│ │ ├── forex/ ← Forex investment plans
│ │ └── gateway/ ← Payment gateway (merchant)
├── frontend/
│ └── app/[locale]/
│ ├── trade/ ← Spot trading UI
│ ├── dex/ ← DEX swap UI
│ ├── finance/ ← Wallet management
│ ├── investment/ ← Investment plans
│ ├── forex/ ← Forex trading
│ ├── gov/ ← Governance voting
│ ├── market/ ← Market overview
│ └── (dashboard)/ ← Admin dashboard
└── nginx-goldvninvest.conf ← Production Nginx config
Hệ thống sử dụng JWT RS256 (RSA-256 với private/public key pair) cùng module loginSession theo dõi phiên đăng nhập đa thiết bị:
WEB | MOBILE_IOS | MOBILE_ANDROID | API | UNKNOWN{city, country, lat, lng}), Device IDHệ thống KYC được thiết kế dạng phân cấp (kycLevel) với số cấp linh hoạt, mỗi cấp định nghĩa bộ trường yêu cầu và tính năng mở khóa tương ứng:
Level 1 (Basic) → Email/SĐT xác thực, CMND/CCCD ảnh
Level 2 (Intermediate) → Video selfie, địa chỉ thường trú
Level 3 (Advanced) → eKYC tích hợp dịch vụ bên thứ ba (serviceId)
Luồng xét duyệt KYC (kycApplication):
PENDING → APPROVED / REJECTED / ADDITIONAL_INFO_REQUIRED
(userId, levelId) — đảm bảo 1 người dùng chỉ có 1 hồ sơ KYC mỗi cấpuser:{id}:profile) sau mỗi thay đổi trạng thái KYCkycDocument — quản lý chứng từ theo hồ sơkycVerificationResult — lưu kết quả từ dịch vụ thứ baamlScreening)Tích hợp nhà cung cấp bên thứ ba (Chainalysis, ComplyAdvantage, v.v.):
| Trường | Mô tả |
|---|---|
screeningType |
INITIAL (onboarding) / PERIODIC (định kỳ) / TRIGGERED (kích hoạt) |
status |
CLEAR / FLAGGED / REVIEW_REQUIRED |
riskScore |
Điểm rủi ro 0–100 |
matches |
Danh sách kết quả khớp từ nhà cung cấp AML |
rawResponse |
Lưu toàn bộ phản hồi gốc để kiểm toán |
transactionMonitoring)Engine giám sát giao dịch theo thời gian thực:
| Trường | Mô tả |
|---|---|
riskScore |
Điểm rủi ro 0–100 (phạm vi tuân thủ) |
flags |
Mảng mã cờ vi phạm được kích hoạt |
status |
PENDING → REVIEWED / ESCALATED / CLEARED |
reviewedBy |
UUID admin phụ trách xem xét |
blacklistEntry — Danh sách đen địa chỉ/người dùngcomplianceAlert — Cảnh báo tuân thủ tự độngĐiều 6/7 NQ-05 (1 tài khoản / NĐT)
└─→ DB Unique: wallet(userId, currency, type)
└─→ KYC unique: kycApplication(userId, levelId)
Điều 15 NQ-05 (Lưu ký tách biệt)
└─→ ecosystemMasterWallet ↔ ecosystemCustodialWallet
└─→ wallet.type = FIAT | SPOT | ECO | FUTURES | COPY_TRADING | DEX
Điều 5 NQ-05 (Bảo chứng tài sản thực - RWA)
└─→ icoTokenDetail.useOfFunds (JSON - phân bổ sử dụng vốn)
└─→ icoTokenDetail.links.whitepaper (Bản cáo bạch on-chain hash)
Model wallet hỗ trợ 6 loại ví với độ chính xác 36 chữ số thập phân 18 số (DECIMAL(36,18)):
| Loại ví | Mục đích |
|---|---|
FIAT |
Tiền pháp định (VND, USD) |
SPOT |
Giao dịch spot (thị trường) |
ECO |
Blockchain nội bộ (Ecosystem) |
FUTURES |
Giao dịch hợp đồng tương lai |
COPY_TRADING |
Copy trading |
DEX |
LP positions trên DEX |
O(1) Address Lookup: Mỗi ví có addressLookupKey (SHA256 hash của địa chỉ blockchain chính) — chỉ mục duy nhất cho truy vấn ngược siêu nhanh.
ecosystemMasterWallet (ví vận hành của sàn GVI)
└─→ ecosystemCustodialWallet[] (ví khách hàng, mỗi user 1 ví riêng)
├── address: string (địa chỉ blockchain duy nhất)
├── chain: string (ETH, BTC, BSC, SOL, TRON, TON...)
├── network: mainnet | testnet
└── status: ACTIVE | INACTIVE | SUSPENDED
Kiến trúc này đảm bảo hoàn toàn tách biệt tài sản giữa quỹ khách hàng và quỹ vận hành sàn — tuân thủ đúng Điều 15 Nghị quyết 05/2025/NQ-CP.
walletAuditLog là bảng append-only, immutable ghi lại mọi biến động số dư:
Thao tác được ghi: WALLET_CREATED | CREDIT | DEBIT | HOLD | RELEASE
TRANSFER_OUT | TRANSFER_IN | EXECUTE_FROM_HOLD
wallet để tránh deadlock khi audit log được ghi song song với transaction đang xử lýpreviousBalance, newBalance, previousInOrder, newInOrder — đảm bảo toàn bộ lịch sử số dư có thể tái dựngtransaction hỗ trợ 35+ loại giao dịch bao gồm:
DEPOSIT / WITHDRAW | TRANSFER | PAYMENT | REFUND
EXCHANGE_ORDER | FUTURES_ORDER | BINARY_ORDER
STAKING / STAKING_REWARD | P2P_TRADE | NFT_PURCHASE / NFT_SALE
ICO_CONTRIBUTION | FOREX_INVESTMENT | REFERRAL_REWARD
GIV_UNLOCK / GIV_DISTRIBUTE | AI_INVESTMENT
Trạng thái giao dịch: PENDING → COMPLETED / FAILED / CANCELLED / EXPIRED / REJECTED / REFUNDED / FROZEN / PROCESSING / TIMEOUT
exchangeMarket): Các cặp giao dịch (BTC/USDT, ETH/VND...)exchangeOrder): Lệnh đặt mua/bán với Order Matching EngineexchangeCurrency): Quản lý tiền tệ và tỷ giáexchangeWatchlist): Danh mục theo dõi cá nhân hóaHệ thống DEX nội bộ với hợp đồng LiquidityPool và DEXOrderBook:
ecosystemMarket — Thị trường DEX:
poolAddress → Địa chỉ LiquidityPool contract
orderBookAddress → Địa chỉ DEXOrderBook contract
dexEnabled → Bật/tắt DEX cho từng cặp giao dịch
reserveToken0 → Cache reserve token cơ sở (đồng bộ từ chain)
reserveToken1 → Cache reserve token trích dẫn
dexOrder — Quản lý lệnh DEX:
Vòng đời: PENDING_CHAIN → OPEN → PARTIALLY_FILLED → FILLED / CANCELLED
Loại lệnh: MARKET | LIMIT
Hướng: BUY | SELL
ecosystemToken — Registry token blockchain:
contractType: PERMIT | NO_PERMIT | NATIVE
chain: ETH | BSC | POLYGON | SOLANA | TRON | TON...
ecosystemBlockchain — Danh sách blockchain được hỗ trợ.
liquidityPosition — Vị thế cung cấp thanh khoản LP.
ecosystemPrivateLedger — Sổ cái nội bộ ecosystem.
ecosystemUtxo — Quản lý UTXO cho Bitcoin/UTXO-based chains.
futuresMarket: Thị trường futures với funding ratefuturesPosition: Vị thế đòn bẩy (long/short)futuresOrder: Lệnh mở/đóng vị thếfuturesFundingRate: Lãi suất funding định kỳfuturesLiquidation: Ghi nhận thanh lý vị thếfuturesAccount: Tài khoản futures tách biệtp2pOffer / p2pTrade: Quản lý lệnh và giao dịch P2Pp2pDispute: Giải quyết tranh chấpp2pPaymentMethod: Phương thức thanh toán (VND Bank, e-wallet)p2pReview: Đánh giá người dùngp2pCommission: Phí hoa hồng sànbinaryMarket, binaryOrderforexPlan, forexInvestment, forexSignalforexAccount với forexAccountSignalcopyTradingLeader), nhân bản giao dịch (copyTradingTrade), phân bổ vốn (copyTradingFollowerAllocation)tradingBotStrategy), tài khoản thực nghiệm (tradingBotPaperAccount), thống kê hiệu suất (tradingBotStats)stakingPool), vị thế stake (stakingPosition), ghi nhận lợi tức (stakingEarningRecord)lendingPool), khoản vay (lendingLoan), thanh lý (lendingLiquidation), ghi lãi (lendingInterestRecord)icoTokenDetail chứa đầy đủ thông tin phát hành token:
{
totalSupply: DECIMAL(36, 8), // Tổng cung
tokensForSale: DECIMAL(36, 8), // Số token chào bán
salePercentage: DECIMAL(5, 2), // % chào bán (0–100)
blockchain: string, // Nền tảng blockchain
description: TEXT, // Mô tả dự án
useOfFunds: JSON, // Phân bổ sử dụng vốn (Mẫu cáo bạch)
links: {
whitepaper: string, // Hash/Link bản cáo bạch on-chain
github, telegram, twitter...
}
}
icoTokenOffering → icoTokenOfferingPhase[] (các vòng huy động)
→ icoTokenVesting (lịch mở khóa token)
→ icoTokenVestingRelease (sự kiện phát hành token)
→ icoTransaction (giao dịch đóng góp)
→ icoRoadmapItem (lộ trình dự án on-chain)
→ icoTeamMember (thông tin đội ngũ)
→ icoLaunchPlan (kế hoạch phát hành)
Theo Điều 5 NQ-05/2025, mọi tài sản mã hóa phải bảo chứng bằng tài sản thực:
useOfFunds (JSON): Lưu cấu trúc phân bổ vốn đầu tư vào tài sản thực (bất động sản, vàng, hàng hóa...)links.whitepaper: URL/Hash bản cáo bạch (Mẫu 01) lưu on-chain, nhà đầu tư truy cập minh bạchicoBlockchain: Xác định blockchain triển khai smart contract RWAHệ thống NFT đầy đủ cho tài sản kỹ thuật số:
nftToken, nftCollection, nftListing, nftSale, nftBidnftFractional — NFT phân đoạn (Fractional NFT)nftRoyalty — Quản lý bản quyền tự độngnftDispute — Giải quyết tranh chấp NFTGIV là token quản trị nội bộ của GVI Network với cơ chế giá được xác định qua cơ chế đồng thuận validator:
givValidator — Mạng lưới Validator định giá GIV:
{
userId: UUID, // FK → user (1 validator / user)
walletAddress: string, // Địa chỉ ví blockchain validator
shares: DECIMAL(36, 8), // Số lượng GIV share (quyết định trọng số vote)
isActive: boolean, // Trạng thái đủ điều kiện vote
lastVotePrice: DECIMAL, // Giá GIV đề xuất cuối (tính theo VNL)
lastVoteAt: Date, // Thời điểm vote cuối
}
givPriceHistory — Lưu trữ lịch sử giá đã được đồng thuận:
{
priceVnl: DECIMAL(36, 18), // Giá GIV tính bằng VNL (đã xác nhận)
totalShares: DECIMAL(36, 8), // Tổng shares tham gia vòng định giá
validatorCount: INTEGER, // Số validator đã vote
aggregatedBy: UUID, // Admin/hệ thống kích hoạt tổng hợp
onChainTx: string, // Hash giao dịch blockchain xác nhận giá
}
{
unlockRate: DECIMAL(8, 6), // Alpha — hệ số mở khóa GIV / VNL volume
maxDailyUnlock: DECIMAL, // Giới hạn GIV/user/ngày (NULL = không giới hạn)
effectiveFrom: Date, // Thời điểm cấu hình có hiệu lực
}
givUnlockLog — Ghi nhận từng sự kiện mở khóa GIV.
Trang /gov cung cấp giao diện governance voting cho cộng đồng validator.
auditLog — Nhật ký kiểm toán toàn diện, bao phủ tất cả module:
Module: USER | FINANCE | EXCHANGE | P2P | NFT | STAKING
KYC | LENDING | FUTURES | SUBSCRIPTION | ADMIN
Trường: userId, module, action, resourceType, resourceId
previousValue (JSON), newValue (JSON)
ip, userAgent, sessionId, metadata, createdAt
Index tối ưu hóa:
(module, resourceType, resourceId) — Truy vấn theo tài nguyên(userId, createdAt) — Lịch sử hoạt động người dùng(createdAt) — Báo cáo theo thời gianwalletAuditLog — Append-only, không xóa được, ghi mọi biến động số dư:
(previousBalance, newBalance, previousInOrder, newInOrder)Các module chuyên biệt có bảng audit riêng:
apiKeyAuditLog — Nhật ký sử dụng API keycopyTradingAuditLog — Hoạt động copy tradingtradingBotAuditLog — Hoạt động trading botp2pActivityLog, p2pAdminActivity — Hoạt động P2PstakingAdminActivity — Quản trị staking poolicoAdminActivity — Quản trị ICO/ITOTheo yêu cầu tại Luật 71/2025/QH15 — mọi giao dịch, nhật ký phiên, lịch sử IP phải được lưu trữ tối thiểu 10 năm.
Cấu trúc đảm bảo:
paranoid: true — soft-delete, không mất dữ liệuloginSession lưu ip, location (Geo-IP), deviceType, userAgentuserActivity (backend/models/system/userActivity.ts) theo dõi hành vi người dùngnginx-goldvninvest.conf cấu hình chuẩn bảo mật:
# Security Headers (triển khai hiện tại):
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains (HSTS)
# Routing:
/api → 127.0.0.1:4000 (Backend Node.js + WebSocket upgrade)
/ → 127.0.0.1:3000 (Frontend Next.js)
/uploads → Static assets backend
/edit → /frontend/public/edit (Editor UI)
Process: backend → backend/dist/index.js (PORT 4000, fork mode)
Process: frontend → next start (PORT 3000, fork mode)
rateLimitRule (backend/models/system/rateLimitRule.ts) — Cấu hình giới hạn tốc độ API linh hoạt theo endpoint, role và IP.
Để sẵn sàng cho thẩm định Bộ Công an (tiêu chuẩn an toàn thông tin Cấp độ 4 theo TCVN 11930:2017):
| Hạng mục | Trạng thái | Hành động Cần thiết |
|---|---|---|
| HTTPS/TLS 1.3 | ✅ Let's Encrypt + HSTS | Nâng lên TLS 1.3 only |
| JWT RS256 | ✅ RSA-256 private/public key | Đã triển khai |
| Session management | ✅ loginSession multi-device |
Thêm concurrent session limit |
| Input validation | ✅ AJV schema + Sequelize validate | Đã triển khai |
| Audit log bất biến | ✅ walletAuditLog append-only |
Đã triển khai |
| Penetration testing | 🔄 Chưa thực hiện | Thuê đơn vị kiểm tra độc lập |
| WAF (Web App Firewall) | 🔄 Chưa có | Tích hợp Nginx ModSecurity / Cloudflare |
| DDoS Protection | 🔄 Rate limit cơ bản | Tích hợp Cloudflare DDoS protection |
| Data encryption at rest | 🔄 Chưa có | Mã hóa MySQL tablespace |
| HSM/KMS cho private keys | 🔄 Chưa có | Triển khai HashiCorp Vault hoặc AWS KMS |
Dựa trên phân tích hệ thống hiện tại và yêu cầu Nghị quyết 05/2025/NQ-CP, các Smart Contract sau cần phát triển thêm để hoàn thiện tính pháp lý:
Đáp ứng Luật 71/2025/QH15 — nghĩa vụ khai thuế tài sản số
Đề xuất triển khai:
// backend/src/tax/TaxCalculatorEngine.ts
interface TaxEvent {
transactionId: string;
userId: string;
transactionType: "SPOT" | "FUTURES" | "P2P" | "NFT" | "ICO";
amount: number; // Giá trị giao dịch (VND)
acquisitionCost: number; // Chi phí mua ban đầu
timestamp: Date;
}
interface TaxResult {
taxableAmount: number; // Giá trị chịu thuế
taxRate: number; // Thuế suất áp dụng (% theo Luật 71)
taxAmount: number; // Số thuế phải nộp
taxType: "CAPITAL_GAIN" | "TRANSFER";
}
Tích hợp vào luồng giao dịch:
[Khớp lệnh / NFT Sale / P2P Trade]
→ TaxCalculatorEngine.calculate(event)
→ Ghi taxEvent vào transaction.metadata
→ Tự động khấu trừ nếu cơ chế withholding tax
→ Tổng hợp định kỳ → TaxReport (PDF/XML chuẩn Tổng cục Thuế)
Tích hợp thanh toán VND on-chain (kết nối ngân hàng thương mại):
// Giao diện IVNDGateway.sol
interface IVNDGateway {
function depositVND(address user, uint256 amount, string calldata bankRef) external;
function withdrawVND(address user, uint256 amount, string calldata bankAccount) external;
function balanceOf(address user) external view returns (uint256);
event VNDDeposited(address indexed user, uint256 amount, string bankRef);
event VNDWithdrawn(address indexed user, uint256 amount, string bankAccount);
}
Cơ chế ngắt khẩn cấp theo Điều kiện thí điểm 5 năm (yêu cầu từ Bộ Tài chính):
// EmergencyCircuitBreaker.sol
contract EmergencyCircuitBreaker is Ownable, AccessControl {
bytes32 public constant REGULATOR_ROLE = keccak256("REGULATOR_ROLE");
bool public globalPaused;
mapping(address => bool) public tokenPaused; // Tạm dừng từng token
modifier notPaused(address token) {
require(!globalPaused, "Platform globally paused");
require(!tokenPaused[token], "Token trading suspended");
_;
}
// Bộ Tài chính / GVI Admin có thể kích hoạt
function pauseToken(address token) external onlyRole(REGULATOR_ROLE) {
tokenPaused[token] = true;
emit TokenPaused(token, msg.sender, block.timestamp);
}
function pauseAll() external onlyRole(REGULATOR_ROLE) {
globalPaused = true;
emit GlobalPaused(msg.sender, block.timestamp);
}
function unpauseToken(address token) external onlyRole(REGULATOR_ROLE) {
tokenPaused[token] = false;
}
}
// InvestorWhitelist.sol
contract InvestorWhitelist is AccessControl {
bytes32 public constant KYC_OPERATOR = keccak256("KYC_OPERATOR");
enum InvestorType { DOMESTIC, FOREIGN }
struct Investor {
bool isWhitelisted;
InvestorType investorType;
uint8 kycLevel; // 1, 2, 3
string amlStatus; // "CLEAR", "FLAGGED"
uint256 approvedAt;
uint256 expiresAt; // Tái xác thực định kỳ
}
mapping(address => Investor) public investors;
event InvestorApproved(address indexed wallet, InvestorType investorType, uint8 kycLevel);
event InvestorRevoked(address indexed wallet, string reason);
function approveInvestor(
address wallet,
InvestorType investorType,
uint8 kycLevel
) external onlyRole(KYC_OPERATOR) {
investors[wallet] = Investor({
isWhitelisted: true,
investorType: investorType,
kycLevel: kycLevel,
amlStatus: "CLEAR",
approvedAt: block.timestamp,
expiresAt: block.timestamp + 365 days
});
emit InvestorApproved(wallet, investorType, kycLevel);
}
function isEligible(address wallet) external view returns (bool) {
Investor memory inv = investors[wallet];
return inv.isWhitelisted &&
block.timestamp < inv.expiresAt &&
keccak256(bytes(inv.amlStatus)) == keccak256(bytes("CLEAR"));
}
}
// RWATokenFactory.sol — Phát hành token bảo chứng bằng tài sản thực
contract RWATokenFactory {
struct RWAMetadata {
string prospectusCID; // IPFS CID của Bản cáo bạch (Mẫu 01)
string assetDescription; // Mô tả tài sản thực bảo chứng
uint256 totalRealAssetValue; // Tổng giá trị tài sản thực (VND)
address auditor; // Địa chỉ kiểm toán viên độc lập
uint256 auditedAt; // Thời điểm kiểm toán
}
mapping(address => RWAMetadata) public tokenMetadata;
event RWATokenDeployed(
address indexed tokenAddress,
string prospectusCID,
uint256 totalRealAssetValue
);
}
[ ] Tax Calculator Engine
└─ Tích hợp vào transaction hook
└─ Báo cáo thuế tự động (định dạng XML Tổng cục Thuế)
└─ Withholding tax tự động khi khớp lệnh
[ ] Emergency Circuit Breaker
└─ Deploy EmergencyCircuitBreaker.sol
└─ Tích hợp REGULATOR_ROLE cho Bộ Tài chính
└─ Admin UI để kích hoạt/hủy tạm dừng
[ ] InvestorWhitelist Smart Contract
└─ Sync từ DB (kycApplication.status = APPROVED) → on-chain whitelist
└─ Tái xác thực tự động (365 ngày)
[ ] Bảo mật Cấp 4
└─ Thuê đơn vị pentest độc lập
└─ Tích hợp WAF (Nginx ModSecurity)
└─ Mã hóa dữ liệu nhạy cảm at-rest
└─ HSM/KMS cho private keys ecosystem
[ ] VNDStableCoin Gateway
└─ Kết nối API ngân hàng thương mại (Vietcombank, BIDV, MBBank)
└─ Tích hợp NAPAS/IBFT cho chuyển khoản nội địa
[ ] RWATokenFactory
└─ Chuẩn ERC-1400 / ERC-3643 (Security Token Standard)
└─ Tích hợp IPFS cho Bản cáo bạch on-chain
└─ Oracle giá tài sản thực (Chainlink / dịch vụ nội địa)
[ ] DeFi Lending nâng cao
└─ Collateral là RWA token
└─ Tích hợp với circuit breaker
[ ] Reporting Dashboard
└─ Báo cáo định kỳ cho Bộ Tài chính
└─ Thống kê AML tự động
└─ Export báo cáo thuế hàng tháng/năm
[ ] Kết nối GVI Infrastructure
└─ Cổng kết nối sàn GVI (giao dịch nội địa VND)
└─ Tuân thủ API chuẩn GVI
[ ] Cross-border Settlement
└─ Hỗ trợ tài khoản chuyên dùng VND cho nhà đầu tư nước ngoài
└─ FX settlement tự động
[ ] Governance On-chain
└─ DAO voting cho thay đổi thông số hệ thống
└─ GIV validator vote hoàn toàn on-chain
┌──────────────┐ ┌───────────────────┐ ┌─────────────────┐
│ Nhà đầu tư │────▶│ eKYC Onboarding │────▶│ AML Screening │
│ (User) │ │ kycApplication │ │ amlScreening │
└──────────────┘ └───────────────────┘ └────────┬────────┘
│ CLEAR
▼
┌───────────────────────────────────────────────┐
│ InvestorWhitelist (On-chain) │
│ Địa chỉ ví → Được phép giao dịch │
└──────────────────────┬────────────────────────┘
│
┌────────────────────────▼──────────────────────────┐
│ Order Matching Engine │
│ CEX Spot / DEX Swap / Futures / P2P / NFT │
└────────────────────────┬──────────────────────────┘
│ Khớp lệnh
┌──────────────────────────────┼──────────────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌─────────────────────┐ ┌──────────────────┐
│ Wallet Update │ │ Tax Calculator │ │ AuditLog Write │
│ walletAuditLog │ │ Engine (Roadmap) │ │ (Immutable) │
│ (append-only) │ │ Khấu trừ Thuế tự │ │ auditLog │
└──────────────────┘ │ động theo Luật 71 │ └──────────────────┘
└─────────────────────┘
│
▼
┌───────────────────────────┐
│ Transaction Monitoring │
│ transactionMonitoring │
│ Risk Score Evaluation │
└─────────────┬─────────────┘
│ Flagged
▼
┌───────────────────────────┐
│ Compliance Alert │
│ Escalation → Admin │
└───────────────────────────┘
GVI Platform Wallet (Hot Wallet)
ecosystemMasterWallet
├── chain: "ETH" address: 0xGVI_ETH_MASTER
├── chain: "BTC" address: bc1qGVI_BTC_MASTER
└── chain: "BSC" address: 0xGVI_BSC_MASTER
│ (1-to-many, tách biệt hoàn toàn)
▼
Customer Custodial Wallets
ecosystemCustodialWallet[]
├── User_001: 0xUser001_ETH ← Độc lập, sàn không trộn lẫn
├── User_002: 0xUser002_ETH
└── User_N: 0xUserN_ETH
Platform FIAT Wallet (Internal Ledger)
wallet(userId, currency="VND", type="FIAT")
└── Kết nối ngân hàng chuyên dùng (VND Gateway)
| Module | Model | Bảng DB |
|---|---|---|
| User | user, userBlock |
user, user_block |
| Finance | wallet, transaction, currency, walletAuditLog |
wallet, transaction... |
| Finance/GIV | givPriceHistory, givUnlockConfig, givUnlockLog, givValidator |
giv_* |
| KYC/AML | kycApplication, kycLevel, kycDocument, amlScreening, transactionMonitoring, blacklistEntry, complianceAlert |
kyc_*, aml_* |
| Exchange | exchange, exchangeMarket, exchangeOrder, exchangeCurrency |
exchange_* |
| Ecosystem | ecosystemToken, ecosystemBlockchain, ecosystemMarket, ecosystemMasterWallet, ecosystemCustodialWallet, ecosystemPrivateLedger, ecosystemUtxo, dexOrder, liquidityPosition |
ecosystem_*, dex_order |
| ICO | icoTokenDetail, icoTokenOffering, icoTokenOfferingPhase, icoTokenVesting, icoTransaction, icoRoadmapItem |
ico_* |
| NFT | nftToken, nftCollection, nftListing, nftSale, nftBid, nftFractional, nftRoyalty |
nft_* |
| Staking | stakingPool, stakingPosition, stakingEarningRecord |
staking_* |
| P2P | p2pOffer, p2pTrade, p2pDispute, p2pPaymentMethod |
p2p_* |
| Lending | lendingPool, lendingLoan, lendingDeposit, lendingLiquidation |
lending_* |
| Futures | futuresMarket, futuresPosition, futuresOrder, futuresFundingRate |
futures_* |
| Copy Trading | copyTradingLeader, copyTradingFollower, copyTradingTrade |
copy_trading_* |
| Trading Bot | tradingBot, tradingBotStrategy, tradingBotTrade, tradingBotStats |
trading_bot_* |
| Forex | forexPlan, forexInvestment, forexSignal, forexAccount |
forex_* |
| Investment | investmentPlan, investment, investmentDuration |
investment_* |
| Gateway | gatewayMerchant, gatewayPayment, gatewayPayout, gatewayRefund |
gateway_* |
| System | auditLog, loginSession, settings, rateLimitRule, userActivity, notification |
audit_log, login_session... |
| Tiêu chuẩn | Áp dụng cho |
|---|---|
| Nghị quyết 05/2025/NQ-CP | Toàn bộ hệ thống GVI — hành lang pháp lý chính |
| Luật 71/2025/QH15 | Nghĩa vụ thuế, công nhận tài sản số |
| TCVN 11930:2017 | An toàn thông tin Cấp độ 4 (Bộ Công an) |
| FATF Recommendations | AML/CFT — Sàng lọc rủi ro khách hàng |
| ISO 27001 | Quản lý an toàn thông tin |
| ERC-1400 / ERC-3643 | Chuẩn Security Token cho RWA |
| GDPR (tham khảo) | Bảo vệ dữ liệu cá nhân nhà đầu tư |
Tài liệu này phản ánh trạng thái hệ thống GVI Network tại thời điểm kiểm tra và được cập nhật theo tiến trình phát triển. Mọi thay đổi kiến trúc quan trọng cần được ghi vào Changelog và thông qua quy trình Code Review.