# Bucket contract

Bucket contract is an auxiliary contract that is responsible for storing TEZ tokens from TOK/TEZ liquidity pools (pairs). This contract is deployed for every TOK/TEZ pair and can't be changed. In time of exchange launch or liquidity investment TEZ tokens from [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract is transferred to this contract. In time of liquidity divestment TEZ tokens returns to [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract.

Bucket contract supports voting for bakers. In time of voting all TEZ tokens will be delegated to the best baker with a majority of votes. Also this baker can be changed during another vote operation.

The selected baker starts giving out baker's rewards that each user can claim (withdraw) at any time according to the number of votes that were given to the baker.

{% hint style="warning" %}
Baker can be banned by an administrator of [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract. Because of this [***vote***](/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/vote.md) operation can fail.
{% endhint %}

{% hint style="danger" %}
Almost all entrypoints on Bucket contract can be called only by [DexCore](/smart-contracts/dex-2.0/dexcore-contract.md) contract.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
