# Assignment

Once a clearing rate is determined, bids and offers can be assigned. All bids higher than the clearing rate and all offers lower than the clearing rate are eligible for assignment. All others are said to be "left on the table."&#x20;

The assignment process prioritizes lowest cost suppliers on the lending side and borrowers most willing to pay and continues until all possible matches at the clearing rate are exhausted. This ensures that resources are allocated to the most efficient suppliers and those with the best use of proceeds. Where there is excess supply or demand at the clearing price on the margin, those marginal lenders (borrowers) are allocated in proportion to their share of all offers (bids) at the marginal price. This process is known as [pro-rata on the margin allocation ](/protocol/term-auctions/auction-characteristics.md#pro-rata-on-the-margin-allocation)and follows standard convention common in traditional finance (see e.g. [U.S. Treasury auctions](https://www.newyorkfed.org/medialibrary/media/research/current_issues/ci11-2.html)).

The logic behind the assignment process can be found in the internal functions: `_assignBids` and `_assignOffers` within the `TermAuction.sol`contract.

{% hint style="info" %}
Submitting a bid greater than or an offer below the clearing rate does not guarantee assignment. Bids can be invalidated if the collateral posted against their bid is no longer sufficient to satisfy the maintenance margin at the time of auction clearing. Moreover, it is possible that the assignment methodology results in a situation where allocations may be exhausted before marginal bidders/offerors are assigned.&#x20;
{% 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.term.finance/protocol/term-auctions/complete-auction/assignment.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.
