Templar Protocol User Guide
This is a comprehensive user guide for the Templar Protocol smart contracts.
Templar is an overcollateralized lending protocol. Each market is an isolated, immutable smart contract that pairs one collateral asset with one borrow asset. Collateral held on other chains (Bitcoin, Ethereum, Stellar, XRP, Solana, and more) reaches NEAR through NEAR Intents, and curated vaults on Stellar route depositor liquidity into markets.
For definitions of key terms and concepts, refer to the Glossary.
Quick Navigation
- Architecture Overview - How markets, oracles, NEAR Intents, vaults, and services fit together, and the trust assumptions
- Smart Contract Addresses - Official contract addresses and verification
- Risk Parameters - Per-market collateralization ratios, interest curves, fees, and oracle sources
- Deploying a market - Declarative market deployment with
tmplrmgr - Oracles - Pyth and RedStone price feeds, proxy oracles, and circuit breakers
- Protocol Governance - Immutability, administrative controls, multisig, and timelocks
- Stellar Curated Vaults - Shares, fees, withdrawals, caps, and roles for depositors
- Stellar Vault Curator Guide - Deployment, governance, allocation, withdrawals, and keeper operations
- Security - Audits, formal verification, oracle safeguards, monitoring, and operational security
- Security Reporting - Responsible disclosure
- Monitoring and Risk Management - Alerting, the live risk dashboard, and protocol health checks
- Testing and Coverage - Comprehensive test suite documentation
Market Operations
- Market Overview - Core market functionality
- Supply Assets - How to supply assets to earn yield
- Borrow Assets - How to borrow against collateral
- Liquidations - Liquidation mechanisms and procedures
Additional Resources
- Implementation Notes - Technical implementation details
- API Reference - The backend HTTP API, generated Rust API documentation, and the gateway method catalog
- Live risk dashboard - Real-time coverage and liquidation analytics across markets
- Source code - Contracts, services, and tooling