Trustline
Probity
Search…
⌃K

Shutdown

Winding down Probity with grace
The Shutdown module is not available in Probity V1

Concept

Probity may initiate shut down by governance vote. The shutdown module gracefully settles all debt and equity in the system. Prices are frozen at time of shutdown, and there may be price volatility risk during this window. Generally, the shut down process can take up to 2 days. All collateral auctions must finish so that the final debt balance can be calculated. Then borrowers will be able to redeem Aurei for their collateral. When there remains system debt after collateral auctions have finished, the remaining shortfall is covered by equity position holders' underlying assets.

Data Structures

Asset

Property
Type
Description
finalPrice
uint256
The final price of the collateral asset when the system is shut down.
normDebt
uint256
The total (normalized) debt in the shutdown state.
gap
uint256
The undercollateralized debt in the shutdown state.
redemptionRatio
uint256
The amount of the collateral asset received in return for a stablecoin.

Methods

Public Methods

function initiated() returns(bool isInitiated)
Returns whether the shutdown has been initiated
function initiatedAt() returns(uint256 initiatedAt)
Returns the timestamp of when shutdown has been initiated
function auctionWaitPeriod() returns(uint256 auctionWaitPeriod)
Returns the auctionWaitPeriod variable, this is the amount of time, the shutdown process will wait to allow all existing auctions to come to an end.
function supplierWaitPeriod() returns(uint256 supplierWaitPeriod)
Returns the supplierWaitPeriod variable, this is the amount of time shutdown process will wait to allow all suppliers' obligation to be processed
function assets(bytes32 assetId) returns(uint256 finalPrice, uint256 normDebt, uint256 gap, uint256 redemptionRatio)
returns the variables about an Asset
function collRedeemed(bytes32 assetId, address user) returns(uint256 redeemedAmount)
Returns the amount of asset Redeemed for the assetId and user
function stablecoin(address user) returns(uint256 amount)
Returns amount of stablecoins that have been returned to shutdown module
function finalUtilizationRatio() returns (uint256 finalUtilRatio)
Return the Equity utilization ratio at the moment shutdown was initiated
function stablecoinGap() returns(uint256 stablecoinGap)
Returns stablecoinGap variable, this variable shows difference between how much stablecoin in circulation and asset are available to cover it.
function investorObligationRatio() returns(uint256 investorObligationRatio)
Returns investorObligationRatio, this ratios determine how much asset should be taken from equity position holder in order to cover under collateralized vaults
function finalStablecoinBalance() returns(uint256 finalStablecoinBalance)
Returns finalStablecoinBalance this is the final stablecoin balance in circulation , used to calculate how much asset each stablecoin should be able to redeem for
function finalTotalReserve() returns(uint256 finalTotalReserve)
Returns finalTotalReserve , this is the amount of stablecoin held by reserve pool

External Methods

function switchAddress(bytes32 which, address newAddress) external onlyBy("gov")
Only callable by Gov
Switch the contract addresses before the shutdown has been initiated
function changeWaitPeriod(bytes32 which, uint256 newWaitPeriod) external onlyBy("gov")
Only callable by Gov
Change wait period variables
function initiateShutdown() external onlyBy("gov")
Only callable by Gov
Initiate shutdown, will set shutdown state on all core module to start shutdown process.
Note: This action is irreversible
function setFinalPrice(bytes32 assetId) external
Set the final price for an asset, once set, it can not be changed.
function processUserDebt(bytes32 assetId, address user) external
Process debt positions and grab assets from collateral equals to the value of stablecoins in the debt position, if there are not enough collateral to cover 100% of the debt position, increase the asset.gap and stablecoinGap.
function freeExcessAsset(bytes32 assetId, address user) external
Any asset in that is committed to debt or equity position above the 100% of the position can be freed immediately after shutdown to allow the owners to withdraw.
function writeOffFromReserve() external
Using this function, the stablecoinGap can be lowered using the stablecoins held by the reservePool
function calculateInvestorObligation() external
Calculator investorObligationRatio, this variable determines how much of the equity position will need to be fill the gaps from under collateralized debt positions
function processUserEquity(bytes32 assetId, address user) external
Grab the underlying asset based on user's equity position size and investorObligationRatio and lower the asset.gap and stablecoinGap
function setFinalStablecoinBalance() external
Make sure that systemDebt have been addressed and calculate how many stablecoins are in circulation
function calculateRedemptionRatio(bytes32 assetId) external
Based on the amount of asset held by shutdown and finalStablecoin balance, calculate how much asset would one stablecoin can be used to redeem.
function returnStablecoin(uint256 amount) external
Users must return stablecoin back to probity to be able to redeem asset in the next step
function redeemAsset(bytes32 assetId) external
Based on the number of stablecoin returned to the contract, user can unlock the asset.
function setFinalSystemReserve() external
If there are stablecoin still held by system reserve after the final stablecoin balance has been set, these can be redeemed by bond voucher holders
function redeemVouchers() external
Based on finalSystemReserve, bonds voucher can get a percentage if finalSystemReserve is less than totalVouchers or up to voucher amount.