TrustVault Contract
The TrustVault contract manages the protocol’s liquidity pool, handling staking, borrowing, and yield distribution.Overview
Contract Address
- Mainnet
- Testnet
Interface
Data Structures
Key Functions
deposit
Stake USDC and receive tmUSDC shares.amount: Amount of USDC to deposit (6 decimals)
shares: Amount of tmUSDC shares received
borrow
Borrow USDC based on Trust Score.amount: Amount of USDC to borrowduration: Loan duration in seconds
- Caller must have sufficient Trust Score
- Amount must not exceed borrowing limit
- Vault must have sufficient liquidity
repay
Repay an active loan.loanId: ID of the loan to repay
- Caller must be the borrower
- Loan must be active
- Caller must have approved sufficient USDC
Interest Rate Model
The vault uses a utilization-based interest rate:Security
Access Control
Emergency Functions
Events
Monitor contract activity by subscribing to events:View on GitHub
Full source code