# Buybacks & Recollateralization

The protocol at times will have excess collateral value or require adding collateral to reach the collateral ratio. To quickly redistribute value back to BDX holders or increase system collateral, two special swap functions are built into the protocol: buyback and recollateralize.&#x20;

## Recollateralization (Incentivized Swap)

Anyone can call the recollateralize function which then checks if the total BD-Stable collateral value in underlying fiat across the system is below the current collateral ratio. If it is, then the system allows the caller to add up to the amount needed to reach the target collateral ratio in exchange for BDX from BD-Stable treasury. The bonus rate is set to `3.00%` (the bonus amount could be changed by the DAO) to quickly incentivize arbitragers to close the gap and recollateralize the protocol to the target ratio. The bonus rate can be adjusted or changed to a dynamic PID controller adjusted variable through governance. \
\
$$BDX\_{received} = \dfrac{efBDXC\_r\*(Y\*P\_y)(1+B\_r)}{P\_z}$$

$$Y$$ is the units of collateral needed to reach the collateral ratio

$$P\_y$$ is the price in BD-Stable underlying fiat of Y collateral

$$B\_r$$ is the bonus rate for BFX rewarded when recollateralizing

$$efBDXC\_r$$ is the effective BDX coverage ratio

$$P\_z$$ is the price in BD-Stable underlying fiat of BDX

![Recollateralization: When eCR < CR - Send collateral (ETH/BTC) -> receive BDX + bonus](/files/K4al1FcapHEGAjJQQKGu)

**Example A: There is 100,000,000 BDEU in circulation at a 50% collateral ratio. The total value of collateral across the ETHs and WRBTC pools is 50m EUR (effective collateral ratio = 50%) and the system is balanced. The price of BDEU drops to 0.99 EUR and the protocol increases the collateral ratio to 50.25%, (effective collateral ratio stays 50%), BDX effective coverage ratio = 100%.**&#x20;

There is now `250,000 EUR` worth of collateral needed to reach the target ratio. Anyone can call the recollateralize function and place up to 250,000 EUR of collateral into pools to receive an equal value of BDX plus a bonus rate of `3.00%`.

Placing `62.5 ETH` at a price of `ETH/EUR = 4000` (worth `250000 EUR`) and a market price of `BDX/EUR = 3.8` is as follows:

$$BDX\_{received} = \dfrac{(250,000\*1.00)(1+.03)}{3.80}$$

$$BDX\_{received} = 67,763.16$$

**Example B: There is 100,000,000 BDEU in circulation at a 50% collateral ratio. The total value of collateral across the ETHs and WRBTC pools is 50m EUR (effective collateral ratio = 50%) and the system is balanced. The price of BDEU drops to 0.99 EUR and the protocol increases the collateral ratio to 50.25%, (effective collateral ratio stays 50%), BDX effective coverage ratio = 90%.**&#x20;

There is now `250,000 EUR` worth of collateral needed to reach the target ratio. Anyone can call the recollateralize function and place up to 250,000 EUR of collateral into pools to receive an equal value of BDX plus a bonus rate of `3.00%`. The BDX received will be decreased by the factor of BDX effective coverage ratio if it's below 100%. BDX is a deflationary token with a total limit of 21M, this mechanism ensures there are always some rewards available for recollateralization.

Placing `62.5 ETH` at a price of `ETH/EUR = 4000` (worth `250000 EUR`) and a market price of `BDX/EUR = 3.8` is as follows:

$$BDX\_{received} = \dfrac{0.9\*(250,000\*1.00)(1+.03)}{3.80}$$

$$BDX\_{received} = 60,986.84$$

## Buybacks

The opposite scenario occurs when there is excess collateral in the system than required to hold the target collateral ratio. This can happen a number of ways:&#x20;

* The protocol has been lowering the collateral ratio successfully keeping the price of BD-Stable stable
* Interest bearing collateral is accepted into the protocol and its value accrues
* Minting and redemption fees are creating revenue

In such a scenario, any BDX holder can call the buyback function to exchange the amount of excess collateral value in the system for BDX which is then burned by the protocol. This effectively redistributes any excess value back to the BDX distribution and holders don't need to actively participate in buybacks to gain value since there is no bonus rate for the buyback function. It effectively models a share buyback to the governance token distribution.&#x20;

$$Collateral\_{received} = \dfrac{Z\*P\_z}{P\_y}$$

$$Z$$ is units of BDX deposited to be burned\
$$P\_y$$ is the price in BD-Stable underlying fiat of the collateral\
$$P\_z$$ is the price in BD-Stable underlying fiat of BDX

![Buyback: when eCR > CR, send BDX -> receive collateral (ETH/BTC) in return](/files/Jj3DnHffErRlK5IjnKdp)

**Example C: There is 150,000,000 BDEU in circulation at a 50% collateral ratio. The total value of collateral across the ETHs and WRBTC pools is 76M EUR. There is 1M EUR worth of excess collateral available for BDX buybacks.**&#x20;

Anyone can call the buyback function and burn up to `1,000,000 EUR worth of BDX` to receive excess collateral.

Burning `1000 BDX` at a price of `BDX/EUR = 4.20` to receive ETH at a price of `ETH/EUR = 4000` is as follows:

$$ETH\_{received} = \dfrac{1000\*4.20}{4000}$$​

$$ETH\_{received} = 1.05$$​


---

# 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.blindex.io/diving-deeper/buybacks-and-recollateralization.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.
