# Bidder

The `Bidder` entity represents an account participating in the [auction](https://docs.casper.network/concepts/glossary/A/#auction) to become a [Validator](https://docs.cspr.cloud/rest-api/validator) for the era after the next one. It has the same properties as the Validator entity, with the network share value being projected instead of actual.

The `Bidder` entity has the following properties:

| Property                    | Type         | Description                                                                                                                                                                                                        |
| --------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `era_id`                    | `uint32`     | Auction era identifier                                                                                                                                                                                             |
| `rank`                      | `uint8`      | Projected validator rank based on total bid amount                                                                                                                                                                 |
| `public_key`                | `string(68)` | Bidder account public key represented as a hexadecimal string                                                                                                                                                      |
| `is_active`                 | `bool`       | Describes whether the bidder is active or not                                                                                                                                                                      |
| `bid_amount`                | `uint64`     | Amount of bidder bid stake                                                                                                                                                                                         |
| `self_stake`                | `uint64`     | Bidder self-stake calculated as a sum of the bidder stake and the stakes of the affiliated accounts provided via the [Casper Account Info Standard](https://github.com/make-software/casper-account-info-contract) |
| `delegators_stake`          | `uint64`     | Cumulative stake of all delegators                                                                                                                                                                                 |
| `total_stake`               | `uint64`     | Total bidder stake. The sum of the self-stake and the delegator stakes.                                                                                                                                            |
| `self_share`                | `float32`    | Percentage of the bidder's self-stake to its total stake                                                                                                                                                           |
| `network_share`             | `float32`    | Projected network stake share if the bidder becomes a validator                                                                                                                                                    |
| `fee`                       | `float32`    | Percentage of the rewards the bidder will retain for its services once becomes a validator                                                                                                                         |
| `delegators_number`         | `uint64`     | Number of delegators staked to the bidder                                                                                                                                                                          |
| `reserved_slots`            | `uint32`     | Number of delegator slots reserved for specific delegators                                                                                                                                                         |
| `minimum_delegation_amount` | `uint64`     | Minimum delegation amount in motes. Delegations below this amount will not be accepted and will be automatically undelegated if at any point the amount drops below the minimum                                    |
| `maximum_delegation_amount` | `uint64`     | Maximum delegation amount in motes. Delegations above this amount will not be accepted and the exceed funds will be automatically undelegated if at any points the amount goes above the maximum                   |

**Example**

```json
{
  "bid_amount": "6899807212331106",
  "delegators_number": 128,
  "delegators_stake": "99739883251183826",
  "era_id": 18011,
  "fee": 10,
  "is_active": true,
  "maximum_delegation_amount": "1000000000000000000",
  "minimum_delegation_amount": "500000000000",
  "network_share": "9.72010436555974",
  "public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca",
  "rank": 1,
  "reserved_slots": 0,
  "self_share": "6.47020558887665",
  "self_stake": "6899807212331106",
  "total_stake": "106639690463514932"
}
```

## Optional properties

Depending on the endpoint some of the following optional properties may be included in the `Bidder` entity:

| Property                   | Type                                                                                  | Description                                                                                                            |
| -------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/rest-api/account-info)                        | Bidder [account info](https://github.com/make-software/casper-account-info-contract) provided by the account owner     |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/rest-api/centralized-account-info) |                                                                                                                        |
| `cspr_name`                | `string`                                                                              | Primary CSPR.name of the account                                                                                       |
| `average_performance`      | [`ValidatorPerformance`](https://docs.cspr.cloud/rest-api/validator-performance)      | Moving average of validator performance based on the received rewards over the past 360 eras (approximately one month) |

## Relations

| Entity                                                                            | Mapping property | Description                                                                    |
| --------------------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------ |
| [`Account`](https://docs.cspr.cloud/rest-api/account)                             | `public_key`     | Auction bids are made by accounts                                              |
| [`Validator performance`](https://docs.cspr.cloud/rest-api/validator-performance) | `public_key`     | Bidders that were validators in the past have associated validator performance |
| [`Validator`](https://docs.cspr.cloud/rest-api/validator)                         | `public_key`     | Bidder become a Validator for the era after next one                           |

## Endpoints

The `Bidder` entity has the following endpoints:

* [Get bidder](https://docs.cspr.cloud/rest-api/bidder/get-bidder)
* [Get bidders](https://docs.cspr.cloud/rest-api/bidder/get-bidders)

## Relation endpoints

None
