This repository was initially forked from vesta finance (link) and was changed in order to be deployable on Ethereum Mainnet. It deploys all contracts for the DCHF ecosystem and sets them up.
The main changes from the fork were done such that the contracts are deployable on mainnet. Vesta Finance deployed the contracts on Arbitrum which does not have a max byte size limit for contracts. Therefore, the TroveManager.sol was over 25kb of size and needed to be split up into TroveManager.sol and TroveManagerHelpers.sol.
In Addition, the repository was cleaned up such that it can only be deployed to Ethereum mainnet and the Goerli testnet. Many scripts, tests, helpers etc. were removed.
A working Node.js >=16.0 installation
Otherwise, you need to install Node Version Manager (nvm) https://github.com/nvm-sh/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 18
nvm use 18
nvm alias default 18
npm install npm --global # Upgrade npm to the latest version
To build the project
First clone the repository locally
git clone https://github.com/defifranc/dchf.git
Switch to the repository directory
cd dchf
Install the dependencies
npm i
Once all the packages are installed, just run this command to compile the contracts and build the artifacts:
npx hardhat compile
Prior to running the tests you need to make sure the required packages are installed (npm i
). Also, create a secrets.js
file in the project's root folder from the template secrets.js.template
and add your INFURA_API_KEY
.
To run all the tests on a local mainnet fork (default network is hardhat
):
npx hardhat test
or for a specific test e.g BorrowerOperationsTest
npx hardhat test test/core/BorrowerOperationsTest.js
or for a specific test and specific network e.g BorrowerOperationsTest
and network hardhat
npx hardhat test test/core/BorrowerOperationsTest.js -- network hardhat
Prior to running the deploy scripts you need to make sure the required packages are installed (npm i
).
Then, proceed along the following steps to deploy the entire protocol:
- Create a
secrets.js
file in the project's root folder from the templatesecrets.js.template
. Add theINFURA_API_KEY
, theDEPLOYER_PRIVATEKEY
and theETHERSCAN_API_KEY
for mainnet deployment (or the Goerli parameters for testnet deployment). - Update the addresses on lines 16-18 in
deployment/deploymentParams/deploymentParams.mainnet.js
(or the goerli file for testnet deployment) to reflect your specific setting. The Deployer address needs to reflect the private key set in thesecrets.js
file. Verify the oracle addresses on lines 5-18 and parameterGAS_PRICE
(ifGAS_PRICE
is too low you risk your deploy transactions getting stuck). - You can choose to either deploy only the Moneta contracts (see
MON
folder) or the entire protocol. Set the parameterMON_TOKEN_ONLY
to handle this - Run
npx hardhat run deployment/deploymentScripts/mainnetDeployment.js --network mainnet
(or the Goerli references for testnet deployment), to deploy the contracts. - You can check and verify the contracts by checking the output file in
deployment/output/mainnetDeploymentOutput.json
.
- MONToken: 0x1EA48B9965bb5086F3b468E50ED93888a661fc17
- gasPool: 0xC9A113C35f961af3526E6F016F6DF9DA0A4c7BfA
- sortedTroves: 0x1Dd69453a685C735f2ab43E2169b57e9Edf72286
- troveManager: 0x99838142189adE67c1951f9c57c3333281334F7F
- troveManagerHelpers: 0xaAACB8C39Bd5Acbb0A236112Df8d15411161e518
- activePool: 0x77E034c8A1392d99a2C776A6C1593866fEE36a33
- stabilityPoolManager: 0x202FbFF035188f9f0525E144C8B3F8249a74aD21
- defaultPool: 0xC1f785B74a01dd9FAc0dE6070bC583fe9eaC7Ab5
- collSurplusPool: 0xA622c3bdBFBE749B1984bc127bFB500e196F594b
- borrowerOperations: 0x9eB2Ce1be2DD6947e4f5Aabe33106f48861DFD74
- hintHelpers: 0x17244338034Bea1fA940779Bc769Ff01833406c4
- dfrancParameters: 0x6F9990B242873d7396511f2630412A3fcEcacc42
- priceFeed: 0x09AB3C0ce6Cb41C13343879A667a6bDAd65ee9DA
- adminContract: 0x2748C55219DCa1D9D3c3a57505e99BB04e42F254
- DCHFToken: 0x045da4bFe02B320f4403674B3b7d121737727A36
- MONStaking: 0x8Bc3702c35D33E5DF7cb0F06cb72a0c34Ae0C56F
- communityIssuance: 0x0fa46e8cBCEff8468DB2Ec2fD77731D8a11d3D86
- StabilityPoolETH: 0x6a9f9d6F5D672a9784c5E560a9648de6cbe2c548
- StabilityPoolBTC: 0x04556d845f12Ff7D8Ff04a37F40387Dd1B454c4b
- multiTroveGetter: 0xD4EcC372E99daBDbc0faBE02d2515a24388fACcA
The contract DfrancParameters.sol contains all the parameters from the system and should not be modified. However, the system is set to block redemptions in it's first 14 days. For testing purposes, it's recommended to change it for a lower value. You can find it on the line 15.
-> Call Diagram
Contracts Description Table
Contract | Type | Bases | ||
---|---|---|---|---|
β | Function Name | Visibility | Mutability | Modifiers |
AdminContract | Implementation | ProxyAdmin | ||
β | setAddresses | External βοΈ | π | onlyOwner |
β | addNewCollateral | External βοΈ | π | onlyOwner |
CollSurplusPool | Implementation | OwnableUpgradeable, CheckContract, ICollSurplusPool | ||
β | setAddresses | External βοΈ | π | initializer |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getCollateral | External βοΈ | NOβοΈ | |
β | accountSurplus | External βοΈ | π | NOβοΈ |
β | claimColl | External βοΈ | π | NOβοΈ |
β | receivedERC20 | External βοΈ | π | NOβοΈ |
β | _requireCallerIsBorrowerOperations | Internal π | ||
β | _requireCallerIsTroveManager | Internal π | ||
β | _requireCallerIsActivePool | Internal π | ||
β | External βοΈ | π΅ | NOβοΈ | |
BorrowerOperations | Implementation | DfrancBase, CheckContract, IBorrowerOperations | ||
β | setAddresses | External βοΈ | π | initializer |
β | openTrove | External βοΈ | π΅ | NOβοΈ |
β | addColl | External βοΈ | π΅ | NOβοΈ |
β | moveETHGainToTrove | External βοΈ | π΅ | NOβοΈ |
β | withdrawColl | External βοΈ | π | NOβοΈ |
β | withdrawDCHF | External βοΈ | π | NOβοΈ |
β | repayDCHF | External βοΈ | π | NOβοΈ |
β | adjustTrove | External βοΈ | π΅ | NOβοΈ |
β | _adjustTrove | Internal π | π | |
β | closeTrove | External βοΈ | π | NOβοΈ |
β | claimCollateral | External βοΈ | π | NOβοΈ |
β | _triggerBorrowingFee | Internal π | π | |
β | _getUSDValue | Internal π | ||
β | _getCollChange | Internal π | ||
β | _updateTroveFromAdjustment | Internal π | π | |
β | _moveTokensAndETHfromAdjustment | Internal π | π | |
β | _activePoolAddColl | Internal π | π | |
β | _withdrawDCHF | Internal π | π | |
β | _repayDCHF | Internal π | π | |
β | _requireSingularCollChange | Internal π | ||
β | _requireCallerIsBorrower | Internal π | ||
β | _requireNonZeroAdjustment | Internal π | ||
β | _requireTroveisActive | Internal π | ||
β | _requireTroveisNotActive | Internal π | ||
β | _requireNonZeroDebtChange | Internal π | ||
β | _requireNotInRecoveryMode | Internal π | ||
β | _requireNoCollWithdrawal | Internal π | ||
β | _requireValidAdjustmentInCurrentMode | Internal π | ||
β | _requireICRisAboveMCR | Internal π | ||
β | _requireICRisAboveCCR | Internal π | ||
β | _requireNewICRisAboveOldICR | Internal π | ||
β | _requireNewTCRisAboveCCR | Internal π | ||
β | _requireAtLeastMinNetDebt | Internal π | ||
β | _requireValidDCHFRepayment | Internal π | ||
β | _requireCallerIsStabilityPool | Internal π | ||
β | _requireSufficientDCHFBalance | Internal π | ||
β | _requireValidMaxFeePercentage | Internal π | ||
β | _getNewNominalICRFromTroveChange | Internal π | ||
β | _getNewICRFromTroveChange | Internal π | ||
β | _getNewTroveAmounts | Internal π | ||
β | _getNewTCRFromTroveChange | Internal π | ||
β | getCompositeDebt | External βοΈ | NOβοΈ | |
β | getMethodValue | Private π | ||
ActivePool | Implementation | OwnableUpgradeable, ReentrancyGuardUpgradeable, CheckContract, IActivePool | ||
β | setAddresses | External βοΈ | π | initializer |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getDCHFDebt | External βοΈ | NOβοΈ | |
β | sendAsset | External βοΈ | π | nonReentrant callerIsBOorTroveMorSP |
β | isERC20DepositContract | Private π | ||
β | increaseDCHFDebt | External βοΈ | π | callerIsBOorTroveM |
β | decreaseDCHFDebt | External βοΈ | π | callerIsBOorTroveMorSP |
β | receivedERC20 | External βοΈ | π | callerIsBorrowerOperationOrDefaultPool |
β | External βοΈ | π΅ | callerIsBorrowerOperationOrDefaultPool | |
MultiTroveGetter | Implementation | |||
β | Public βοΈ | π | NOβοΈ | |
β | getMultipleSortedTroves | External βοΈ | NOβοΈ | |
β | _getMultipleSortedTrovesFromHead | Internal π | ||
β | _getMultipleSortedTrovesFromTail | Internal π | ||
PriceFeed | Implementation | OwnableUpgradeable, CheckContract, BaseMath, IPriceFeed | ||
β | setAddresses | External βοΈ | π | initializer |
β | setAdminContract | External βοΈ | π | onlyOwner |
β | addOracle | External βοΈ | π | isController |
β | fetchPrice | External βοΈ | π | NOβοΈ |
β | _getIndexedPrice | Internal π | ||
β | _getChainlinkResponses | Internal π | ||
β | _chainlinkIsBroken | Internal π | ||
β | _badChainlinkResponse | Internal π | ||
β | _chainlinkIsFrozen | Internal π | ||
β | _chainlinkPriceChangeAboveMax | Internal π | ||
β | _scaleChainlinkPriceByDigits | Internal π | ||
β | _changeStatus | Internal π | π | |
β | _storeChainlinkIndex | Internal π | π | |
β | _storeChainlinkPrice | Internal π | π | |
β | _storePrice | Internal π | π | |
β | _storeIndex | Internal π | π | |
β | _getCurrentChainlinkResponse | Internal π | ||
β | _getPrevChainlinkResponse | Internal π | ||
TellorCaller | Implementation | ITellorCaller | ||
β | Public βοΈ | π | NOβοΈ | |
β | getTellorCurrentValue | External βοΈ | NOβοΈ | |
SafetyTransfer | Library | |||
β | decimalsCorrection | Internal π | ||
ITellor | Interface | |||
β | beginDispute | External βοΈ | π | NOβοΈ |
β | vote | External βοΈ | π | NOβοΈ |
β | tallyVotes | External βοΈ | π | NOβοΈ |
β | proposeFork | External βοΈ | π | NOβοΈ |
β | addTip | External βοΈ | π | NOβοΈ |
β | submitMiningSolution | External βοΈ | π | NOβοΈ |
β | submitMiningSolution | External βοΈ | π | NOβοΈ |
β | proposeOwnership | External βοΈ | π | NOβοΈ |
β | claimOwnership | External βοΈ | π | NOβοΈ |
β | depositStake | External βοΈ | π | NOβοΈ |
β | requestStakingWithdraw | External βοΈ | π | NOβοΈ |
β | withdrawStake | External βοΈ | π | NOβοΈ |
β | approve | External βοΈ | π | NOβοΈ |
β | transfer | External βοΈ | π | NOβοΈ |
β | transferFrom | External βοΈ | π | NOβοΈ |
β | name | External βοΈ | NOβοΈ | |
β | symbol | External βοΈ | NOβοΈ | |
β | decimals | External βοΈ | NOβοΈ | |
β | getNewCurrentVariables | External βοΈ | NOβοΈ | |
β | getTopRequestIDs | External βοΈ | NOβοΈ | |
β | getNewVariablesOnDeck | External βοΈ | NOβοΈ | |
β | updateTellor | External βοΈ | π | NOβοΈ |
β | unlockDisputeFee | External βοΈ | π | NOβοΈ |
β | allowance | External βοΈ | NOβοΈ | |
β | allowedToTrade | External βοΈ | NOβοΈ | |
β | balanceOf | External βοΈ | NOβοΈ | |
β | balanceOfAt | External βοΈ | NOβοΈ | |
β | didMine | External βοΈ | NOβοΈ | |
β | didVote | External βοΈ | NOβοΈ | |
β | getAddressVars | External βοΈ | NOβοΈ | |
β | getAllDisputeVars | External βοΈ | NOβοΈ | |
β | getCurrentVariables | External βοΈ | NOβοΈ | |
β | getDisputeIdByDisputeHash | External βοΈ | NOβοΈ | |
β | getDisputeUintVars | External βοΈ | NOβοΈ | |
β | getLastNewValue | External βοΈ | NOβοΈ | |
β | getLastNewValueById | External βοΈ | NOβοΈ | |
β | getMinedBlockNum | External βοΈ | NOβοΈ | |
β | getMinersByRequestIdAndTimestamp | External βοΈ | NOβοΈ | |
β | getNewValueCountbyRequestId | External βοΈ | NOβοΈ | |
β | getRequestIdByRequestQIndex | External βοΈ | NOβοΈ | |
β | getRequestIdByTimestamp | External βοΈ | NOβοΈ | |
β | getRequestIdByQueryHash | External βοΈ | NOβοΈ | |
β | getRequestQ | External βοΈ | NOβοΈ | |
β | getRequestUintVars | External βοΈ | NOβοΈ | |
β | getRequestVars | External βοΈ | NOβοΈ | |
β | getStakerInfo | External βοΈ | NOβοΈ | |
β | getSubmissionsByTimestamp | External βοΈ | NOβοΈ | |
β | getTimestampbyRequestIDandIndex | External βοΈ | NOβοΈ | |
β | getUintVar | External βοΈ | NOβοΈ | |
β | getVariablesOnDeck | External βοΈ | NOβοΈ | |
β | isInDispute | External βοΈ | NOβοΈ | |
β | retrieveData | External βοΈ | NOβοΈ | |
β | totalSupply | External βοΈ | NOβοΈ | |
IERC2612 | Interface | |||
β | permit | External βοΈ | π | NOβοΈ |
β | nonces | External βοΈ | NOβοΈ | |
β | version | External βοΈ | NOβοΈ | |
β | permitTypeHash | External βοΈ | NOβοΈ | |
β | domainSeparator | External βοΈ | NOβοΈ | |
IERC2612Permit | Interface | |||
β | permit | External βοΈ | π | NOβοΈ |
β | nonces | External βοΈ | NOβοΈ | |
ERC20Permit | Implementation | ERC20, IERC2612Permit | ||
β | Public βοΈ | π | NOβοΈ | |
β | permit | Public βοΈ | π | NOβοΈ |
β | nonces | Public βοΈ | NOβοΈ | |
β | chainId | Public βοΈ | NOβοΈ | |
ERC20Decimals | Interface | |||
β | decimals | External βοΈ | NOβοΈ | |
DfrancSafeMath128 | Library | |||
β | add | Internal π | ||
β | sub | Internal π | ||
DfrancMath | Library | |||
β | _min | Internal π | ||
β | _max | Internal π | ||
β | decMul | Internal π | ||
β | _decPow | Internal π | ||
β | _getAbsoluteDifference | Internal π | ||
β | _computeNominalCR | Internal π | ||
β | _computeCR | Internal π | ||
DfrancBase | Implementation | BaseMath, IDfrancBase, OwnableUpgradeable | ||
β | setDfrancParameters | Public βοΈ | π | onlyOwner |
β | _getCompositeDebt | Internal π | ||
β | _getNetDebt | Internal π | ||
β | _getCollGasCompensation | Internal π | ||
β | getEntireSystemColl | Public βοΈ | NOβοΈ | |
β | getEntireSystemDebt | Public βοΈ | NOβοΈ | |
β | _getTCR | Internal π | ||
β | _checkRecoveryMode | Internal π | ||
β | _requireUserAcceptsFee | Internal π | ||
CheckContract | Implementation | |||
β | checkContract | Internal π | ||
BaseMath | Implementation | |||
TroveManagerHelpers | Implementation | DfrancBase, CheckContract, ITroveManagerHelpers | ||
β | _onlyBOorTM | Private π | ||
β | _onlyBorrowerOperations | Private π | ||
β | _onlyTroveManager | Private π | ||
β | setAddresses | External βοΈ | π | initializer |
β | getNominalICR | Public βοΈ | NOβοΈ | |
β | getCurrentICR | Public βοΈ | NOβοΈ | |
β | _getCurrentTroveAmounts | Internal π | ||
β | applyPendingRewards | External βοΈ | π | onlyBorrowerOperations |
β | applyPendingRewards | External βοΈ | π | onlyTroveManager |
β | _applyPendingRewards | Internal π | π | |
β | updateTroveRewardSnapshots | External βοΈ | π | onlyBorrowerOperations |
β | _updateTroveRewardSnapshots | Internal π | π | |
β | getPendingAssetReward | Public βοΈ | NOβοΈ | |
β | getPendingDCHFDebtReward | Public βοΈ | NOβοΈ | |
β | hasPendingRewards | Public βοΈ | NOβοΈ | |
β | getEntireDebtAndColl | Public βοΈ | NOβοΈ | |
β | removeStake | External βοΈ | π | onlyBOorTM |
β | removeStakeTrove | External βοΈ | π | onlyTroveManager |
β | _removeStake | Internal π | π | |
β | updateStakeAndTotalStakes | External βοΈ | π | onlyBorrowerOperations |
β | updateStakeAndTotalStakesTrove | External βοΈ | π | onlyTroveManager |
β | _updateStakeAndTotalStakes | Internal π | π | |
β | _computeNewStake | Internal π | ||
β | redistributeDebtAndColl | External βοΈ | π | onlyTroveManager |
β | _redistributeDebtAndColl | Internal π | π | |
β | closeTrove | External βοΈ | π | onlyBorrowerOperations |
β | closeTrove | External βοΈ | π | onlyTroveManager |
β | _closeTrove | Internal π | π | |
β | updateSystemSnapshots_excludeCollRemainder | External βοΈ | π | onlyTroveManager |
β | _updateSystemSnapshots_excludeCollRemainder | Internal π | π | |
β | addTroveOwnerToArray | External βοΈ | π | onlyBorrowerOperations |
β | _addTroveOwnerToArray | Internal π | π | |
β | _removeTroveOwner | Internal π | π | |
β | getTCR | External βοΈ | NOβοΈ | |
β | checkRecoveryMode | External βοΈ | NOβοΈ | |
β | _checkPotentialRecoveryMode | Public βοΈ | NOβοΈ | |
β | updateBaseRateFromRedemption | External βοΈ | π | onlyTroveManager |
β | _updateBaseRateFromRedemption | Internal π | π | |
β | getRedemptionRate | Public βοΈ | NOβοΈ | |
β | getRedemptionRateWithDecay | Public βοΈ | NOβοΈ | |
β | _calcRedemptionRate | Internal π | ||
β | _getRedemptionFee | Public βοΈ | NOβοΈ | |
β | getRedemptionFeeWithDecay | External βοΈ | NOβοΈ | |
β | _calcRedemptionFee | Internal π | ||
β | getBorrowingRate | Public βοΈ | NOβοΈ | |
β | getBorrowingRateWithDecay | Public βοΈ | NOβοΈ | |
β | _calcBorrowingRate | Internal π | ||
β | getBorrowingFee | External βοΈ | NOβοΈ | |
β | getBorrowingFeeWithDecay | External βοΈ | NOβοΈ | |
β | _calcBorrowingFee | Internal π | ||
β | decayBaseRateFromBorrowing | External βοΈ | π | onlyBorrowerOperations |
β | _updateLastFeeOpTime | Internal π | π | |
β | _calcDecayedBaseRate | Public βοΈ | NOβοΈ | |
β | _minutesPassedSinceLastFeeOp | Internal π | ||
β | _requireDCHFBalanceCoversRedemption | Public βοΈ | NOβοΈ | |
β | _requireMoreThanOneTroveInSystem | Internal π | ||
β | _requireAmountGreaterThanZero | Public βοΈ | NOβοΈ | |
β | _requireTCRoverMCR | Public βοΈ | NOβοΈ | |
β | _requireValidMaxFeePercentage | Public βοΈ | NOβοΈ | |
β | isTroveActive | Public βοΈ | NOβοΈ | |
β | getTroveOwnersCount | External βοΈ | NOβοΈ | |
β | getTroveFromTroveOwnersArray | External βοΈ | NOβοΈ | |
β | getTrove | External βοΈ | NOβοΈ | |
β | getTroveStatus | External βοΈ | NOβοΈ | |
β | getTroveStake | External βοΈ | NOβοΈ | |
β | getTroveDebt | External βοΈ | NOβοΈ | |
β | getTroveColl | External βοΈ | NOβοΈ | |
β | setTroveDeptAndColl | External βοΈ | π | onlyBorrowerOperations |
β | setTroveStatus | External βοΈ | π | onlyBorrowerOperations |
β | decreaseTroveColl | External βοΈ | π | onlyBorrowerOperations |
β | increaseTroveDebt | External βοΈ | π | onlyBorrowerOperations |
β | decreaseTroveDebt | External βοΈ | π | onlyBorrowerOperations |
β | increaseTroveColl | External βοΈ | π | onlyBorrowerOperations |
β | movePendingTroveRewardsToActivePool | External βοΈ | π | onlyTroveManager |
β | _movePendingTroveRewardsToActivePool | Internal π | π | |
β | getRewardSnapshots | External βοΈ | NOβοΈ | |
TroveManager | Implementation | DfrancBase, CheckContract, ITroveManager | ||
β | setAddresses | External βοΈ | π | initializer |
β | liquidate | External βοΈ | π | troveIsActive |
β | _liquidateNormalMode | Internal π | π | |
β | _liquidateRecoveryMode | Internal π | π | |
β | _getOffsetAndRedistributionVals | Internal π | ||
β | _getCappedOffsetVals | Internal π | ||
β | liquidateTroves | External βοΈ | π | NOβοΈ |
β | _getTotalsFromLiquidateTrovesSequence_RecoveryMode | Internal π | π | |
β | _getTotalsFromLiquidateTrovesSequence_NormalMode | Internal π | π | |
β | batchLiquidateTroves | Public βοΈ | π | NOβοΈ |
β | _getTotalFromBatchLiquidate_RecoveryMode | Internal π | π | |
β | _getTotalsFromBatchLiquidate_NormalMode | Internal π | π | |
β | _addLiquidationValuesToTotals | Internal π | ||
β | _sendGasCompensation | Internal π | π | |
β | _redeemCollateralFromTrove | Internal π | π | |
β | _redeemCloseTrove | Internal π | π | |
β | _isValidFirstRedemptionHint | Internal π | ||
β | setRedemptionWhitelistStatus | External βοΈ | π | onlyOwner |
β | addUserToWhitelistRedemption | External βοΈ | π | onlyOwner |
β | removeUserFromWhitelistRedemption | External βοΈ | π | onlyOwner |
β | redeemCollateral | External βοΈ | π | NOβοΈ |
StabilityPoolManager | Implementation | OwnableUpgradeable, CheckContract, IStabilityPoolManager | ||
β | setAddresses | External βοΈ | π | initializer |
β | setAdminContract | External βοΈ | π | onlyOwner |
β | isStabilityPool | External βοΈ | NOβοΈ | |
β | addStabilityPool | External βοΈ | π | isController |
β | removeStabilityPool | External βοΈ | π | isController |
β | getAssetStabilityPool | External βοΈ | NOβοΈ | |
β | unsafeGetAssetStabilityPool | External βοΈ | NOβοΈ | |
StabilityPool | Implementation | DfrancBase, CheckContract, IStabilityPool | ||
β | getNameBytes | External βοΈ | NOβοΈ | |
β | getAssetType | External βοΈ | NOβοΈ | |
β | setAddresses | External βοΈ | π | initializer |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getTotalDCHFDeposits | External βοΈ | NOβοΈ | |
β | provideToSP | External βοΈ | π | NOβοΈ |
β | withdrawFromSP | External βοΈ | π | NOβοΈ |
β | withdrawAssetGainToTrove | External βοΈ | π | NOβοΈ |
β | _triggerMONIssuance | Internal π | π | |
β | _updateG | Internal π | π | |
β | _computeMONPerUnitStaked | Internal π | π | |
β | offset | External βοΈ | π | NOβοΈ |
β | _computeRewardsPerUnitStaked | Internal π | π | |
β | _updateRewardSumAndProduct | Internal π | π | |
β | _moveOffsetCollAndDebt | Internal π | π | |
β | _decreaseDCHF | Internal π | π | |
β | getDepositorAssetGain | Public βοΈ | NOβοΈ | |
β | getDepositorAssetGain1e18 | Public βοΈ | NOβοΈ | |
β | _getAssetGainFromSnapshots | Internal π | ||
β | getDepositorMONGain | Public βοΈ | NOβοΈ | |
β | _getMONGainFromSnapshots | Internal π | ||
β | getCompoundedDCHFDeposit | Public βοΈ | NOβοΈ | |
β | getCompoundedTotalStake | Public βοΈ | NOβοΈ | |
β | _getCompoundedStakeFromSnapshots | Internal π | ||
β | _sendDCHFtoStabilityPool | Internal π | π | |
β | _sendAssetGainToDepositor | Internal π | π | |
β | _sendDCHFToDepositor | Internal π | π | |
β | _updateDepositAndSnapshots | Internal π | π | |
β | _updateStakeAndSnapshots | Internal π | π | |
β | _payOutMONGains | Internal π | π | |
β | _requireCallerIsActivePool | Internal π | ||
β | _requireCallerIsTroveManager | Internal π | ||
β | _requireNoUnderCollateralizedTroves | Public βοΈ | π | NOβοΈ |
β | _requireUserHasDeposit | Internal π | ||
β | _requireUserHasNoDeposit | Internal π | ||
β | _requireNonZeroAmount | Internal π | ||
β | _requireUserHasTrove | Internal π | ||
β | _requireUserHasETHGain | Internal π | ||
β | receivedERC20 | External βοΈ | π | NOβοΈ |
β | External βοΈ | π΅ | NOβοΈ | |
SortedTroves | Implementation | OwnableUpgradeable, CheckContract, ISortedTroves | ||
β | setParams | External βοΈ | π | initializer |
β | insert | External βοΈ | π | NOβοΈ |
β | _insert | Internal π | π | |
β | remove | External βοΈ | π | NOβοΈ |
β | _remove | Internal π | π | |
β | reInsert | External βοΈ | π | NOβοΈ |
β | contains | Public βοΈ | NOβοΈ | |
β | isFull | Public βοΈ | NOβοΈ | |
β | isEmpty | Public βοΈ | NOβοΈ | |
β | getSize | External βοΈ | NOβοΈ | |
β | getMaxSize | External βοΈ | NOβοΈ | |
β | getFirst | External βοΈ | NOβοΈ | |
β | getLast | External βοΈ | NOβοΈ | |
β | getNext | External βοΈ | NOβοΈ | |
β | getPrev | External βοΈ | NOβοΈ | |
β | validInsertPosition | External βοΈ | NOβοΈ | |
β | _validInsertPosition | Internal π | ||
β | _descendList | Internal π | ||
β | _ascendList | Internal π | ||
β | findInsertPosition | External βοΈ | NOβοΈ | |
β | _findInsertPosition | Internal π | ||
β | _requireCallerIsTroveManager | Internal π | ||
β | _requireCallerIsBOorTroveM | Internal π | ||
PriceFeedOld | Implementation | OwnableUpgradeable, CheckContract, BaseMath, IPriceFeed | ||
β | setAddresses | External βοΈ | π | initializer |
β | setAdminContract | External βοΈ | π | onlyOwner |
β | addOracle | External βοΈ | π | isController |
β | fetchPrice | External βοΈ | π | NOβοΈ |
β | _getIndexedPrice | Internal π | ||
β | _getChainlinkResponses | Internal π | ||
β | _chainlinkIsBroken | Internal π | ||
β | _badChainlinkResponse | Internal π | ||
β | _chainlinkIsFrozen | Internal π | ||
β | _chainlinkPriceChangeAboveMax | Internal π | ||
β | _scaleChainlinkPriceByDigits | Internal π | ||
β | _changeStatus | Internal π | π | |
β | _storeChainlinkIndex | Internal π | π | |
β | _storeChainlinkPrice | Internal π | π | |
β | _storePrice | Internal π | π | |
β | _storeIndex | Internal π | π | |
β | _getCurrentChainlinkResponse | Internal π | ||
β | _getPrevChainlinkResponse | Internal π | ||
TroveManagerScript | Implementation | CheckContract | ||
β | Public βοΈ | π | NOβοΈ | |
β | redeemCollateral | External βοΈ | π | NOβοΈ |
TokenScript | Implementation | CheckContract | ||
β | Public βοΈ | π | NOβοΈ | |
β | transfer | External βοΈ | π | NOβοΈ |
β | allowance | External βοΈ | NOβοΈ | |
β | approve | External βοΈ | π | NOβοΈ |
β | transferFrom | External βοΈ | π | NOβοΈ |
β | increaseAllowance | External βοΈ | π | NOβοΈ |
β | decreaseAllowance | External βοΈ | π | NOβοΈ |
StabilityPoolScript | Implementation | CheckContract | ||
β | Public βοΈ | π | NOβοΈ | |
β | provideToSP | External βοΈ | π | NOβοΈ |
β | withdrawFromSP | External βοΈ | π | NOβοΈ |
β | withdrawAssetGainToTrove | External βοΈ | π | NOβοΈ |
ETHTransferScript | Implementation | |||
β | transferETH | External βοΈ | π | NOβοΈ |
MONStakingScript | Implementation | CheckContract | ||
β | Public βοΈ | π | NOβοΈ | |
β | stake | External βοΈ | π | NOβοΈ |
BorrowerWrappersScript | Implementation | BorrowerOperationsScript, ETHTransferScript, MONStakingScript | ||
β | Public βοΈ | π | BorrowerOperationsScript MONStakingScript | |
β | claimCollateralAndOpenTrove | External βοΈ | π΅ | NOβοΈ |
β | claimSPRewardsAndRecycle | External βοΈ | π | NOβοΈ |
β | claimStakingGainsAndRecycle | External βοΈ | π | NOβοΈ |
β | _getNetDCHFAmount | Internal π | π | |
β | _requireUserHasTrove | Internal π | ||
BorrowerOperationsScript | Implementation | CheckContract | ||
β | Public βοΈ | π | NOβοΈ | |
β | openTrove | External βοΈ | π΅ | NOβοΈ |
β | addColl | External βοΈ | π΅ | NOβοΈ |
β | withdrawColl | External βοΈ | π | NOβοΈ |
β | withdrawDCHF | External βοΈ | π | NOβοΈ |
β | repayDCHF | External βοΈ | π | NOβοΈ |
β | closeTrove | External βοΈ | π | NOβοΈ |
β | adjustTrove | External βοΈ | π΅ | NOβοΈ |
β | claimCollateral | External βοΈ | π | NOβοΈ |
β | getValueOrArg | Private π | π | |
HintHelpers | Implementation | DfrancBase, CheckContract | ||
β | setAddresses | External βοΈ | π | initializer |
β | getRedemptionHints | External βοΈ | NOβοΈ | |
β | getApproxHint | External βοΈ | NOβοΈ | |
β | computeNominalCR | External βοΈ | NOβοΈ | |
β | computeCR | External βοΈ | NOβοΈ | |
MONToken | Implementation | CheckContract, ERC20Permit | ||
β | Public βοΈ | π | ERC20 | |
MONStaking | Implementation | IMONStaking, PausableUpgradeable, OwnableUpgradeable, CheckContract, BaseMath, ReentrancyGuardUpgradeable | ||
β | setAddresses | External βοΈ | π | initializer |
β | stake | External βοΈ | π | nonReentrant whenNotPaused |
β | unstake | External βοΈ | π | nonReentrant |
β | pause | Public βοΈ | π | onlyOwner |
β | unpause | Public βοΈ | π | onlyOwner |
β | changeTreasuryAddress | Public βοΈ | π | onlyOwner |
β | increaseF_Asset | External βοΈ | π | callerIsTroveManager |
β | increaseF_DCHF | External βοΈ | π | callerIsBorrowerOperations |
β | sendToTreasury | Internal π | π | |
β | getPendingAssetGain | External βοΈ | NOβοΈ | |
β | _getPendingAssetGain | Internal π | ||
β | getPendingDCHFGain | External βοΈ | NOβοΈ | |
β | _getPendingDCHFGain | Internal π | ||
β | _updateUserSnapshots | Internal π | π | |
β | _sendAssetGainToUser | Internal π | π | |
β | _sendAsset | Internal π | π | |
β | _requireUserHasStake | Internal π | ||
β | External βοΈ | π΅ | callerIsActivePool | |
LockedMON | Implementation | Ownable, CheckContract | ||
β | setAddresses | Public βοΈ | π | onlyOwner |
β | addEntityVesting | Public βοΈ | π | onlyOwner |
β | lowerEntityVesting | Public βοΈ | π | onlyOwner entityRuleExists |
β | removeEntityVesting | Public βοΈ | π | onlyOwner entityRuleExists |
β | claimMONToken | Public βοΈ | π | entityRuleExists |
β | sendMONTokenToEntity | Private π | π | |
β | transferUnassignedMON | External βοΈ | π | onlyOwner |
β | getClaimableMON | Public βοΈ | NOβοΈ | |
β | getUnassignMONTokensAmount | Public βοΈ | NOβοΈ | |
β | isEntityExits | Public βοΈ | NOβοΈ | |
CommunityIssuance | Implementation | ICommunityIssuance, OwnableUpgradeable, CheckContract, BaseMath | ||
β | setAddresses | External βοΈ | π | initializer |
β | setAdminContract | External βοΈ | π | onlyOwner |
β | addFundToStabilityPool | External βοΈ | π | isController |
β | removeFundFromStabilityPool | External βοΈ | π | onlyOwner activeStabilityPoolOnly |
β | addFundToStabilityPoolFrom | External βοΈ | π | isController |
β | _addFundToStabilityPoolFrom | Internal π | π | |
β | transferFundToAnotherStabilityPool | External βοΈ | π | onlyOwner activeStabilityPoolOnly activeStabilityPoolOnly |
β | disableStabilityPool | Internal π | π | |
β | issueMON | External βοΈ | π | onlyStabilityPool |
β | _issueMON | Internal π | π | isStabilityPool |
β | _getLastUpdateTokenDistribution | Internal π | ||
β | sendMON | External βοΈ | π | onlyStabilityPool |
β | setWeeklyDfrancDistribution | External βοΈ | π | isController isStabilityPool |
DCHFTokenTester | Implementation | DCHFToken | ||
β | Public βοΈ | π | DCHFToken | |
β | unprotectedMint | External βοΈ | π | NOβοΈ |
β | unprotectedBurn | External βοΈ | π | NOβοΈ |
β | unprotectedSendToPool | External βοΈ | π | NOβοΈ |
β | unprotectedReturnFromPool | External βοΈ | π | NOβοΈ |
β | callInternalApprove | External βοΈ | π | NOβοΈ |
β | getChainId | External βοΈ | NOβοΈ | |
β | getDigest | External βοΈ | NOβοΈ | |
β | recoverAddress | External βοΈ | NOβοΈ | |
DCHFTokenCaller | Implementation | |||
β | setDCHF | External βοΈ | π | NOβοΈ |
β | DCHFMint | External βοΈ | π | NOβοΈ |
β | DCHFBurn | External βοΈ | π | NOβοΈ |
β | DCHFSendToPool | External βοΈ | π | NOβοΈ |
β | DCHFReturnFromPool | External βοΈ | π | NOβοΈ |
MONTokenTester | Implementation | MONToken | ||
β | Public βοΈ | π | MONToken | |
β | unprotectedMint | External βοΈ | π | NOβοΈ |
β | unprotectedTransferFrom | External βοΈ | π | NOβοΈ |
β | callInternalApprove | External βοΈ | π | NOβοΈ |
β | callInternalTransfer | External βοΈ | π | NOβοΈ |
β | getChainId | External βοΈ | NOβοΈ | |
MONStakingTester | Implementation | MONStaking | ||
β | requireCallerIsTroveManager | External βοΈ | callerIsTroveManager | |
DfrancMathTester | Implementation | |||
β | callMax | External βοΈ | NOβοΈ | |
β | callDecPowTx | External βοΈ | NOβοΈ | |
β | callDecPow | External βοΈ | NOβοΈ | |
StabilityPoolTester | Implementation | StabilityPool | ||
β | unprotectedPayable | External βοΈ | π΅ | NOβοΈ |
β | setCurrentScale | External βοΈ | π | NOβοΈ |
β | setTotalDeposits | External βοΈ | π | NOβοΈ |
SortedTrovesTester | Implementation | |||
β | setSortedTroves | External βοΈ | π | NOβοΈ |
β | insert | External βοΈ | π | NOβοΈ |
β | remove | External βοΈ | π | NOβοΈ |
β | reInsert | External βοΈ | π | NOβοΈ |
β | getNominalICR | External βοΈ | NOβοΈ | |
β | getCurrentICR | External βοΈ | NOβοΈ | |
PriceFeedTestnet | Implementation | IPriceFeed | ||
β | getPrice | External βοΈ | NOβοΈ | |
β | getIndex | External βοΈ | NOβοΈ | |
β | addOracle | External βοΈ | π | NOβοΈ |
β | fetchPrice | External βοΈ | π | NOβοΈ |
β | setPrice | External βοΈ | π | NOβοΈ |
β | setIndex | External βοΈ | π | NOβοΈ |
PriceFeedTester | Implementation | PriceFeed | ||
β | setLastGoodPrice | External βοΈ | π | NOβοΈ |
β | setStatus | External βοΈ | π | NOβοΈ |
NonPayable | Implementation | |||
β | setPayable | External βοΈ | π | NOβοΈ |
β | forward | External βοΈ | π΅ | NOβοΈ |
β | External βοΈ | π΅ | NOβοΈ | |
MockTellor | Implementation | |||
β | setPrice | External βοΈ | π | NOβοΈ |
β | setDidRetrieve | External βοΈ | π | NOβοΈ |
β | setUpdateTime | External βοΈ | π | NOβοΈ |
β | setRevertRequest | External βοΈ | π | NOβοΈ |
β | getTimestampbyRequestIDandIndex | External βοΈ | NOβοΈ | |
β | getNewValueCountbyRequestId | External βοΈ | NOβοΈ | |
β | retrieveData | External βοΈ | NOβοΈ | |
MockAggregator | Implementation | AggregatorV3Interface | ||
β | setDecimals | External βοΈ | π | NOβοΈ |
β | setPrice | External βοΈ | π | NOβοΈ |
β | setPrevPrice | External βοΈ | π | NOβοΈ |
β | setPrevUpdateTime | External βοΈ | π | NOβοΈ |
β | setUpdateTime | External βοΈ | π | NOβοΈ |
β | setLatestRevert | External βοΈ | π | NOβοΈ |
β | setPrevRevert | External βοΈ | π | NOβοΈ |
β | setDecimalsRevert | External βοΈ | π | NOβοΈ |
β | setLatestRoundId | External βοΈ | π | NOβοΈ |
β | setPrevRoundId | External βοΈ | π | NOβοΈ |
β | decimals | External βοΈ | NOβοΈ | |
β | latestRoundData | External βοΈ | NOβοΈ | |
β | getRoundData | External βοΈ | NOβοΈ | |
β | description | External βοΈ | NOβοΈ | |
β | version | External βοΈ | NOβοΈ | |
DfrancSafeMath128Tester | Implementation | |||
β | add | External βοΈ | NOβοΈ | |
β | sub | External βοΈ | NOβοΈ | |
FunctionCaller | Implementation | |||
β | setTroveManagerAddress | External βοΈ | π | NOβοΈ |
β | setTroveManagerHelpersAddress | External βοΈ | π | NOβοΈ |
β | setSortedTrovesAddress | External βοΈ | π | NOβοΈ |
β | setPriceFeedAddress | External βοΈ | π | NOβοΈ |
β | troveManager_getCurrentICR | External βοΈ | NOβοΈ | |
β | sortedTroves_findInsertPosition | External βοΈ | NOβοΈ | |
ITroveManagerHelpers | Interface | IDfrancBase | ||
β | addTroveOwnerToArray | External βοΈ | π | NOβοΈ |
β | applyPendingRewards | External βοΈ | π | NOβοΈ |
β | checkRecoveryMode | External βοΈ | π | NOβοΈ |
β | closeTrove | External βοΈ | π | NOβοΈ |
β | decayBaseRateFromBorrowing | External βοΈ | π | NOβοΈ |
β | decreaseTroveColl | External βοΈ | π | NOβοΈ |
β | decreaseTroveDebt | External βοΈ | π | NOβοΈ |
β | getBorrowingFee | External βοΈ | NOβοΈ | |
β | getBorrowingRateWithDecay | External βοΈ | NOβοΈ | |
β | getBorrowingRate | External βοΈ | NOβοΈ | |
β | getCurrentICR | External βοΈ | NOβοΈ | |
β | getEntireDebtAndColl | External βοΈ | NOβοΈ | |
β | getNominalICR | External βοΈ | NOβοΈ | |
β | getPendingAssetReward | External βοΈ | NOβοΈ | |
β | getPendingDCHFDebtReward | External βοΈ | NOβοΈ | |
β | getRedemptionFeeWithDecay | External βοΈ | NOβοΈ | |
β | getRedemptionRate | External βοΈ | NOβοΈ | |
β | getRedemptionRateWithDecay | External βοΈ | NOβοΈ | |
β | getTCR | External βοΈ | NOβοΈ | |
β | getTroveColl | External βοΈ | NOβοΈ | |
β | getTroveDebt | External βοΈ | NOβοΈ | |
β | getTroveStake | External βοΈ | NOβοΈ | |
β | getTroveStatus | External βοΈ | NOβοΈ | |
β | hasPendingRewards | External βοΈ | NOβοΈ | |
β | increaseTroveColl | External βοΈ | π | NOβοΈ |
β | increaseTroveDebt | External βοΈ | π | NOβοΈ |
β | removeStakeTrove | External βοΈ | π | NOβοΈ |
β | setTroveStatus | External βοΈ | π | NOβοΈ |
β | updateStakeAndTotalStakesTrove | External βοΈ | π | NOβοΈ |
β | updateTroveRewardSnapshots | External βοΈ | π | NOβοΈ |
β | getBorrowingFeeWithDecay | External βοΈ | NOβοΈ | |
β | getTroveOwnersCount | External βοΈ | NOβοΈ | |
β | getTroveFromTroveOwnersArray | External βοΈ | NOβοΈ | |
β | setTroveDeptAndColl | External βοΈ | π | NOβοΈ |
β | isTroveActive | External βοΈ | NOβοΈ | |
β | movePendingTroveRewardsToActivePool | External βοΈ | π | NOβοΈ |
β | removeStake | External βοΈ | π | NOβοΈ |
β | closeTrove | External βοΈ | π | NOβοΈ |
β | redistributeDebtAndColl | External βοΈ | π | NOβοΈ |
β | updateSystemSnapshots_excludeCollRemainder | External βοΈ | π | NOβοΈ |
β | _checkPotentialRecoveryMode | External βοΈ | NOβοΈ | |
β | updateBaseRateFromRedemption | External βοΈ | π | NOβοΈ |
β | updateStakeAndTotalStakes | External βοΈ | π | NOβοΈ |
β | _requireValidMaxFeePercentage | External βοΈ | NOβοΈ | |
β | _requireTCRoverMCR | External βοΈ | NOβοΈ | |
β | _requireAmountGreaterThanZero | External βοΈ | NOβοΈ | |
β | _requireDCHFBalanceCoversRedemption | External βοΈ | NOβοΈ | |
β | applyPendingRewards | External βοΈ | π | NOβοΈ |
β | _getRedemptionFee | External βοΈ | NOβοΈ | |
β | getTrove | External βοΈ | NOβοΈ | |
β | getRewardSnapshots | External βοΈ | NOβοΈ | |
ITroveManager | Interface | IDfrancBase | ||
β | troveManagerHelpers | External βοΈ | NOβοΈ | |
β | setAddresses | External βοΈ | π | NOβοΈ |
β | stabilityPoolManager | External βοΈ | NOβοΈ | |
β | dchfToken | External βοΈ | NOβοΈ | |
β | monStaking | External βοΈ | NOβοΈ | |
β | liquidate | External βοΈ | π | NOβοΈ |
β | liquidateTroves | External βοΈ | π | NOβοΈ |
β | batchLiquidateTroves | External βοΈ | π | NOβοΈ |
β | redeemCollateral | External βοΈ | π | NOβοΈ |
ITellorCaller | Interface | |||
β | getTellorCurrentValue | External βοΈ | NOβοΈ | |
IStabilityPoolManager | Interface | |||
β | isStabilityPool | External βοΈ | NOβοΈ | |
β | addStabilityPool | External βοΈ | π | NOβοΈ |
β | getAssetStabilityPool | External βοΈ | NOβοΈ | |
β | unsafeGetAssetStabilityPool | External βοΈ | NOβοΈ | |
IStabilityPool | Interface | IDeposit | ||
β | NAME | External βοΈ | NOβοΈ | |
β | setAddresses | External βοΈ | π | NOβοΈ |
β | provideToSP | External βοΈ | π | NOβοΈ |
β | withdrawFromSP | External βοΈ | π | NOβοΈ |
β | withdrawAssetGainToTrove | External βοΈ | π | NOβοΈ |
β | offset | External βοΈ | π | NOβοΈ |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getTotalDCHFDeposits | External βοΈ | NOβοΈ | |
β | getDepositorAssetGain | External βοΈ | NOβοΈ | |
β | getDepositorMONGain | External βοΈ | NOβοΈ | |
β | getCompoundedDCHFDeposit | External βοΈ | NOβοΈ | |
β | getCompoundedTotalStake | External βοΈ | NOβοΈ | |
β | getNameBytes | External βοΈ | NOβοΈ | |
β | getAssetType | External βοΈ | NOβοΈ | |
ISortedTroves | Interface | |||
β | setParams | External βοΈ | π | NOβοΈ |
β | insert | External βοΈ | π | NOβοΈ |
β | remove | External βοΈ | π | NOβοΈ |
β | reInsert | External βοΈ | π | NOβοΈ |
β | contains | External βοΈ | NOβοΈ | |
β | isFull | External βοΈ | NOβοΈ | |
β | isEmpty | External βοΈ | NOβοΈ | |
β | getSize | External βοΈ | NOβοΈ | |
β | getMaxSize | External βοΈ | NOβοΈ | |
β | getFirst | External βοΈ | NOβοΈ | |
β | getLast | External βοΈ | NOβοΈ | |
β | getNext | External βοΈ | NOβοΈ | |
β | getPrev | External βοΈ | NOβοΈ | |
β | validInsertPosition | External βοΈ | NOβοΈ | |
β | findInsertPosition | External βοΈ | NOβοΈ | |
IPriceFeed | Interface | |||
β | addOracle | External βοΈ | π | NOβοΈ |
β | fetchPrice | External βοΈ | π | NOβοΈ |
IPool | Interface | IDeposit | ||
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getDCHFDebt | External βοΈ | NOβοΈ | |
β | increaseDCHFDebt | External βοΈ | π | NOβοΈ |
β | decreaseDCHFDebt | External βοΈ | π | NOβοΈ |
IMONStaking | Interface | |||
β | monToken | External βοΈ | NOβοΈ | |
β | setAddresses | External βοΈ | π | NOβοΈ |
β | stake | External βοΈ | π | NOβοΈ |
β | unstake | External βοΈ | π | NOβοΈ |
β | increaseF_Asset | External βοΈ | π | NOβοΈ |
β | increaseF_DCHF | External βοΈ | π | NOβοΈ |
β | getPendingAssetGain | External βοΈ | NOβοΈ | |
β | getPendingDCHFGain | External βοΈ | NOβοΈ | |
IERC20Deposit | Interface | IERC20 | ||
β | deposit | External βοΈ | π΅ | NOβοΈ |
IDfrancParameters | Interface | |||
β | DECIMAL_PRECISION | External βοΈ | NOβοΈ | |
β | _100pct | External βοΈ | NOβοΈ | |
β | MCR | External βοΈ | NOβοΈ | |
β | CCR | External βοΈ | NOβοΈ | |
β | DCHF_GAS_COMPENSATION | External βοΈ | NOβοΈ | |
β | MIN_NET_DEBT | External βοΈ | NOβοΈ | |
β | PERCENT_DIVISOR | External βοΈ | NOβοΈ | |
β | BORROWING_FEE_FLOOR | External βοΈ | NOβοΈ | |
β | REDEMPTION_FEE_FLOOR | External βοΈ | NOβοΈ | |
β | MAX_BORROWING_FEE | External βοΈ | NOβοΈ | |
β | redemptionBlock | External βοΈ | NOβοΈ | |
β | activePool | External βοΈ | NOβοΈ | |
β | defaultPool | External βοΈ | NOβοΈ | |
β | priceFeed | External βοΈ | NOβοΈ | |
β | setAddresses | External βοΈ | π | NOβοΈ |
β | setPriceFeed | External βοΈ | π | NOβοΈ |
β | setMCR | External βοΈ | π | NOβοΈ |
β | setCCR | External βοΈ | π | NOβοΈ |
β | sanitizeParameters | External βοΈ | π | NOβοΈ |
β | setAsDefault | External βοΈ | π | NOβοΈ |
β | setAsDefaultWithRemptionBlock | External βοΈ | π | NOβοΈ |
β | setDCHFGasCompensation | External βοΈ | π | NOβοΈ |
β | setMinNetDebt | External βοΈ | π | NOβοΈ |
β | setPercentDivisor | External βοΈ | π | NOβοΈ |
β | setBorrowingFeeFloor | External βοΈ | π | NOβοΈ |
β | setMaxBorrowingFee | External βοΈ | π | NOβοΈ |
β | setRedemptionFeeFloor | External βοΈ | π | NOβοΈ |
β | removeRedemptionBlock | External βοΈ | π | NOβοΈ |
IDfrancBase | Interface | |||
β | dfrancParams | External βοΈ | NOβοΈ | |
ERC20Test | Implementation | ERC20Permit | ||
β | Public βοΈ | π | ERC20 | |
β | mint | Public βοΈ | π | NOβοΈ |
β | transferFrom | Public βοΈ | π | NOβοΈ |
β | decimals | Public βοΈ | NOβοΈ | |
β | setDecimals | Public βοΈ | π | NOβοΈ |
ERC20Mock | Implementation | ERC20 | ||
β | Public βοΈ | π΅ | ERC20 | |
β | mint | Public βοΈ | π | NOβοΈ |
β | burn | Public βοΈ | π | NOβοΈ |
β | transferInternal | Public βοΈ | π | NOβοΈ |
β | approveInternal | Public βοΈ | π | NOβοΈ |
β | decimals | Public βοΈ | NOβοΈ | |
Destructible | Implementation | |||
β | External βοΈ | π΅ | NOβοΈ | |
β | destruct | External βοΈ | π | NOβοΈ |
DefaultPoolTester | Implementation | DefaultPool | ||
β | unprotectedIncreaseDCHFDebt | External βοΈ | π | NOβοΈ |
β | unprotectedPayable | External βοΈ | π΅ | NOβοΈ |
DSAuthority | Implementation | |||
β | canCall | Public βοΈ | NOβοΈ | |
DSAuthEvents | Implementation | |||
DSAuth | Implementation | DSAuthEvents | ||
β | Public βοΈ | π | NOβοΈ | |
β | setOwner | Public βοΈ | π | auth |
β | setAuthority | Public βοΈ | π | auth |
β | isAuthorized | Internal π | ||
DSNote | Implementation | |||
DSProxy | Implementation | DSAuth, DSNote | ||
β | Public βοΈ | π | NOβοΈ | |
β | External βοΈ | π΅ | NOβοΈ | |
β | execute | Public βοΈ | π΅ | NOβοΈ |
β | execute | Public βοΈ | π΅ | auth note |
β | setCache | Public βοΈ | π | auth |
DSProxyFactory | Implementation | |||
β | build | Public βοΈ | π | NOβοΈ |
β | build | Public βοΈ | π | NOβοΈ |
DSProxyCache | Implementation | |||
β | read | Public βοΈ | NOβοΈ | |
β | write | Public βοΈ | π | NOβοΈ |
IDeposit | Interface | |||
β | receivedERC20 | External βοΈ | π | NOβοΈ |
CommunityIssuanceTester | Implementation | CommunityIssuance | ||
β | obtainMON | External βοΈ | π | NOβοΈ |
β | getLastUpdateTokenDistribution | External βοΈ | NOβοΈ | |
β | unprotectedIssueMON | External βοΈ | π | NOβοΈ |
IDefaultPool | Interface | IPool | ||
β | sendAssetToActivePool | External βοΈ | π | NOβοΈ |
ChainlinkFlagMock | Implementation | FlagsInterface | ||
β | getFlag | External βοΈ | NOβοΈ | |
β | setFlag | External βοΈ | π | NOβοΈ |
β | getFlags | External βοΈ | NOβοΈ | |
β | raiseFlag | External βοΈ | π | NOβοΈ |
β | raiseFlags | External βοΈ | π | NOβοΈ |
β | lowerFlags | External βοΈ | π | NOβοΈ |
β | setRaisingAccessController | External βοΈ | π | NOβοΈ |
IDCHFToken | Implementation | ERC20Permit | ||
β | emergencyStopMinting | External βοΈ | π | NOβοΈ |
β | mint | External βοΈ | π | NOβοΈ |
β | burn | External βοΈ | π | NOβοΈ |
β | sendToPool | External βοΈ | π | NOβοΈ |
β | returnFromPool | External βοΈ | π | NOβοΈ |
ICommunityIssuance | Interface | |||
β | setAddresses | External βοΈ | π | NOβοΈ |
β | issueMON | External βοΈ | π | NOβοΈ |
β | sendMON | External βοΈ | π | NOβοΈ |
β | addFundToStabilityPool | External βοΈ | π | NOβοΈ |
β | addFundToStabilityPoolFrom | External βοΈ | π | NOβοΈ |
β | transferFundToAnotherStabilityPool | External βοΈ | π | NOβοΈ |
β | setWeeklyDfrancDistribution | External βοΈ | π | NOβοΈ |
ICollSurplusPool | Interface | IDeposit | ||
β | setAddresses | External βοΈ | π | NOβοΈ |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getCollateral | External βοΈ | NOβοΈ | |
β | accountSurplus | External βοΈ | π | NOβοΈ |
β | claimColl | External βοΈ | π | NOβοΈ |
BorrowerOperationsTester | Implementation | BorrowerOperations | ||
β | getNewICRFromTroveChange | External βοΈ | NOβοΈ | |
β | getNewTCRFromTroveChange | External βοΈ | NOβοΈ | |
β | getUSDValue | External βοΈ | NOβοΈ | |
β | callInternalAdjustLoan | External βοΈ | π | NOβοΈ |
β | External βοΈ | π΅ | NOβοΈ | |
IBorrowerOperations | Interface | |||
β | setAddresses | External βοΈ | π | NOβοΈ |
β | openTrove | External βοΈ | π΅ | NOβοΈ |
β | addColl | External βοΈ | π΅ | NOβοΈ |
β | moveETHGainToTrove | External βοΈ | π΅ | NOβοΈ |
β | withdrawColl | External βοΈ | π | NOβοΈ |
β | withdrawDCHF | External βοΈ | π | NOβοΈ |
β | repayDCHF | External βοΈ | π | NOβοΈ |
β | closeTrove | External βοΈ | π | NOβοΈ |
β | adjustTrove | External βοΈ | π΅ | NOβοΈ |
β | claimCollateral | External βοΈ | π | NOβοΈ |
β | getCompositeDebt | External βοΈ | NOβοΈ | |
ActivePoolTester | Implementation | ActivePool | ||
β | unprotectedIncreaseDCHFDebt | External βοΈ | π | NOβοΈ |
β | unprotectedPayable | External βοΈ | π΅ | NOβοΈ |
IActivePool | Interface | IPool | ||
β | sendAsset | External βοΈ | π | NOβοΈ |
GasPool | Implementation | |||
DfrancParameters | Implementation | IDfrancParameters, OwnableUpgradeable, CheckContract | ||
β | setAddresses | External βοΈ | π | initializer |
β | setAdminContract | External βοΈ | π | onlyOwner |
β | setPriceFeed | External βοΈ | π | onlyOwner |
β | sanitizeParameters | External βοΈ | π | NOβοΈ |
β | setAsDefault | External βοΈ | π | onlyOwner |
β | setAsDefaultWithRemptionBlock | External βοΈ | π | isController |
β | _setAsDefault | Private π | π | |
β | setCollateralParameters | Public βοΈ | π | onlyOwner |
β | setMCR | Public βοΈ | π | onlyOwner safeCheck |
β | setCCR | Public βοΈ | π | onlyOwner safeCheck |
β | setPercentDivisor | Public βοΈ | π | onlyOwner safeCheck |
β | setBorrowingFeeFloor | Public βοΈ | π | onlyOwner safeCheck |
β | setMaxBorrowingFee | Public βοΈ | π | onlyOwner safeCheck |
β | setDCHFGasCompensation | Public βοΈ | π | onlyOwner safeCheck |
β | setMinNetDebt | Public βοΈ | π | onlyOwner safeCheck |
β | setRedemptionFeeFloor | Public βοΈ | π | onlyOwner safeCheck |
β | removeRedemptionBlock | External βοΈ | π | onlyOwner |
DefaultPool | Implementation | OwnableUpgradeable, CheckContract, IDefaultPool | ||
β | setAddresses | External βοΈ | π | initializer |
β | getAssetBalance | External βοΈ | NOβοΈ | |
β | getDCHFDebt | External βοΈ | NOβοΈ | |
β | sendAssetToActivePool | External βοΈ | π | callerIsTroveManager |
β | increaseDCHFDebt | External βοΈ | π | callerIsTroveManager |
β | decreaseDCHFDebt | External βοΈ | π | callerIsTroveManager |
β | receivedERC20 | External βοΈ | π | callerIsActivePool |
β | External βοΈ | π΅ | callerIsActivePool | |
DCHFToken | Implementation | CheckContract, IDCHFToken, Ownable | ||
β | Public βοΈ | π | ERC20 | |
β | emergencyStopMinting | External βοΈ | π | onlyOwner |
β | mint | External βοΈ | π | NOβοΈ |
β | burn | External βοΈ | π | NOβοΈ |
β | sendToPool | External βοΈ | π | NOβοΈ |
β | returnFromPool | External βοΈ | π | NOβοΈ |
β | transfer | Public βοΈ | π | NOβοΈ |
β | transferFrom | Public βοΈ | π | NOβοΈ |
β | _requireValidRecipient | Internal π | ||
β | _requireCallerIsBorrowerOperations | Internal π | ||
β | _requireCallerIsBOorTroveMorSP | Internal π | ||
β | _requireCallerIsStabilityPool | Internal π | ||
β | _requireCallerIsTroveMorSP | Internal π |
Legend
Symbol | Meaning |
---|---|
π | Function can modify state |
π΅ | Function is payable |