Service: Integrated Wallet Solution (Hybrid RWA Wallet)
The Integrated Wallet Solution gives an Investor one interface for fiat balances and on-chain RWA tokens. It connects MPC custody providers, fiat transfer providers, and compliance controls.
The intended flow is: KYC User → Fiat/Crypto Funding → Tokenized Investment → Automated Income → Secondary Liquidity → DeFi Collateral → Secure Custody.
The solution provides:
Compliance Controls: Applies KYC/AML status and asset-level rules, including rules used by EIP-3643 contracts, to wallet operations.
Custody Security: Uses MPC custody with monitoring and the documented security practices.
Unified Access: Allows users to manage fiat balances, stablecoins, native tokens, and tokenized RWAs in one interface.
Contract Operations: Supports RWA contract operations such as distributions and governance where the contract implements them.
Transaction Interface: Presents on-chain balances and transaction steps in the wallet interface. Provider capabilities may add account recovery or sponsored transactions.
Core Technical Components & APIs
This engine manages both off-chain and on-chain financial records and interacts with multiple external systems.
Primary Models:
Wallet Model: The core record for the user's fiat balance ledger.
FundingSource Model: Represents linked external bank accounts.
Transaction Model: The immutable ledger for all fiat movements.
Crypto Wallet Model: Represents the user's linked on-chain address.
EVM Transfer Model: Records on-chain token movements.
Profile Model: Links wallets and Crypto Wallets to the verified investor.
Governing Logic:
Wallet Status Lifecycle: Manages the verification state of the fiat wallet.
Investment Funding Status Lifecycle & Transaction Status Lifecycle & EVM Transfer Status Lifecycle: Track the state of fiat/crypto transfers.
Primary APIs:
wallet-api: Exposed by this service to manage fiat wallets, funding sources, and initiate transfers (deposits, withdrawals).
evm-api: Used to query blockchain data (native balances, token holdings) associated with the user's Crypto Wallet.
payment-api: Manages the investment payment process.
Consumed APIs: Dwolla API (for fiat wallet creation, transfers), Plaid API (for linking bank accounts), Blockchain Node RPC (for querying on-chain data).
The current wallet transaction type vocabulary is deposit, investment, and withdrawal. A business Distribution remains a payout concept owned by the distribution service and is not a wallet transaction type.
Key Capabilities
The engine provides continuous management of the user's financial assets on the platform.
Phase 1: Wallet Provisioning & Management
Creates and maintains the user's fiat and on-chain wallet records.
Automated Fiat Wallet Creation: Automatically creates a fiat wallet via the integrated provider upon successful profile KYC verification.
MPC-Secured Crypto Wallet Integration: Provides interfaces for users to link or create a Crypto Wallet address managed via the integrated MPC custody provider. Handles secure key share generation and storage.
Status Orchestration: Manages the fiat Wallet Status Lifecycle, guiding users through provider-specific verification steps (
error_retry,error_document).Funding Source Linking: Integrates with Plaid (or similar) to allow secure linking of external bank accounts (FundingSource records).
Phase 2: Fund Movement
Handling deposits, withdrawals, and conversions.
Fiat On/Off Ramps: Provides capabilities for initiating fiat deposits ("Load Funds") from linked bank accounts and withdrawals back to those accounts. It creates
depositorwithdrawaltransaction records and manages the persistedinc_balanceandout_balancereservations.Crypto On/Off Ramps (Stablecoins): Facilitates the purchase or sale of stablecoins, orchestrating transfers between the user's linked bank account/fiat wallet and their Crypto Wallet via integrated exchange partners or payment rails.
Balance Calculation & Display: The persisted wallet fields are
balance,inc_balance, andout_balance. The wallet API projectsvirtual_balance,pending_incoming_balance, andpending_outcoming_balance;virtual_balanceisbalance + inc_balance - out_balance. Withdrawal availability usesbalance - out_balance, while wallet-funded investment capacity usesbalance + inc_balance - out_balance. The service fetches real-time crypto balances via the evm-api for display.(Future) Cross-Chain Swaps: May incorporate functionality to facilitate swaps between different types of digital assets across supported blockchains.
Phase 3: Compliant Investment & Distribution Hub
This phase handles the supported funding paths for RWA activity.
Multi-Asset Investment Funding: Exposes functionality for the Investment Process Management engine to fund Investments using:
Fiat wallet balance.
Direct transfer from a linked FundingSource.
Stablecoins held in the user's Crypto Wallet (orchestrating secure signing via MPC and evm-api).
Automated Distribution Handling:
Receives incoming fiat distributions into the user's wallet through the owning payout workflow. The current wallet enum has no
distributionvalue; the payout contract must map the businessDistributionto a supported wallet record.Reflects on-chain distributions (stablecoins or RWA tokens) by querying the evm-api for updated balances in the user's Crypto Wallet.
Phase 4: Programmable Finance
This future phase describes additional token interactions.
(Future) DeFi Collateralization: May provide interfaces or data feeds to allow users to utilize their RWA tokens held in the MPC wallet as collateral in approved third-party DeFi protocols.
(Future) On-Chain Governance: May provide interfaces for users to participate in on-chain voting associated with their RWA token holdings.
Exceptions and Recovery
Transaction Monitoring & Compliance: Integrates with the Regulatory Compliance Engine to perform automated checks (e.g., jurisdictional restrictions, sanctions screening) before allowing certain transfers.
MPC Recovery: Implements secure account recovery mechanisms enabled by the MPC infrastructure (e.g., social recovery, device replacement flows).
Gas Fee Abstraction (ERC-4337): May implement mechanisms to sponsor or abstract gas fees for certain on-chain transactions, improving user experience.
Provider Error Handling: Defines retries and monitoring for interactions with providers such as Dwolla, Plaid, Fireblocks, and blockchain nodes through evm-api.
Transaction Failures/Cancellations: Processes webhooks from Dwolla/NC for failed or cancelled transfers, updating the transaction status and reverting temporary balance changes. Failed or cancelled withdrawals release
out_balance; failed or cancelled deposits releaseinc_balance.Funding Source Issues: Handles scenarios where a linked bank account becomes invalid or removed, preventing its use for future transactions.
Security: Implements security measures related to adding/removing funding sources and initiating withdrawals (potentially integrating with fraud detection services like Sift).