> For the complete documentation index, see [llms.txt](https://docs.quipuswap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/ban_baker.md).

# ban\_baker

An entrypoint that bans or unbans bakers on this Bucket contract. Voting for a banned baker is not possible.

### Call parameters

```pascaligo
type ban_baker_t        is [@layout:comb] record [
  baker                   : key_hash;
  ban_period              : nat;
]
```

| Field       | Type      | Description                         |
| ----------- | --------- | ----------------------------------- |
| baker       | key\_hash | Baker for banning or unbanning      |
| ban\_period | nat       | Period for ban (0 to unban a baker) |

### Usage

Only [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract can call this entrypoint.

### Errors

* `403` - `sender` of the transaction is not [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract.
* `412` - non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).
