This function sets the rate at which base asset supplier accounts accrue rewards. This function sets the supply interest rate utilization curve kink for the Compound III base asset. This function sets the borrow interest rate utilization curve kink for the Compound III base asset. In addition to supplying, borrowing, and wrapping, the bulker contract can also transfer collateral within the protocol and claim rewards. Accounts can also earn interest by supplying the base asset to the protocol. Successful execution of one of these functions triggers the accrueInterest method, which causes interest to be added to the underlying balance of every supplier and borrower in the market.

Protocol Math

This address has the power to pause supply, transfer, withdraw, absorb, and buy collateral operations within Compound III. This function sets the official contract address of the Compound III protocol pause guardian. This function sets the official contract address of the Compound III protocol Governor for subsequent proposals. It can be viewed at v3-additional-grants.compound-community-licenses.eth when the browser network is set to Ethereum Mainnet. Governance allows the community to propose, vote, and implement changes through the administrative smart contract functions of the Compound III protocol. All contract code and balances are publicly verifiable, and security researchers are eligible for a bug bounty for reporting undiscovered vulnerabilities.

For example, you invested Rs. 5,000 in a fixed deposit that compounds interest monthly with a 10% rate of return. However, while calculating monthly, the variable N/n will be 12 for the number of months, hereby making it number of times interest compounds in a year. Press submit/calculate and the calculator will give you the answer within seconds! The calculator will automatically put in the formula and calculate the Compound Interest for you. On the other hand, using a Compound Interest calculator is easy, reliable, accurate and fast.

Ethers.js v5.x

This function updates the borrow collateral factor for an asset in the protocol. This factor is used to calculate the discount rate of collateral for sale as part of the account absorption process. This function returns a boolean indicating whether or not the protocol’s selling of absorbed collateral functionality is presently paused. This function returns a boolean indicating whether or not the protocol supply functionality is presently paused. Interest rates for each market update on any block in which the ratio of borrowed assets to supplied assets in the market has changed. Identify the three metrics used for calculation; the principal amount, interest rate and the time period of money invested.

Fixed Deposit and Savings Planning

  • The CI is the difference between total amount & principal amount.
  • This is an external contract that is not integral to Comet’s function.
  • These include the Principle Amount you’ve borrowed or mean to borrow, Let’s say Rs. 10,000.
  • Interest accrues for the current block, as well as each prior block in which the accrueInterest method was not triggered (no user interacted with the cToken contract).
  • This function sets the supply interest rate utilization curve kink for the Compound III base asset.

Each time an immutable parameter is set via governance proposal, a new Comet implementation must be deployed by the Comet factory. No one interacts with the cEther contract for 3 Ethereum blocks. The Compound protocol has been reviewed & audited by OpenZeppelin and ChainSecurity. They detail the protocol deployment process, construction of new features, and code examples for implementing external apps that depend on Compound III as infrastructure.

Borrow Collateralization

To generate the proper Comet Interface ABI (CometInterface.sol), compile the Comet project using yarn compile. The v3 proxy is the only address to be used to interact with a Compound III instance. For documentation of the Compound v2 Protocol, see docs.compound.finance/v2. Historical interest rates can be retrieved from the MarketHistoryService API. There is no underlying contract for ETH, so to do this with cETH, set underlyingDecimals to 18. The cToken Exchange Rate is scaled by the difference in decimals between the cToken and the underlying asset.

Market Overview

A Compound Interest calculator is used to calculate the projection for compound growth for your savings account or investment for different periods of time, based upon a certain rate of interest. Withdraw is also used to borrow the base asset from the protocol if the account has supplied sufficient collateral. If the base asset is supplied resulting in the account having a balance greater than zero, the base asset earns interest based on the current supply rate. Compound III is an EVM compatible protocol that enables supplying of crypto assets as collateral in order to borrow the base asset. This function returns the minimum borrow balance allowed in the base asset.

  • This function sets the maximum amount of an asset that can be supplied to the protocol.
  • This function returns a boolean indicating whether or not the protocol’s selling of absorbed collateral functionality is presently paused.
  • The network deployment artifacts with contract addresses are available in the Comet repository deployments/ folder.
  • This function updates the liquidation collateral factor for an asset in the protocol.
  • The address is fixed and independent from future upgrades to the market.
  • In the successive year, due to compound interest, you will earn 1 percent on Rs. 10,100 and not the principal amount of Rs. 10,000, making the total Rs. 10,201, which means CI is Rs. 101.

