CapyFi Protocol
Introduction to CapyFi
CapyFi is a fork of the Compound v2 protocol, based on the Compound Whitepaper (2019); the codebase is open-source, and maintained by the community.
CapyFi provides enhanced features and improvements over the original Compound v2 protocol while maintaining compatibility with the core architecture.
Key Features
- Enhanced security measures
- Improved gas efficiency
- Better user experience
- Community-driven development
Please join the community to help build applications on top of CapyFi. Your questions help us improve, so please don't hesitate to ask if you can't find what you are looking for here.
Guides
Step-by-step tutorials
- 1Setting up an Ethereum Development Environment
- 2Supplying Assets to the CapyFi Protocol
- 3Borrowing Assets from the CapyFi Protocol
- 4Create a CapyFi API with Infura
- 5Contributing to the Protocol
Networks
Deployed networks
The CapyFi Protocol is currently deployed on the following networks:
You can also see a full list of all deployed contract addresses here.
Protocol Math
The CapyFi protocol contracts use a system of exponential math, ExponentialNoError.sol, in order to represent fractional quantities with sufficient precision.
Most numbers are represented as a mantissa, an unsigned integer scaled by 1 * 10 ^ 18, in order to perform basic math at a high level of precision.
Key Concepts
- Exponential math for precision
- Mantissa representation
- High-precision calculations
- Decimal scaling
caToken and Underlying Decimals
Prices and exchange rates are scaled by the decimals unique to each asset; caTokens are ERC-20 tokens with 8 decimals, while their underlying tokens vary, and have a public member named decimals.
| caToken | caToken Decimals | Underlying | Underlying Decimals |
|---|---|---|---|
| caUXD | 8 | UXD | 18 |
| caETH | 8 | ETH | 18 |
| caLAC | 8 | LAC | 18 |
| caWBTC | 8 | WBTC | 8 |
| caUSDT | 8 | USDT | 6 |
| caUSDC | 8 | USDC | 6 |
| caRPC | 8 | RPC | 18 |
| caWARS | 8 | WARS | 18 |
| caWLD | 8 | WLD | 18 |
| caWETH | 8 | WETH | 18 |