Architecture overview
BlockFinaX has three layers. Rules live in the contracts; the services make them usable; wallets authorise.
| Layer | Components | Responsibility |
|---|---|---|
| Contracts (Stellar Soroban) | Currency pool, pool oracle | Custody of capital, quote verification, reservation, premium distribution, settlement, payouts, withdrawals |
| Services (BlockFinaX API) | Quote service, pricing engine, market data, chain adapter, fee relayer, oracle job, account service, business account service, routing | Pricing, preparing transactions, paying fees, submitting oracle rates, indexing |
| Wallets | Passkey smart account per user; an OpenZeppelin smart account per business, with member roles; EVM deposit accounts | Authorising every user action |
Protocol map
The protocol map shows how users, contracts, services and funding connect.
Trust boundaries
| The contract enforces | The services provide |
|---|---|
| A quote must be signed by the pricing key, at most 120 s old, used once | The fair price inside the quote (how it is priced) |
| The reserve is fully funded from current backers | Which pool is chosen for a request |
The buyer pays no more than max_cost | The max_cost the buyer agrees to |
| Settlement uses only the oracle's agreed rate | The oracle job that submits rates |
| Only the owner of a position, balance or pool can act on it | Convenience: preparing the call, paying the fee |
The services cannot move a user's funds without that user's passkey, or a business's funds without a member's passkey within that member's role, and every payout follows the contract's rules.
Chains
Stellar is the liquidity hub: all pools, contracts and settlement are there. EVM networks are funding networks: users deposit there and funds are routed to Stellar through Circle CCTP. See Design decisions: one liquidity hub.