# Blacksail Vaults

**Blacksail vaults** harness the power of compound interest by utilizing a harvest function that is called automatically (by various farming bots as well as Blacksail users), which converts DeFi token rewards and trading revenue into additional LPs (liquidity pool tokens) on behalf of the user and re-stakes them, allowing the rewards to compound exponentially by converting the APR (annual percentage rate) to APY (annual percentage yield) ie. compounded yearly rewards. This process attracts liquidity to the network by maximizing user yield and providing increased liquidity to the exchange.

Crypto reward tokens issued by the DeFi protocols to incentivize liquidity are converted to LPs for re-staking. First by converting the reward tokens to the tokens required by the liquidity pool, next by using these tokens to create additional LPs, and lastly re-staking them in the pool automatically.

**Blacksail Vault Interaction Flow:**<br>

<figure><img src="/files/DSnWfDTzhq9xXBqITAsZ" alt=""><figcaption><p><strong>Blacksail Vault Interaction Flow Fig 1</strong></p></figcaption></figure>

1. **Deposit Function:** User deposits LP tokens into the **Blacksail Vault**, where the user receives a tokenized receipt representing their share of the total LP balance, and delegated to the **Blacksail Strategy** contract which will deposit the tokens into the associated AMM masterchef to begin receiving rewards using the Blacksail Strategy **Desposit function**.
   * E*xample: 1 S-BTC LP are deposited into the Shadowdex Exchange Masterchef to receive Shadow tokens. User receives a Blacksail-S-BTC LP receipt, proportional to the total number of LPs that currently exist in the strategy.*
2. **Harvest Function:** Crypto reward tokens issued by the DeFi protocols are converted to LPs for re-staking by selling the rewards to the tokens required by the liquidity pool and then using these tokens to create additional LPs and re-staking them in the pool. This is done by executing the **Harvest function o**n the **Blacksail Strategy.**
   * *Example: The shadow token rewards earned from providing liquidity to the Shadowdex Exchange are exchanged 50% for Sonic and Bitcoin tokens and repaired as LP, then S-BTC LP are deposited into the Shadowdex Exchange Masterchef to earn an increased share of Shadow tokens.*
3. **Withdraw Function:** The withdraw function on the **Blacksail strategy** allows you to redeem your receipt tokens for your share of the **Blacksail vaults** LP tokens and your earnings (ie. your initial deposit + your compounded rewards = your total balance of LPs available to be withdrawn)
   * *Example: User withdraws Blacksail-S-BTC LP receipt to receive their share of S-BTC LP tokens from the pool.*


---

# 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.blacksail.finance/about-blacksail-finance/blacksail-vaults.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.
