Function: deployNewInstance(address collateral, address priceFeed, address customTroveManagerImpl, address customSortedTrovesImpl, DeploymentParams params)
Deploys a new instance with new collateral.
Inputs
collateral
Control: Fully controlled.
Constraints: Should not be already deployed.
Impact: N/A.
priceFeed
Control: Fully controlled.
Constraints: No constraints.
Impact: The price feed for the collateral.
customTroveManagerImpl
Control: Fully controlled.
Constraints: No constraints.
Impact: Any custom trove manager implementation that is different from the original one will be deployed.
customSortedTrovesImpl
Control: Fully controlled.
Constraints: No constraints.
Impact: Any custom-stored troves implementation that is different from the original one will be deployed.
params
Control: Fully controlled.
Constraints: No constraints.
Impact: The parameters for the trove manager.
Branches and code coverage (including function calls)
Intended branches
New collateral along with its priceFeed, TroveManager and SortedTroves contracts should be deployed and their parameters must be set.
Negative behavior
Revert if collateral is already deployed.
Function call analysis
ITroveManager(troveManager).setAddresses(priceFeed, sortedTroves, collateral)
:What is controllable?
priceFeed
andcollateral
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
ISortedTroves(sortedTroves).setAddresses(troveManager)
:What is controllable?
troveManager
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
stabilityPool.enableCollateral(collateral)
:What is controllable?
collateral
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
liquidationManager.enableCollateral(troveManager, collateral)
:What is controllable?
troveManager
andcollateral
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
debtToken.enableCollateral(troveManager)
:What is controllable?
troveManager
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
borrowerOperations.enableCollateral(troveManager, collateral)
:What is controllable?
troveManager
andcollateral
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
ITroveManager(troveManager).setParameters
:What is controllable?:
params.minuteDecayFactor
,params.redemptionFeeFloor
,params.maxRedemptionFee
,params.borrowingFeeFloor
,params.maxBorrowingFee
,params.interestRate
, andparams.maxDebt
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.