mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
minor spec updates
This commit is contained in:
parent
08d6bc2284
commit
fecfee5077
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Auctions are broken down into three distinct types, which correspond to three specific functionalities within the CDP system.
|
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.
|
* **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, 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.
|
* **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:** 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 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.
|
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.
|
||||||
|
@ -30,9 +30,6 @@ type GenesisState struct {
|
|||||||
type Auction interface {
|
type Auction interface {
|
||||||
GetID() uint64
|
GetID() uint64
|
||||||
WithID(uint64) Auction
|
WithID(uint64) Auction
|
||||||
GetBidder() sdk.AccAddress
|
|
||||||
GetBid() sdk.Coin
|
|
||||||
GetLot() sdk.Coin
|
|
||||||
GetEndTime() time.Time
|
GetEndTime() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@ Users can bid on auctions using the `MsgPlaceBid` message type. All auction type
|
|||||||
type MsgPlaceBid struct {
|
type MsgPlaceBid struct {
|
||||||
AuctionID uint64
|
AuctionID uint64
|
||||||
Bidder sdk.AccAddress
|
Bidder sdk.AccAddress
|
||||||
Bid sdk.Coin
|
Amount sdk.Coin
|
||||||
Lot sdk.Coin
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -18,16 +17,16 @@ type MsgPlaceBid struct {
|
|||||||
|
|
||||||
* Update bidder if different than previous bidder
|
* Update bidder if different than previous bidder
|
||||||
* For Surplus auctions:
|
* For Surplus auctions:
|
||||||
* Update Bid Amount
|
* Update Bid to msg.Amount
|
||||||
* Return bid coins to previous bidder
|
* Return bid coins to previous bidder
|
||||||
* Burn coins equal to the increment in the bid (CurrentBid - PreviousBid)
|
* Burn coins equal to the increment in the bid (CurrentBid - PreviousBid)
|
||||||
* For Debt auctions:
|
* For Debt auctions:
|
||||||
* Update lot amount
|
* Update Lot amount to msg.Amount
|
||||||
* Return bid coins to previous bidder
|
* Return bid coins to previous bidder
|
||||||
* For Collateral auctions:
|
* For Collateral auctions:
|
||||||
* Return bid coins to previous bidder
|
* Return bid coins to previous bidder
|
||||||
* If in forward phase:
|
* If in forward phase:
|
||||||
* Update bid amount
|
* Update Bid amount to msg.Amount
|
||||||
* If in reverse phase:
|
* If in reverse phase:
|
||||||
* Update lot amount
|
* Update Lot amount to msg.Amount
|
||||||
* Extend auction by `BidDuration`, or `MaxEndTime`
|
* Extend auction by `BidDuration`, up to `MaxEndTime`
|
||||||
|
Loading…
Reference in New Issue
Block a user