Markets
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 to the protocol. This function updates the liquidation factor for an asset in the protocol. This function modifies an existing asset’s configuration parameters.
- We do not authorize any person or organization to conduct trades on behalf of Upstox customers.
- The initial deployment of Compound III is on Ethereum and the base asset is USDC.
- Press submit/calculate and the calculator will give you the answer within seconds!
- 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.
- Each deployment outside of Mainnet needs to have a Bridge Receiver and Local Timelock contract on its chain.
Example 1: Fixed Deposit Investment
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. what you need to know about your 2020 taxes 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.
Withdraw or Borrow
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.
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.
- The v3 proxy is the only address to be used to interact with a Compound III instance.
- An account’s present balance can be calculated using the current index with the following formulas.
- COMP token-holders designate the Pause Guardian address, which is held by the Community Multi-Sig.
- Users can add collateral assets to their account using the supply function.
- This factor is used to calculate the discount rate of collateral for sale as part of the account absorption process.
- This is the implementation of the Configurator contract, which can also be upgraded to support unforeseen changes to the protocol.
Configurator Implementation
The borrowing collateral factors are percentages that represent the portion of collateral value that can be borrowed. This function allows governance to withdraw base token reserves from the protocol and send them to a specified address. This function sets the Comet contract’s ERC-20 allowance of an asset for a manager address. This function updates the liquidation collateral factor for an asset in the protocol. This function updates the price feed contract address for a specific asset.
Set Supply Interest Rate Slope (Low)
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.
How do you calculate Compound Interest monthly?
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.
Borrow Collateralization
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 for 5 years. For this example, let’s say annually, i.e., 1 time a year.
Calculating the APY Using Rate Per Block
Interest compounds only during blocks in which the cToken contract has one of the 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.
It allows accounts to bulk multiple operations into a single transaction. This is an external contract that is not integral to Comet’s function. This is the factory contract capable of producing instances of the Comet implementation/logic contract, and invoked by the Configurator. The configurator find the right overhead ratio for your nonprofit deploys implementations of the Comet logic contract according to its configuration.
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.
ERC-20 Approve Manager Address
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.
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.
For instance, if the borrow collateral factor for WBTC is 85%, an account can borrow up to 85% of the USD value of its supplied WBTC in the base asset. Once the protocol reaches this amount of reserves of base asset, liquidators cannot buy collateral from the protocol. This function sets the rate at which base asset borrower accounts accrue rewards. This function sets the official contract address of the price feed of the protocol base asset. The Compound Interest calculator uses three metrics, the principal amount, interest rate and the time period of money invested, and a mathematical formula, to calculate the Compound Interest. Global indices for supply and borrow are unsigned integers that increase over time to account for the interest accrued on each side.
Collateral can only be added if the market is below its supplyCap, which limits the protocol’s risk exposure to collateral assets. Users can add collateral assets to their account using the supply function. If the WBTC liquidation factor is 0.9, the user will receive $90 of return on common stockholders’ equity ratio explanation formula example and interpretation the base asset when a liquidator triggers an absorption of their account. This function sets the minimum amount of base asset supplied to the protocol in order for accounts to accrue rewards.
