Automatic debt ceiling adjustments
Minting too much DAI, even if well above collateralization ratios, can become too risky. Hence the Debt Ceiling, i.e. the maximum amount of DAI that can be minted for a specific collateral type.
In order to give the debt ceiling more flexibility, this Instant Access Module allows the broader community to adjust the debt ceiling within fixed parameters set forth by token holders.
Check out MIP27 for more details and discussions.
If you're interested in updating the debt ceiling of a collateral type (ETH-B in this example), follow these steps:
$ export MCD_VAT=$(seth call 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 'getAddress(bytes32)(address)' $(seth --from-ascii MCD_VAT | seth --to-bytes32))
$ export MCD_IAM_AUTO_LINE=$(seth call 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F 'getAddress(bytes32)(address)' $(seth --from-ascii MCD_IAM_AUTO_LINE | seth --to-bytes32))
$ seth call $MCD_VAT 'ilks(bytes32)(uint256,uint256,uint256,uint256,uint256)' $(seth --from-ascii ETH-B | seth --to-bytes32) | sed -n 4p | seth --to-fix 45
5009714
This means that the current debt ceiling for ETH-B is 5,009,714 DAI.
$ seth call $MCD_IAM_AUTO_LINE 'ilks(bytes32)(uint256,uint256,uint48,uint48,uint48)' $(seth --from-ascii ETH-B | seth --to-bytes32) | sed -n 1p | seth --to-fix 45
6000000
Get the seconds elapsed since the last time the debt was increased:
$ echo "$(date +%s) - $(seth call $MCD_IAM_AUTO_LINE 'ilks(bytes32)(uint256,uint256,uint48,uint48,uint48)' $(seth --from-ascii ETH-B | seth --to-bytes32) | sed -n 5p)" | bc
4288088
Compare the above result with the minimum wait time:
$ seth call $MCD_IAM_AUTO_LINE 'ilks(bytes32)(uint256,uint256,uint48,uint48,uint48)' $(seth --from-ascii ETH-B | seth --to-bytes32) | sed -n 3p
43200
$ ETH_GAS=80000 seth send $MCD_IAM_AUTO_LINE 'exec(bytes32)' $(seth --from-ascii ETH-B | seth --to-bytes32)
seth-send: Published transaction with 36 bytes of calldata.
seth-send: 0xaeb25b838d1c96be038a065f79fa85c6bbff55ed64a13c7bc3bf83f3e8fa9f94
seth-send: Waiting for transaction receipt........
seth-send: Transaction included in block 23937434.
seth call $MCD_VAT 'ilks(bytes32)(uint256,uint256,uint256,uint256,uint256)' $(seth --from-ascii ETH-B | seth --to-bytes32) | sed -n 4p | seth --to-fix 45
5021462
ilks(bytes32)
This mapping stores all the information related to an ilk. You can obtain it with the following command:
seth call $MCD_IAM_AUTO_LINE 'ilks(bytes32)(uint256,uint256,uint48,uint48,uint48)' $(seth --from-ascii ETH-B | seth --to-bytes32)
50000000000000000000000000000000000000000000000000000
5000000000000000000000000000000000000000000000000000
43200
11723903
1611565389
Each line represents a different parameter for this ilk
type. These are:
line
: the maximum debt ceiling a collateral type can reach using this modulegap
: the expected difference between a collateral's debt ceiling and its total debtttl
: the minimum amount of seconds between debt ceiling increaseslast
: the block number at which the debt ceiling was updated using this modulelastInc
: the timestamp at which the debt ceiling was increased using this moduleexec(bytes32)
This function updates the debt ceiling of a collateral type. It operates as follows:
gap
parameter to the collateral's current debt.lastInc + ttl
. Otherwise does nothing.Vat
for this particular collateral.Vat
.last
.lastInc
.Exec
event.setIlk
and remIlk
These two functions allow Governance to add or remove collateral types to/from this module, and to update their parameters. They can only be called by means of an executive spell.
wards
, rely
and deny
These are the components of the standard authorization mechanism of DSS. They can only be updated by governance.
If you want to maintain or update this module, install it by following these steps:
git clone https://github.com/makerdao/dss-auto-line --recursive
cd dss-auto-line
make test