Developers Zone
Fount is built to be composable, auditable, and extendable.
Overview
This section outlines how power users and developers can interact directly with the protocol - whether to integrate with DeFi apps, build analytics dashboards, or automate workflows.
Smart Contract Architecture
Fount is composed of modular smart contracts, following industry standards like ERC-4626. Below are the core components and their roles:
Contract
Purpose
Registry
Manages deployments and component registration (strategies, hooks, assets)
Strategy
Controls portfolio logic and interfaces with off-chain execution
tRWA Token
ERC-4626 vault token representing user shares
Conduit
Handles secure transfer of assets between user and protocol
Reporter
Provides NAV updates and price data
Escrow
Holds deposits temporarily during gated mint or withdrawal windows
Hook
Enforces compliance checks before actions like deposit or withdraw
Key Standards Used
ERC-4626: Vault interface standard for yield-bearing tokens
Minimal Proxy Pattern (EIP-1167): Used for gas-efficient strategy deployments
Role-Based Access Control (RBAC): Prevents unauthorized actions across the protocol
Off-chain Oracle Integration: Reporter contract posts NAV and price feeds
Roles & Access Permissions
Fount uses granular, role-based permissions to gate critical protocol functions:
Role
Permissioned Actions
PROTOCOL_ADMIN
Add/remove assets, hooks, strategies
STRATEGY_ADMIN
Manage strategies and their configuration
STRATEGY_OPERATOR
Pull/push funds from the strategy contract
RULES_ADMIN
Manage hook system for compliance logic
KYC_OPERATOR
Modify allow/deny lists for investors
PRICE_UPDATER
Push NAV updates to vault tokens
🔧 Role Management
All roles are administered via a Role Manager contract. Roles can be granted, revoked, or self-renounced.
Interacting with the Protocol
For developers looking to integrate:
Read NAV and Vault Data
uint256 nav = ITVault(tokenAddress).convertToAssets(userShares);
Deposit Flow
IERC20(USDC).approve(tokenAddress, amount);
ITVault(tokenAddress).deposit(amount, msg.sender);
Redeem Flow
ITVault(tokenAddress).redeem(shares, receiver, owner);
For GatedMintRWA Vaults
bytes32 depositId = IGatedMint(tokenAddress).requestDeposit(amount, receiver);
// Wait for manager approval...
IGatedMint(tokenAddress).mintShares(receiver, amount);
📚 Documentation Resources
See the Fount ABI & Interface repo at https://github.com/SovaNetwork/fountfi for up-to-date contract ABIs and structs.
Compliance Hooks & Extensibility
Hooks enable compliance logic (e.g. KYC, AML, transfer restrictions) to be modular and upgradeable.
Hooks can be added/removed per vault
Operation-specific (e.g., deposit, withdraw, transfer)
Common hooks include KycRulesHook, TransferBlockHook, and WithdrawalQueueHook
🛠️ Custom Development
Developers can write their own hook contracts following the IHook interface and register them via governance.
Integrating tRWA Tokens in DeFi
Because tRWA tokens follow the ERC-4626 interface, they can be integrated into:
Lending markets
Structured products
Tokenized asset managers
Portfolio dashboards (e.g. Zapper, DeBank)
⚠️ Integration Considerations
Be aware that some tRWA tokens are non-transferable or gated by compliance hooks - integration should account for that.
Last updated