diff --git a/x/auction/spec/01_concepts.md b/x/auction/spec/01_concepts.md index 08943870..a7365d0c 100644 --- a/x/auction/spec/01_concepts.md +++ b/x/auction/spec/01_concepts.md @@ -2,8 +2,8 @@ Auctions are broken down into three distinct types, which correspond to three specific functionalities within the CDP system. -* **Surplus Auction:** An auction in which a fixed lot of coins (c1) is sold for increasing amounts of other coins (c2). Bidders increment the amount of c2 they are willing to pay for the lot of c1. After the completion of a forward auction, the winning bid of c2 is burned, and the bidder receives the lot of c1. As a concrete example, forward auction are used to sell a fixed amount of USDX stable coins in exchange for increasing bids of KAVA governance tokens. The governance tokens are then burned and the winner receives USDX. -* **Debt Auction:** An auction in which a fixed amount of coins (c1) is bid for a decreasing lot of other coins (c2). Bidders decrement the lot of c2 they are willing to receive for the fixed amount of c1. As a concrete example, reverse auctions are used to raise a certain amount of USDX stable coins in exchange for decreasing lots of KAVA governance tokens. The USDX tokens are used to recapitalize the cdp system and the winner receives KAVA. -* **Surplus Reverse Auction:** An two phase auction is which a fixed lot of coins (c1) is sold for increasing amounts of other coins (c2). Bidders increment the amount of c2 until a specific `maxBid` is reached. Once `maxBid` is reached, a fixed amount of c2 is bid for a decreasing lot of c1. In the second phase, bidders decrement the lot of c1 they are willing to receive for a fixed amount of c2. As a concrete example. forward reverse auctions are used to sell collateral (ATOM, for example) for up to a `maxBid` amount of USDX. The USDX tokens are used to recapitalize the cdp system and the winner receives the specified lot of ATOM. In the event that the winning lot is smaller than the total lot, the excess ATOM is ratably returned to the original owners of the liquidated CDPs that were collateralized with that ATOM. +* **Surplus Auction:** An auction in which a fixed lot of coins (c1) is sold for increasing amounts of other coins (c2). Bidders increment the amount of c2 they are willing to pay for the lot of c1. After the completion of a surplus auction, the winning bid of c2 is burned, and the bidder receives the lot of c1. As a concrete example, surplus auction are used to sell a fixed amount of USDX stable coins in exchange for increasing bids of KAVA governance tokens. The governance tokens are then burned and the winner receives USDX. +* **Debt Auction:** An auction in which a fixed amount of coins (c1) is bid for a decreasing lot of other coins (c2). Bidders decrement the lot of c2 they are willing to receive for the fixed amount of c1. As a concrete example, debt auctions are used to raise a certain amount of USDX stable coins in exchange for decreasing lots of KAVA governance tokens. The USDX tokens are used to recapitalize the cdp system and the winner receives KAVA. +* **Surplus Reverse Auction:** Are two phase auction is which a fixed lot of coins (c1) is sold for increasing amounts of other coins (c2). Bidders increment the amount of c2 until a specific `maxBid` is reached. Once `maxBid` is reached, a fixed amount of c2 is bid for a decreasing lot of c1. In the second phase, bidders decrement the lot of c1 they are willing to receive for a fixed amount of c2. As a concrete example, collateral auctions are used to sell collateral (ATOM, for example) for up to a `maxBid` amount of USDX. The USDX tokens are used to recapitalize the cdp system and the winner receives the specified lot of ATOM. In the event that the winning lot is smaller than the total lot, the excess ATOM is ratably returned to the original owners of the liquidated CDPs that were collateralized with that ATOM. Auctions are always initiated by another module, and not directly by users. Auctions start with an expiry, the time at which the auction is guaranteed to end, even if there have been no bidders. After each bid, the auction is extended by a specific amount of time, `BidDuration`. In the case that increasing the auction time by `BidDuration` would cause the auction to go past its expiry, the expiry is chosen as the ending time. diff --git a/x/auction/spec/02_state.md b/x/auction/spec/02_state.md index fe383ed6..075cf08c 100644 --- a/x/auction/spec/02_state.md +++ b/x/auction/spec/02_state.md @@ -30,9 +30,6 @@ type GenesisState struct { type Auction interface { GetID() uint64 WithID(uint64) Auction - GetBidder() sdk.AccAddress - GetBid() sdk.Coin - GetLot() sdk.Coin GetEndTime() time.Time } @@ -47,8 +44,8 @@ type BaseAuction struct { MaxEndTime time.Time // Maximum closing time. Auctions can close before this but never after. } -//SurplusAuction type for forward auctions -typeSurplusAuction struct { +// SurplusAuction type for forward auctions +type SurplusAuction struct { BaseAuction } diff --git a/x/auction/spec/03_messages.md b/x/auction/spec/03_messages.md index b97d9745..3a26a722 100644 --- a/x/auction/spec/03_messages.md +++ b/x/auction/spec/03_messages.md @@ -9,8 +9,7 @@ Users can bid on auctions using the `MsgPlaceBid` message type. All auction type type MsgPlaceBid struct { AuctionID uint64 Bidder sdk.AccAddress - Bid sdk.Coin - Lot sdk.Coin + Amount sdk.Coin } ``` @@ -18,16 +17,16 @@ type MsgPlaceBid struct { * Update bidder if different than previous bidder * For Surplus auctions: - * Update Bid Amount + * Update Bid to msg.Amount * Return bid coins to previous bidder * Burn coins equal to the increment in the bid (CurrentBid - PreviousBid) * For Debt auctions: - * Update lot amount + * Update Lot amount to msg.Amount * Return bid coins to previous bidder * For Collateral auctions: * Return bid coins to previous bidder * If in forward phase: - * Update bid amount + * Update Bid amount to msg.Amount * If in reverse phase: - * Update lot amount -* Extend auction by `BidDuration`, or `MaxEndTime` + * Update Lot amount to msg.Amount +* Extend auction by `BidDuration`, up to `MaxEndTime`