# Borrow venue support

> How supplied stock is posted as collateral and borrowed against at Morpho Blue and Aave v4 markets, how venues are ordered and refinanced, and what happens after a liquidation.

Source: https://app.tango.finance/docs/vault/borrow-venues

A borrow venue is one position at a money market: supplied stock posted as collateral, and the stablecoin borrowed against it. Borrow venues are where the strategy takes its risk. If the stock's price falls far enough, the money market can liquidate part of the collateral. This page explains how venues work, how positions move between them, and what happens when a position is liquidated.

> **Key points**
>
> - Each borrow venue is a small adapter contract for one position at a Morpho Blue market or an Aave v4 market. Up to four can be registered.
> - The contract that holds supplied stock makes every call to the money market itself, as the owner of the position. A venue can only point it at its own protocol.
> - Forced withdrawals release collateral in the release order, which the operator sets.
> - After a liquidation, the operator can buy the lost stock back without a performance fee, using the surplus the liquidation left.

## What a borrow venue is

A borrow venue describes one position at a money market, and returns the calls needed to move it: supply collateral, withdraw it, borrow and repay. The venue itself never holds or moves a token. The vault, the contract that holds supplied stock, makes each call, so the position and its debt belong to it. See [Using a vault](https://app.tango.finance/docs/vault/overview.md). It refuses any call a venue returns to a contract other than that venue's protocol.

| Protocol | One venue is | Notes |
| --- | --- | --- |
| Morpho Blue | A position in one market, with a set collateral token, loan token, oracle, interest rate model and liquidation line | The market must already exist |
| Aave v4 | A position at one spoke, with the stock supplied to one reserve and the stablecoin borrowed from another | Only one venue per spoke, since the spoke treats everything held there as one account |

Every venue must take the supplied stock as collateral and lend the default stablecoin.

## Adding and removing a venue

| Change | Who | Delay |
| --- | --- | --- |
| Add a borrow venue | Curator | The curator's delay, at least three days |
| Remove an empty borrow venue | Operator | None, but only with no collateral and no debt there |
| Abandon a venue that cannot be read | Curator | The curator's delay |
| Set the release order | Operator | None |

Registration refuses a venue whose protocol is the stock, a stablecoin, a lending venue, the contract itself or its swapper. It also refuses two venues that would read the same collateral or the same debt, since each would count it in full.

## Collateral and debt at each venue

At each venue, the contract counts the lower of the collateral it supplied and the collateral the venue reports. If the venue reports less, for example after a liquidation, less is counted at once. Anything a protocol adds to the position is not counted.

Debt is read from the venue with interest up to the current block, rounded up. All debt across venues sits in the stablecoin book, never in share value.

## The release order

The release order lists every borrow venue once. A forced withdrawal releases collateral from venues in this order, taking all it needs from the first before moving to the next. Holders cannot choose another order. A new venue joins at the end.

The operator sets the order without delay. A venue near its liquidation line, or one whose withdrawals fail, should be moved to the back, since an exit that reaches it fails there. See [Withdrawals](https://app.tango.finance/docs/vault/withdrawals.md#what-can-still-limit-it).

## Moving a position between venues

The operator can refinance, moving debt and collateral from one venue to another in a single transaction. It brings stablecoin back from lending, repays at the first venue, withdraws that collateral, supplies it at the second venue and borrows there. With more than one venue, the strategy can move to wherever borrowing costs less. On tango.finance, the curation service also posts new stock at the venue where borrowing costs least.

Each stock's page shows which borrow venues it uses today, on the Allocation tab.

## Health and liquidation

Each venue's position has a loan-to-value (LTV), its debt divided by its collateral's value. The protocol sets a liquidation line. Above it, anyone can repay part of the debt and take collateral at a discount. The contract does not manage LTV itself. The operator does, offchain. On tango.finance, the curation service repays debt when a venue's LTV rises past its limit, and acts urgently when it nears the liquidation line. It also holds a lower LTV while US stock markets are closed, stepping down before each close and back up during the next trading day. See [Market hours](https://app.tango.finance/docs/vault/risks.md#market-hours).

A forced withdrawal repays each venue's debt in proportion to the collateral it releases. It keeps each venue's LTV where it was, but does not lower it.

### What happens after a liquidation

A liquidation lowers the stock counted, so share value falls as soon as the venue reports it. The debt the liquidator repaid shows up as surplus in the stablecoin book. The contract records how much stock was written down, and lets the operator buy that much back with a **rebuy**:

- A rebuy spends surplus default stablecoin on the stock, with no performance fee.
- It can buy at most the stock written down and not yet bought back.
- It is checked against oracle prices, like a harvest.

Liquidators keep a bonus, so a rebuy usually cannot buy back everything that was taken. Holders who leave before the rebuy do not share in it. Stock bought by a harvest also counts against what a rebuy may still buy, so no stock is bought back twice.

## A venue that cannot be read

Every valuation reads each borrow venue's collateral and debt. If either read fails, for example after the protocol pauses or changes its contracts, deposits and every withdrawal stop, including those from idle stock. The way out is for the curator to abandon the venue, behind its delay. Abandoning writes off the collateral supplied there and stops counting its debt. The stablecoin borrowed against it stays in the book, where a rebuy can turn it back into stock.
