Compound Interest Calculator

21 de enero de 2022
0 comentarios

This function pauses the specified protocol functionality in the event of an unforeseen vulnerability. COMP token-holders designate the Pause Guardian address, which is held by the Community Multi-Sig. Each deployment outside of Mainnet needs to have a Bridge Receiver and Local Timelock contract on its chain.

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 cannabis accounting services cannabis bookkeeping within the protocol and claim rewards. Accounts can also earn interest by supplying the base asset to the protocol.

  • The base asset can be borrowed using the withdraw function; the resulting borrow balance must meet the borrowing collateral factor requirements.
  • This is the main proxy contract for interacting with the first Compound III market.
  • 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.
  • This pattern allows significant gas savings for users of the protocol by ‘constantizing’ the parameters of the protocol.
  • This function updates the liquidation collateral factor for an asset in the protocol.

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.

This is used to add additional functionality without requiring contract space in the main protocol contract. 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. This is the main proxy contract for interacting with the first Compound III market.

The Timelock on Mainnet is the administrator of all community sanctioned instances of Compound III. If the proposal is approved by the community, the proxy will point to the new implementation upon execution. The governance system has control over each proxy, the Configurator implementation, the Comet factory, and the Comet implementation. For more information on the Governor and Timelock see the original governance section.

Is Supply Paused

Before supplying an asset to Compound III, the caller must first execute the asset’s ERC-20 approve of the Comet contract. This function sets the Comet contract’s ERC-20 allowance of an asset for a manager address. This function sets the maximum amount of an asset that can be supplied to the protocol.

  • This function modifies an existing asset’s configuration parameters.
  • This is an external contract that is not integral to Comet’s function.
  • All contract code and balances are publicly verifiable, and security researchers are eligible for a bug bounty for reporting undiscovered vulnerabilities.
  • COMP token-holders designate the Pause Guardian address, which is held by the Community Multi-Sig.

An account’s initial borrow size must be equal to or greater than this value. 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. When an account interacts with the protocol, the indices are updated and saved. The borrowing collateral factors are percentages that represent the portion of collateral value that can be borrowed. This function updates the liquidation factor for an asset in 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. Global indices for supply and borrow are unsigned integers that increase over time to account for the interest accrued on each side. Each collateral asset increases the user’s borrowing capacity, based on the asset’s borrowCollateralFactor.

Dividend Returns Calculator

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. This pattern allows significant gas savings for users of the protocol by ‘constantizing’ the parameters of the protocol.

This function sets the supply interest rate slope low bound in the approximate amount of seconds in one year. This function sets the borrow interest rate slope high bound in the approximate amount of seconds in one year. This function sets the borrow interest rate slope low bound in the approximate amount of seconds in one year. This function sets the official contract address of the Comet factory.

Protocol Math

This function sets the supply interest rate slope base in the approximate amount of seconds in one year. This function sets the borrow interest rate slope base in the approximate amount of seconds in one year. This function sets the official contract address of the protocol’s Comet extension delegate. This function returns a boolean indicating whether or not the protocol absorb functionality is presently paused. This function returns a boolean indicating whether or not the protocol withdraw functionality is presently paused.

Comet

This function modifies an existing asset’s configuration parameters. The methods in CometExt.sol are able to be called via the same proxy as Comet.sol. The only addresses that are allowed to call this function are the Governor and the Pause Guardian.

Minimum Borrow Balance

The Compound protocol contracts use a system of exponential math, Exponential.sol, in order to represent fractional quantities with sufficient precision. We believe that size, visibility, and time are the true test for the security of a smart contract; please exercise caution, and make your own determination of security and suitability. All contract code and balances are publicly verifiable, and security researchers are eligible for a bug bounty for reporting undiscovered vulnerabilities. This is a rewards contract which can hold rewards tokens (e.g. COMP, WETH) and allows claiming rewards by users, according to the core protocol tracking indices. This is the implementation of the Configurator contract, which can also be upgraded to support unforeseen changes to the protocol.

All Markets

This function sets the rate at which base asset borrower accounts payable accounting coach accounts accrue rewards. This function sets the official contract address of the price feed of the protocol base asset. Interest rates for each market update on any block in which the ratio of borrowed assets to supplied assets in the market has changed.

This function returns true if the account passed to it has non-negative liquidity based on the borrow collateral factors. The supply function transfers an asset to the protocol and adds it to the account’s balance. Users can add collateral assets to their account using the supply function. 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 supplier accounts accrue rewards. This function sets the supply interest rate utilization curve kink for the Compound III base asset.

An account balance greater than zero indicates the base asset is supplied and a balance less than zero indicates the base asset is borrowed. 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. This function returns the minimum borrow balance allowed in the base asset. This function returns the current balance of a collateral asset for a specified account in the protocol. This function can be used to supply collateral, supply the base asset, or repay an open borrow of the base asset.

Withdraw is also used to borrow the base asset from the protocol how to set up direct deposit for employees 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.

The base asset can be borrowed using the withdraw function; the resulting borrow balance must meet the borrowing collateral factor requirements. Collateral can only be added if the market is below its supplyCap, which limits the protocol’s risk exposure to collateral assets. This function sets the minimum amount of base asset supplied to the protocol in order for accounts to accrue rewards.