Getting Started

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

  1. 1Setting up an Ethereum Development Environment
  2. 2Supplying Assets to the CapyFi Protocol
  3. 3Borrowing Assets from the CapyFi Protocol
  4. 4Create a CapyFi API with Infura
  5. 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

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.

caTokencaToken DecimalsUnderlyingUnderlying Decimals
caUXD8UXD18
caETH8ETH18
caLAC8LAC18
caWBTC8WBTC8
caUSDT8USDT6
caUSDC8USDC6
caRPC8RPC18
caWARS8WARS18
caWLD8WLD18
caWETH8WETH18