Vow
The Vow contract represents the Sky Protocol’s balance sheet. In particular, the Vow acts as the recipient of both the system surplus and system debt.
Contract Details
Section titled “Contract Details”Vow (Glossary)
Section titled “Vow (Glossary)”sin: the system debt queue.Sin: the total amount of debt in the queue.Ash: the total amount of on-auction debt.wait: length of the debt queuesump: debt auction bid size, i.e. the fixed debt quantity to be covered by any one debt auctiondump: debt auction lot size, i.e. the starting amount of MKR offered to cover thelot/sumpbump: surplus auction lot size, i.e. the fixed surplus quantity to be sold by any one surplus auctionhump: surplus buffer, must be exceeded before surplus auctions are possible
Other terms included in the above diagram:
move: transfers stablecoin between users.kick: starts an auction.
Liquidations Manager
Section titled “Liquidations Manager”- Fess - Pushes bad debt to the auctions queue (add debt to the queue).
- Flog - Release queued debt for auction (realize debt from the queue).
- Heal -
vowcallshealon thevatcontract to cancel out surplus and debt. (Optimize debt buffer (vat.heal)). - Kiss - Cancels out surplus and on-auction debt. Release on-auction debt and Heal (
vat.heal). - Flap - Trigger a surplus auction (
flapper.kick) - Flop - Trigger a deficit auction (
flopper.kick)
Authorization
Section titled “Authorization”The vow contract calls kick on flop and flap.
System Data
Section titled “System Data”-
System config
Vow.wait- Flop delayVow.sump- Flop fixed bid sizeVow.dump- Flop starting lot sizeVow.bump- Flap fixed lot sizeVow.hump- Surplus buffer
Debt (SIN) Queue
Section titled “Debt (SIN) Queue”When a Vault is liquidated bite, the seized debt is put in a queue for an auction in a Vow (labeled as sin[timestamp]- the system debt unit). This occurs at the block timestamp of the bite action. It can be released for auction via flog (flog releases queued debt for the auction) once the allotted Vow.wait (the flop delay) time has expired.
The Sin is stored when it’s in the debt queue, but the debt available to auction isn’t explicitly stored anywhere. This is because the debt that is eligible for auction is derived by comparing the Sin (i.e. debt on the holding queue) with the dai balance of the Vow as recorded in Vat.dai[Vow]. For instance, if Vat.sin[Vow] is greater than the sum of Vow.Sin and the Ash (debt currently on auction), then the difference may be eligible for a Flop auction.
Notes:
- In the case of when a
dog.bite/vow.fessis executed, the debttabis added tosin[now]andSin, which blocks thattabamount to be sent to theflopauction and all of the DAI is recovered with aflipauction. In theory, unblocking thetabamount in theSinshouldn’t be necessary, but in practice it actually is. If this debt is not unblocked, then when we have a real need to send aflopauction, we might have a bigSinthat blocks it. To summarize, this means that each registry ofsin[era]that has an amount > 0 should beflog’ed before kicking aflopauction (this is because in order to kick the whole thing, you need every register to be 0, otherwise, it would be blocking debt).- Each
sin[era]isn’t required to be a singlebite, it will group all thebite’s that are in the same Ethereum block together. - The
auction-keeperwillflogeveryerawith positiveSinif thewoe+Sin>=sump, wherewoe=vat.sin[vow]-vow.Sin-vow.Ash. Where the components withinvat.sin(vow)-vow.Sin-vow.Ashare defined as:vat.sin(vow)- total bad debtvow.Sin- debt blockedvow.Ash- debt in auctions
- Each
Vow.sinrecords individual portions of debt (marked with a timestamp). These are not directly auctioned off, but cleared whenflogis called.- If the
Sinis not covered by holding aflipauction within the designated wait time (tau), theSin“matures” and gets marked as bad debt to theVow. This bad debt can be covered through a debt auction (flop) when it exceeds a minimum value (thelotsize). In short, the time between the debt being added to thesin[]queue and becoming “mature” (when itflogs off the queue and is eligible forFlopauction) is the amount of time thatFlipauction has to clear that debt. This is due to the fact that when aFlipauction receives DAI, it decreases theVow’s DAI balance in theVat. - Note: In this case, there is a risk that a circumstance can occur where the
Vow.waitis different than theFlip.tau. The main risk being related towait<tau, which would result in debt auctions running before the associated seized-collateral auctions could complete.
Overall Sin can affect the system in the following way:
- There can be separate
Vows each with their ownsins - In the case of an upgrade, if we remove a
Vowthat hassin, this can create untracked bad debt in the system.
Accounting
Section titled “Accounting”Vow.Sin - This calculates the total queued debt in the system. Vow.Ash- This calculates the total on-auction debt.
3. Key Mechanisms & Concepts
Section titled “3. Key Mechanisms & Concepts”It is important to note that the Sky Protocol will deviate from its equilibrium. This occurs when it receives system debt and system surplus through the collateral auctions and Vault stability fee accumulation. The Vow contract contains the logic to trigger both the debt (flop) and surplus (flap) auctions, which work to correct the system’s monetary imbalances.
Summary
- System Debt: In the case where Vaults are bitten (liquidated), their debt is taken on by the
Vowcontract as aSin(the system debt unit). TheSinamount is then placed in theSinqueue. Note: When theSinis not covered by aflipauction (within the dedicatedwaittime, theSinis considered to have bad debt to theVow. This bad debt is then covered through a debt auction (flop) when it exceeds a minimum value (thelotsize). - System Surplus: Occurs from stability fee accumulation, resulting in additional internal Dai in the
Vow. This surplus is then discharged through a surplus auction (flap).
4. Gotchas (Potential source of user error)
Section titled “4. Gotchas (Potential source of user error)”- When the
Vowis upgraded, there are multiple references to it that must be updated at the same time (End,Jug,Pot). - The
Vowis the only user with a non-zeroSinbalance (not avatinvariant as there can be multipleVows). - Ilk storage is split across the
Vat,Jug,PotandVowmodules. Thecatalso stores the liquidation penalty and maximum auction size. - A portion of the Stability Fee is allocated for the Dai Savings Rate (DSR) by increasing the amount of
Sinin theVowat everyPot.drip( )call. - Setting an incorrect value for
vowcan cause the surplus to be lost or stolen.
5. Failure Modes (Bounds on Operating Conditions & External Risk Factors)
Section titled “5. Failure Modes (Bounds on Operating Conditions & External Risk Factors)”Vault Liquidation
Section titled “Vault Liquidation”- A failure mode could arise when no actors call
kiss,flogorhealto reconcile/queue the debt.
Auctions
Section titled “Auctions”- A failure mode could arise if a user does not call
flaporflopto kick off auctions. Vow.wait, when set too high (waitis too long), theflopauctions can no longer occur. This provides a risk of undercollateralization.Vow.wait, when set too low, can cause too manyflopauctions, while preventingflapauctions from occurring.Vow.bump, when set too high, can result in noflapauctions being possible. Thus, if noflapauction takes place, there will be no MKR bidding as part of that process and, accordingly, no automated MKR burn as a result of a successful auction.Vow.bump, when set too low, results inflapauctions not being profitable for participants (lotsize is worth less than gas cost). Thus, no MKR will be bid during aflapauction and, as a result, there will be no automated MKR burn.Vow.sump, when set too high, noflopauctions are possible. This results in the system not being able to recover from an undercollateralized state.Vow.sump, when set too low,flopauctions are not profitable for participants (where thelotsize is worth less than gas cost). This results in MKR inflation due to automated MKR minting.Vow.dump, when set too high,flopauctions risk not being able to close or mint a large amount of MKR, creating a risk of MKR dilution and the possibility of a governance attack.Vow.dump, when set too low,flopauctions have to bekicked many times before they will be interesting to keepers.Vow.hump, when set too high, theflapauctions would never occur. If aflapauction does not occur, there is no sale of surplus, and thus, no burning of bid MKR.Vow.hump, if set too low, can cause surplus to be auctioned off viaflapauctions before it is used to cancelsinfrom liquidations, necessitatingflopauctions and making the system run inefficiently.
Released into the public domain (CC0 1.0 Universal) – trademarks remain with their owners; no warranty. See full license.