Please join the #development room in the Compound community Discord server; our team, and members of the community, look forward to helping you build an application on top of Compound. Your questions help us improve, so please don't hesitate to ask if you can't find what you are looking for here.


The Compound Protocol is currently deployed on the following networks:


The Compound protocol codebase is hosted on Github, and the source code for each contract is verified on Etherscan.

Exponential Math

The Compound smart contracts use a system of exponential math in order to represent fractional quantities with sufficient precision. Throughout the documentation and code we make reference to mantissas, which are unsigned integers scaled up by a factor of 1e18 from their nominal value. By using mantissas within our contracts, we may perform basic mathematical operations like multiplication and division at a higher resolution than working with the unscaled quantities directly as integers. To gain a better understanding of how this works, see Exponential.sol.

Gas Costs

The gas usage of the protocol functions may fluctuate by market and user. External calls, such as to underlying ERC-20 tokens, may use an arbitrary amount of gas. Any calculations that involve checking account liquidity, have gas costs that increase with the number of entered markets. Thus, while it can be difficult to provide any guarantees about costs, we provide the table below for guidance:

FunctionTypical Gas Cost
Mint< 150K, cDAI < 300k
Redeem, Transfer< 250K if borrowing, otherwise < 90K
Borrow< 300K
Repay Borrow< 90K
Liquidate Borrow< 400K