A return value of false does not necessarily imply that the account is presently liquidatable (see isLiquidatable function). Collateral factors can be fetched using the Get Asset Info By Address function. Supply transactions will revert if the total supply would be greater than this number as a result. The liquidation factor is a decimal value that is between 0 and 1 (inclusive) which determines the amount that is paid out to an underwater account upon liquidation. The methods in CometExt.sol are able to be called via the same proxy as Comet.sol.

Set Supply Interest Rate Slope (Low)

Compound III implements a minimum borrow position size which can be found as baseBorrowMin in the protocol configuration. The withdraw method is used to withdraw collateral that is not currently supporting an open borrow. The first is on behalf of the caller, the second is to a separate account, and the third is for a manager on behalf of an account. An account’s present balance can be calculated using the current index with the following formulas. Account balances are stored internally in Comet as principal values (also signed integers).

For example, let’s say Ankit has Rs. 10,000 in his saving account & he earns 5% interest on it compounded annually, he would simply have to calculate the interest earned every year. Calculating Compound Interest without the formula is a tedious process, as it would have to be calculated as many times as it is compounded for every year & then totaled. This function returns false if an account does not have sufficient liquidity to increase its borrow position. A withdraw transaction to borrow that results in the account’s borrow size being less than the baseBorrowMin will revert.

COMP token-holders designate the Pause Guardian address, which is held by the Community Multi-Sig. This function sets the official contract address of the Comet factory. All instances of Compound III are controlled by the Timelock contract which is the same administrator of the Compound v2 protocol. Compound III is a decentralized protocol that is governed by holders and delegates of COMP.

Interest compounds only during blocks in which the cToken contract has one of the earned income and earned income tax credit eitc tables aforementioned methods invoked. The Compound protocol is based on the Compound Whitepaper (2019); the codebase is open-source, and maintained by the community. Divide 72 by the annual interest rate (in percentage) to get the approximate number of years. However, while calculating annually, the variable N/n will be 1, hereby making it number of times interest compounds in a year.

Building a Governance Interface

Do not interact with this contract directly; instead use the cUSDCv3 proxy address with the Comet Interface ABI. This is the implementation of the market logic contract, as deployed by the Comet Factory via the Configurator. The address is fixed and independent from future upgrades to the market. The network deployment artifacts with contract addresses are available in the Comet repository deployments/ folder. Interest accrues for the current block, as well as each prior block in which the accrueInterest method was not triggered (no user interacted with the cToken contract). See the interest rate data visualization notebook on Observable to visualize which interest rate model is currently applied to each market.

Example 2: Long-term Investment

The online CI calculator is designed to help you align your financial goals & current investments. Our online Compound Interest calculator is built with the best user interface, making it easy to use, speedy & comfortable. The amount invested remains in the fixed deposit uber turbotax discounts andservice codes for 5 years. For this example, let’s say annually, i.e., 1 time a year.

This demonstrates how compound interest generates ₹48,976 in returns over 5 years. Before supplying an asset to Compound III, the caller must first execute the asset’s ERC-20 approve of the Comet contract. Each collateral asset increases the user’s borrowing capacity, based on the asset’s borrowCollateralFactor.

Now use the CI calculator or use the Compound Interest formula to compute the total compound Interest you are liable to pay. Also check how many times in the year is the interest compounded. To calculate Compound Interest, you must know the three parameters required to compute it. In the successive year, due to compound interest, you will earn 1 percent on Rs. 10,100 and not the principal amount of Rs. 10,000, making the total Rs. 10,201, which means CI is Rs. 101. It can be seen as the interest you earn on interest, and thus, contributes to a faster increase rate on the principal amount. Compound Interest is the interest you will receive on a loan or deposit, taking into account the initial amount and the previous interest accumulated over time.

An account’s initial borrow size must be equal to or greater than this value. When an account interacts with the protocol, the indices are updated and saved. This function sets the maximum amount of an asset that can be supplied types of liquidity ratios to the protocol. This function updates the liquidation factor for an asset in the protocol. This function modifies an existing asset’s configuration parameters.