0g-chain/proto/kava/auction/v1beta1/auction.proto
Ruaridh ffef832d45
Upgrade to sdk v0.44.5 and add IBC (#1106)
- Upgrade cosmos-sdk to v0.44.5 from v0.39.2
- Add Legacy Tx Endpoint for backwards compatibility
- Add IBC v1.2.3 Support

Co-authored-by: DracoLi <draco@dracoli.com>
Co-authored-by: drklee3 <derrick@dlee.dev>
Co-authored-by: denalimarsh <denalimarsh@gmail.com>
Co-authored-by: Draco Li <draco@kava.io>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Denali Marsh <denali@kava.io>
2022-01-07 17:39:27 -07:00

83 lines
3.0 KiB
Protocol Buffer

syntax = "proto3";
package kava.auction.v1beta1;
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
option go_package = "github.com/kava-labs/kava/x/auction/types";
option (gogoproto.goproto_getters_all) = false;
// BaseAuction defines common attributes of all auctions
message BaseAuction {
option (cosmos_proto.implements_interface) = "Auction";
uint64 id = 1 [(gogoproto.customname) = "ID"];
string initiator = 2;
cosmos.base.v1beta1.Coin lot = 3 [(gogoproto.nullable) = false];
bytes bidder = 4 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
cosmos.base.v1beta1.Coin bid = 5 [(gogoproto.nullable) = false];
bool has_received_bids = 6;
google.protobuf.Timestamp end_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp max_end_time = 8 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
// SurplusAuction is a forward auction that burns what it receives from bids.
// It is normally used to sell off excess pegged asset acquired by the CDP system.
message SurplusAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}
// DebtAuction is a reverse auction that mints what it pays out.
// It is normally used to acquire pegged asset to cover the CDP system's debts that were not covered by selling
// collateral.
message DebtAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin corresponding_debt = 2 [(gogoproto.nullable) = false];
}
// CollateralAuction is a two phase auction.
// Initially, in forward auction phase, bids can be placed up to a max bid.
// Then it switches to a reverse auction phase, where the initial amount up for auction is bid down.
// Unsold Lot is sent to LotReturns, being divided among the addresses by weight.
// Collateral auctions are normally used to sell off collateral seized from CDPs.
message CollateralAuction {
option (cosmos_proto.implements_interface) = "Auction";
BaseAuction base_auction = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin corresponding_debt = 2 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin max_bid = 3 [(gogoproto.nullable) = false];
WeightedAddresses lot_returns = 4 [(gogoproto.nullable) = false];
}
// WeightedAddresses is a type for storing some addresses and associated weights.
message WeightedAddresses {
repeated bytes addresses = 1 [
(cosmos_proto.scalar) = "cosmos.AddressBytes",
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
];
repeated bytes weights = 2
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
}