Shortfall
Shortfall
Shortfall is an auction contract designed to auction off the convertibleBaseAsset
accumulated in RiskFund
. The convertibleBaseAsset
is auctioned in exchange for users paying off the pool's bad debt. An auction can be started by anyone once a pool's bad debt has reached a minimum value. This value is set and can be changed by the authorized accounts. If the pool’s bad debt exceeds the risk fund plus a 10% incentive, then the auction winner is determined by who will pay off the largest percentage of the pool's bad debt. The auction winner then exchanges for the entire risk fund. Otherwise, if the risk fund covers the pool's bad debt plus the 10% incentive, then the auction winner is determined by who will take the smallest percentage of the risk fund in exchange for paying off all the pool's bad debt.
Solidity API
poolRegistry
Pool registry address
riskFund
Risk fund address
minimumPoolBadDebt
Minimum USD debt in pool for shortfall to trigger
incentiveBps
Incentive to auction participants, initial value set to 1000 or 10%
nextBidderBlockLimit
Time to wait for next bidder. Initially waits for 100 blocks
auctionsPaused
Boolean of if auctions are paused
waitForFirstBidder
Time to wait for first bidder. Initially waits for 100 blocks
auctions
Auctions for each pool
initialize
Initialize the shortfall contract
Parameters
Name | Type | Description |
---|---|---|
riskFund_ | contract IRiskFund | RiskFund contract address |
minimumPoolBadDebt_ | uint256 | Minimum bad debt in base asset for a pool to start auction |
accessControlManager_ | address | AccessControlManager contract address |
❌ Errors
ZeroAddressNotAllowed is thrown when convertible base asset address is zero
ZeroAddressNotAllowed is thrown when risk fund address is zero
placeBid
Place a bid greater than the previous in an ongoing auction
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Comptroller address of the pool |
bidBps | uint256 | The bid percent of the risk fund or bad debt depending on auction type |
auctionStartBlock | uint256 | The block number when auction started |
📅 Events
Emits BidPlaced event on success
closeAuction
Close an auction
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Comptroller address of the pool |
📅 Events
Emits AuctionClosed event on successful close
startAuction
Start a auction when there is not currently one active
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Comptroller address of the pool |
📅 Events
Emits AuctionStarted event on success
Errors if auctions are paused
restartAuction
Restart an auction
Parameters
Name | Type | Description |
---|---|---|
comptroller | address | Address of the pool |
📅 Events
Emits AuctionRestarted event on successful restart
updateNextBidderBlockLimit
Update next bidder block limit which is used determine when an auction can be closed
Parameters
Name | Type | Description |
---|---|---|
_nextBidderBlockLimit | uint256 | New next bidder block limit |
📅 Events
Emits NextBidderBlockLimitUpdated on success
⛔️ Access Requirements
Restricted by ACM
updateIncentiveBps
Updates the incentive BPS
Parameters
Name | Type | Description |
---|---|---|
_incentiveBps | uint256 | New incentive BPS |
📅 Events
Emits IncentiveBpsUpdated on success
⛔️ Access Requirements
Restricted by ACM
updateMinimumPoolBadDebt
Update minimum pool bad debt to start auction
Parameters
Name | Type | Description |
---|---|---|
_minimumPoolBadDebt | uint256 | Minimum bad debt in the base asset for a pool to start auction |
📅 Events
Emits MinimumPoolBadDebtUpdated on success
⛔️ Access Requirements
Restricted by ACM
updateWaitForFirstBidder
Update wait for first bidder block count. If the first bid is not made within this limit, the auction is closed and needs to be restarted
Parameters
Name | Type | Description |
---|---|---|
_waitForFirstBidder | uint256 | New wait for first bidder block count |
📅 Events
Emits WaitForFirstBidderUpdated on success
⛔️ Access Requirements
Restricted by ACM
updatePoolRegistry
Update the pool registry this shortfall supports
Parameters
Name | Type | Description |
---|---|---|
poolRegistry_ | address | Address of pool registry contract |
📅 Events
Emits PoolRegistryUpdated on success
⛔️ Access Requirements
Restricted to owner
❌ Errors
ZeroAddressNotAllowed is thrown when pool registry address is zero
pauseAuctions
Pause auctions. This disables starting new auctions but lets the current auction finishes
📅 Events
Emits AuctionsPaused on success
⛔️ Access Requirements
Restricted by ACM
❌ Errors
Errors is auctions are paused
resumeAuctions
Resume paused auctions.
📅 Events
Emits AuctionsResumed on success
⛔️ Access Requirements
Restricted by ACM
❌ Errors
Errors is auctions are active
Last updated