# What is Blacksail Finance?

**Blacksail Finance** is an advanced smart contract yield compounding suite built on the Sonic Blockchain network. Blacksail helps users earn more cryptocurrency by automatically compounding their DeFi rewards for their crypto tokens into their original assets, allowing users to easily earn more of their favorite holdings.&#x20;

Additionally, while other projects retain their revenues and charge substantial fees, Blacksail instead reinvests and distributes rewards through a bonded USDC revenue token known as **SAIL**. This approach allows users to grow alongside the platform and build their own treasury reserve backed by a liquid stable coin.  SAIL tokens can be redeemed from the bonding curve to receive USDC, while the value of the tokens is scaled up as demand increases. SAIL can also be used as collateral to borrow USDC for other uses while earning swap revenues.

<figure><img src="/files/zY8tdaOxIwr9b4eLql7o" alt=""><figcaption></figcaption></figure>

Blacksail Finance is on a mission to fortify decentralized finance on the Sonic Network. The Blacksail protocol aims to support all of the projects on the Sonic Network by:&#x20;

* Developing customized yield strategies that both optimize and align incentives on each platform, driving robust liquidity to the ecosystem.
* Removing the guesswork and difficulty of discovering and capitalizing on yield strategies for our users. Allowing them to receive more of their favorite tokens without any additional work.
* Empowering individuals to build a liquid USDC reserve (represented by the SAIL token) to strategically fund and invest in both up and coming and established Sonic protocols alike.


# Compounding Rewards

**Auto-compounding** refers to the process of no longer having to manually claim and re-stake your staking rewards earned from DeFi (decentralized finance) protocols.

<figure><img src="/files/9p0vA2EoIo1DOgn6RuLj" alt=""><figcaption><p>$1000 Principal Compounded Over Time Example</p></figcaption></figure>

Instead, Blacksail automatically converts your rewards into additional LPs and re-stakes them for you allowing you to compound your rewards exponentially by converting your APR (annual percentage rate) to APY (annual percentage yield) compounded yearly rewards using the compound rate (N).&#x20;

```
APY = (1+APR/N)^N-1
```

**Example Calculation:**

Let's say you have a **250% APR** and the interest is compounded daily, this equates to approximately **1109.35% APY**.

1. **Divide the APR by the number of compounding periods per year:**

```
Periodic Rate (APR/N) = 2.5012/365 = 0.00685260274
```

2. **Add 1 to the periodic rate:**

```
1+0.00685260274 = 1.00685260274
```

3. **Raise the result to the power of the number of compounding periods:**

```
1.00685260274^(365) = 12.0935117
```

4. **Subtract 1 from the result to get the APY:**

```
12.0935117−1 = 11.0935117 or 1109.35%
```

So, the APY for an APR of 250% with monthly compounding is approximately **1109.35% APY**.\
\
[*“Compound interest is the eighth wonder of the world. " - Albert Einstein*](#user-content-fn-1)[^1]

[^1]:


# Harvester/Compound Events

How Often Do the Vaults Compound Rewards?

Our harvester bots are hosted in the highly reliable AWS cloud for nearly 100% uptime and operate on a regular schedule. Here's how they work:

**Frequency:** The bots run every 5 minutes, scanning for the profitability of the vault's harvest event.

**Execution:** If the 0.5% harvester dedicated reward fee is greater than the gas cost to compound the pool, the bots will execute. This means the upper bound for harvesting is approximately every 5 minutes but scales on the reward rate and total value of the vault (TVL).

**Harvest on Deposit Events:** We also harvest on every deposit into the vault to protect against any existing user-earned rewards being distributed to new depositors.

**Baseline Harvest Period:** Our baseline harvest period is every 2 hours for vaults that have over $200 TVL, ensuring we do not drop below this frequency. Vaults below this TVL may not be picked up by the bot and may require a longer wait between harvest events. If users do not wish to wait for the next event, there is a manual harvest interaction option on the vault as described below.

## How to Manually Harvest a Vault

**Manual Harvest:** There is a manual harvest button available in the vault info for users who do not want to wait for the next harvest event or would like to trigger a harvest event before they withdraw their tokens.

<figure><img src="/files/HrcbpUiKASiMESEpYNZr" alt=""><figcaption><p>Fig 1.1 Vault Info Card, Manual Harvest Interaction Button</p></figcaption></figure>

## Checking Harvest/Compound Events

To check the harvest/compound events, you can click on the Strategy link in the vault card:

<figure><img src="/files/YnXGOPJLYtjz68zJhU2N" alt=""><figcaption><p>Fig 1.2 Vault Info Card, Strategy Address Interaction Button</p></figcaption></figure>

This will take you to the **sonicscan.org block explorer** and you can view the time and details of each harvest event.

<figure><img src="/files/ycbsfh9w5iER5MCIkRNi" alt=""><figcaption><p>Fig 2.1 Sonicscan.org Blockchain Explorer Strategy Transaction View</p></figcaption></figure>


# 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.*


# SAIL Token

Blacksail Finance is backed by a bonded USDC **revenue sharing** token which purchases and distributes platform rewards back to LP providers known as SAIL. The **SAIL Token** is backed by a liquid reserve of USDC which is readily available for redemption via the SAIL Bonding Curve. More information about the SAIL bonding curve can be found in [SAIL Bonding Curve](/about-blacksail-finance/sail-bonding-curve)

<figure><img src="/files/N29wvyHO6cnATqSrCpen" alt=""><figcaption></figcaption></figure>

## SAIL Tokenomics

* **Total Supply:**&#x20;
  * 700,000 tokens (100%)
* **Open Market Curve Available Balance (Remaining Balance):**&#x20;
  * 525,000 tokens (75%)
* **User Whitelist Allocation:**&#x20;
  * 140,000 tokens (20%) \**estimated but depends on total user whitelist participants*
* **Protocol Whitelist Allocation:**&#x20;
  * 35,000 tokens (5%)

### **SAIL tokens enable users to enjoy the following benefits:**

1. **Vault Revenue Sharing:** SAIL token holders receive 50% of all protocol revenues, distributed directly to them via the protocol SAIL vault.
2. **Swap Revenue Sharing:** SAIL token holders receive 80% of all swap revenues, distributed directly to them via SAIL lending.
3. **Redemption for USDC:** Tokens can be redeemed anytime for USDC through the SAIL curve, which is backed by a fully liquid reserve.
4. **Collateral for USDC:** Tokens can be used as collateral to borrow USDC for other uses while earning swap revenues.
5. **Scaling Buy Pressure:** Periodic fee redistributions drive consistent buy pressure, scaling with Blacksail’s Total Value Locked (TVL) growth.
6. **Price Appreciation via Bonding Curve:** Limited token supply ensures pricing growth is governed by a bonding curve function, rewarding early adopters and participants.
7. **Exclusive Airdrops:** Holders are eligible for partner airdrops, including tokens, NFTs, and other rewards.
8. **Governance Rights:** Owning SAIL tokens grants full voting rights, empowering holders to shape the future direction of Blacksail Finance.
9. **Protocol Benefits:** Token holders enjoy the advantages of ongoing protocol development, with new use cases and features continually enhancing SAIL’s utility<br>


# SAIL Bonding Curve

A **bonding curve** is a pricing mechanism that determines the price of a token based on its supply. As more tokens are bought, the price per token generally increases according to a pre-defined mathematical function (e.g., linear or exponential). This approach creates a dynamic, automated pricing system that reflects demand.

In the **SAIL Bonding Curve**, buyers deposit an asset (such as USDC) to purchase tokens (such as SAIL). The bonding curve contract mints new tokens based on the current price along the curve and builds token liquidity with the deposited balance. Conversely, tokens can be sold back, with the contract returning the corresponding amount of the underlying asset. \
\
The **ERC20BondingCurve** (SAILBondingCurve) contract serves as the token mechanism for SAIL, with an integrated bonding curve that distinguishes it from standard ERC20 tokens. This bonding curve operates as a constant function market maker utilizing two token reserves. These reserves consist of a base token (e.g., USDC) and SAIL. The bonding curve follows the equation:

**`K = rUSDC * rSAIL`**

Here, **K** is a constant, **rUSDC** represents USDC in the reserve, and **rSAIL** represents SAIL in the reserve.

The reserve SAIL (**rSAIL**) always mirrors the actual SAIL supply (**aSAIL**) within the bonding curve. The USDC reserve (**rUSDC**) is divided into three distinct components: virtual USDC (**vUSDC**), borrowed USDC (**bUSDC**), and actual USDC (**aUSDC**). The protocol employs **vUSDC** and **bUSDC** as placeholders in the reserve.

* **vUSDC** sets the initial USDC reserve value but doesn't exist as actual liquidity. This mechanism concentrates the available liquidity, establishing a price floor and enhancing the protocol's capital efficiency.
* **bUSDC** ensures the reserve's integrity by accounting for USDC borrowed from the bonding curve.
* **aUSDC** and **aSAIL** represent liquid USDC and SAIL in the reserves, respectively.

This division allows the bonding curve's constant **K** to be redefined as:

**`K = (vUSDC + bUSDC + aUSDC) * (aSAIL)`**

## Initial State

The initial state of the bonding curve depends on **vUSDC** and the total SAIL supply (**tsSAIL**). For example, if **vUSDC** and **tsSAIL** are both set to 100, the reserves would be:

**K = 100 rUSDC \* 100 rSAIL**\
**K = (100 vUSDC + 0 bUSDC + 0 aUSDC) \* (100 aSAIL)**\
Initial SAIL price:**100 vUSDC / 100 aSAIL = 1 USDC/SAIL**

At this point, there is no liquid USDC in the reserves, but this isn’t problematic because no SAIL has entered circulation. Actual USDC liquidity is added when SAIL is purchased from the bonding curve. For instance, after a purchase of 1 SAIL, the reserves adjust as follows:

**`K = (100 vUSDC + 0 bUSDC + 1.01 aUSDC) * (99 aSAIL)`**\
**`SAIL Price = (100 vUSDC + 1.01 aUSDC) / 99 aSAIL ≈ 1.02 USDC/SAIL`**

Once there is SAIL in circulation, any sold back into the bonding curve will access the actual USDC liquidity. The final SAIL token sold would be exchanged at the established floor price, ensuring SAIL's price cannot fall below this value, and liquidity remains available for sellers.

## Swap Mechanism

Each SAIL purchase from the bonding curve increases its price. This reduces the reserve SAIL (**rSAIL**) while increasing the reserve USDC (**rUSDC**).

* For purchases, the USDC input (**inUSDC**) from the buyer determines the amount of SAIL tokens received (**outSAIL**) using the formula:\
  **`outSAIL = (aSAIL * inUSDC) / (vUSDC + bUSDC + aUSDC + inUSDC)`**
* When SAIL is sold back, the reverse occurs: the reserve USDC decreases, while reserve SAIL increases. The USDC output (**outUSDC**) for the seller is calculated as:\
  **`outUSDC = ((vUSDC + bUSDC + aUSDC) * inSAIL) / (aSAIL + inSAIL)`**

## Swap Fees

A 2.5% fee is applied to every transaction on the bonding curve. This fee is deducted from the input token and held in the treasury, outside of the bonding curve reserves. These accumulated fees are periodically distributed to designated addresses or contracts when triggered by specific functions. As swaps/redemptions occur. A harvest function can be called by anyone at any time to transfer the tokens in the treasury to their appropriate addresses.

The Fee Treasury Split is;

* 80% to SAIL lenders (2% total)
* 20% to Blacksail Treasury (0.5% total)

*Please note in the following examples that the swap fee amount is simplified to 1% for better readability.*

## B**uy scenario example:**

<figure><img src="/files/Ll3Y4RJ6b3drfyEN1hAQ" alt=""><figcaption><p>SAIL Bonding Curve Buy Example Fig 1</p></figcaption></figure>

<figure><img src="/files/Kb7eYhalsjiKaB0B9S2F" alt=""><figcaption><p>SAIL Bonding Curve Buy Example Fig 2</p></figcaption></figure>

1. **Current Supply of SAIL**: There are 50 SAIL tokens currently in the bonding curve backed by 100 USDC.
2. **User Purchase Attempt**: A user decides to buy SAIL with **50.5 USDC**.
3. **Swap Fee**: The system takes a **0.5 USDC fee** for the protocol. Leaving **50 USDC** for actual token purchasing.
   1. The majority of the fee (80%) is paid to SAIL lenders while they are using their SAIL as collateral for USDC.
   2. The minority of the fee (20%) is allotted to the Blacksail protocol to support protocol operations.
4. **Token Issuance**: Based on the bonding curve formula, the user receives **10 SAIL** tokens for their 50.5 USDC (assuming the price formula calculated this amount).

This process achieves a few things:

* **Dynamic Pricing**: Each purchase or sale adjusts the price on the curve, reflecting the token's increasing demand or supply.
* **SAIL Lending Rewards**: The majority of the swap fee is used to pay SAIL lenders while they are using their SAIL as collateral for USDC.
* **Treasury Funding**: A small portion directed to the treasury, helping sustain the protocol's operation.
* **User Benefits**: The user receives SAIL tokens, potentially at a lower cost compared to a traditional exchange if they act early when the token supply is low, rewarding early adopters of the protocol and encouraging long-term adoption.<br>

## S**ell scenario example:**<br>

<figure><img src="/files/Tpj5bttWMLP4X02MO82P" alt=""><figcaption><p>SAIL Bonding Curve Sell Example Fig 3</p></figcaption></figure>

The user sells **10.1 SAIL** to the bonding curve and receives **33.33 USDC** (calculated using the price formula). Before the transaction, the reserves were **200 rUSDC** and **50 rSAIL**.

After the sale:

* The **rUSDC** reserve decreases to **166.67 USDC** as 33.33 USDC is sent to the seller.
* The **rSAIL** reserve increases to **60 SAIL**, reflecting the 10 SAIL sold by the user.
* The system takes a **0.1 SAIL fee** for the protocol.&#x20;
  * The majority of the fee (80%) is paid to SAIL lenders while they are using their SAIL as collateral for USDC.
  * The minority of the fee (20%) is allotted to the Blacksail protocol to support protocol operations.

#### This process achieves several outcomes:

* **Dynamic Pricing**: Selling SAIL increases the token reserve within the bonding curve while reducing the USDC reserve. This adjustment lowers the SAIL price, creating opportunities for new buyers and maintaining a dynamic balance between supply and demand.
* **SAIL Lending Rewards**: The majority of the swap fee is used to pay SAIL lenders while they are using their SAIL as collateral for USDC.
* **Treasury Funding**: A small portion directed to the treasury, helping sustain the protocol's operation
* **User Benefits**: The user exits their SAIL position with predictable liquidity provided by the bonding curve. The transparent pricing mechanism ensures fairness and mitigates reliance on volatile external markets.


# SAIL Curve Leveraging

Blacksail Finance offers users the ability to leverage their positions within our innovative bonding curve model. The **SAIL Curve Leveraging** feature enables users to maximize their capital efficiency while maintaining a stable ecosystem for all participants. SAIL can be used as collateral to borrow USDC for other uses with 0 interest, while earning swap revenues.

<figure><img src="/files/K6sYfAMFOQolszAchBHH" alt=""><figcaption></figcaption></figure>

## How Leveraging Works&#x20;

1. Deposit USDC to Acquire SAIL
   * Users start by depositing USDC into the SAIL bonding curve contract to receive SAIL tokens.&#x20;
2. Lock SAIL to Borrow USDC
   * After obtaining SAIL, users can lock their SAIL tokens and borrow USDC against them with no interest.
     * **Important Note:** Swap fees from the bonding curve slowly pay off the outstanding user balance allowing users to borrow more tokens gradually over time, if they choose not to pay off the full amount of the lend.
   * The borrowed USDC allows users to recapture a portion of the funds they initially used to buy SAIL.

## Borrowing Dynamics&#x20;

The amount of USDC that can be borrowed against locked SAIL depends on the current supply of SAIL in the bonding curve contract:

* Early Buyers: The first buyers of SAIL from the bonding curve can borrow most of their USDC back after locking their SAIL.&#x20;
* Later Buyers: As the supply of SAIL decreases (more SAIL is purchased), the amount of USDC available for borrowing gradually reduces.&#x20;

**Important Note:**  When SAIL is locked and leveraged, it cannot be transferred or sold until the borrowed debt is fully repaid.

## Borrowing Formula&#x20;

The following formula determines the amount of USDC (outUSDC) that can be borrowed from a specific amount of locked SAIL (colSAIL):

**`outUSDC`**` ``= ((vUSDC * tsSAIL) / (tsSAIL - colSAIL)) – vUSDC`

* **vUSDC**: The initial USDC value in the bonding curve.&#x20;
* **tsSAIL**: Total supply of SAIL.&#x20;
* **colSAIL**: Amount of locked SAIL used as collateral.&#x20;
* **outUSDC**: Borrowable USDC amount.&#x20;

## Preserving the Ecosystem: USDC Reserves&#x20;

To maintain the integrity of the system, USDC reserves are split into two categories:

1. Borrowed USDC (bUSDC)
   * Represents placeholder USDC that’s backed by locked SAIL collateral.&#x20;
   * Borrowed USDC ensures the bonding curve remains stable and that every locked SAIL remains collateralized.&#x20;
2. Active USDC (aUSDC)
   * Represents actual USDC reserves available for liquidity, swaps, and participant exits.&#x20;
   * Active USDC determines the price range, ensuring every circulating SAIL token can exit the system safely.&#x20;

## Price Floor Calculation&#x20;

The SAIL price floor represents the minimum price level that ensures system stability. The price floor is determined by the following formula:

`SAIL Price Floor = (vUSDC + bUSDC) / aSAIL`

* **aUSDC**: Active USDC in the reserve, representing available liquidity.&#x20;
* **bUSDC**: Borrowed placeholder USDC, collateralized by locked SAIL.&#x20;
* **aSAIL**: Actual circulating supply of SAIL.&#x20;

The price floor ensures that the bonding curve maintains sufficient liquidity and stability, while the price ceiling can grow infinitely.

## Repayment and Unlocking SAIL&#x20;

To unlock their collateralized SAIL (colSAIL), users must:

1. Repay their borrowed USDC (outUSDC).&#x20;
   * No interest is charged on borrowed USDC.&#x20;
   * Swap fees from the bonding curve slowly pay off the outstanding user balance allowing users to borrow more tokens gradually over time, if they choose not to pay off the full amount of the lend.
2. Once repaid, bUSDC is converted back into aUSDC, ensuring the system maintains its liquidity reserves.&#x20;
3. The user can then sell their unlocked SAIL back into the bonding curve to retrieve USDC. <br>

**Important Note:**  SAIL is never liquidated while USDC is borrowed, the borrowed USDC is always available for repayment to unlock their collateralized SAIL.

## Ecosystem Benefits&#x20;

Blacksail's leveraging system is designed to:

* Maximize capital efficiency for participants.
* Ensure price stability and ecosystem sustainability.&#x20;
* Create a fair market structure where active liquidity (aUSDC) ensures exits for all circulating SAIL.&#x20;

By balancing leverage with strict collateralization and liquidity management, Blacksail Finance empowers users while safeguarding the long-term stability of the protocol.


# SAIL Whitelist

<figure><picture><source srcset="/files/qTY8ys0Tw5eBs7r8SCrz" media="(prefers-color-scheme: dark)"><img src="/files/6lfSRZPjvWlejCUPWBk7" alt="" width="169"></picture><figcaption></figcaption></figure>

## Whitelist Information

Blacksail will be whitelisting users deposited in Blacksail vaults prior to launching the SAIL token which is priced using a bonding curve function and is liquid via USDC reserves.\
\
Blacksail will launch in **Phase 1** with a curated selection of vaults to drive liquidity to our partner exchanges, at this time users can earn eligibility into the **whitelist** by participating in the pools via a snapshot. In **Phase 2** the SAIL token will be made available to whitelisted participants, during the SAIL token initial launch with revenue rewards and voting rights. Lastly, in **Phase 3** the whitelist will expire, and the SAIL token will be readily available for acquisition for all market participants.

**Launch Phases:**

1. **Blacksail Protocol Launch and Snapshots**: Blacksail ver 1.1 will be released, and the team will continuously be optimizing and deploying yield strategies (vaults) for our partner exchanges. At this time we will be collecting blockchain data pertaining to user deposits, which will grant eligibility in the upcoming whitelist. Other requirements include being a member in the protocol Discord, Twitter, and Telegram channels. More information can be found on the [Blacksail Twitte](https://x.com/blacksail_fi)[r ](https://x.com/blacksail_fi)page. \
   \
   To improve the whitelist quality, users with greater than 100 USDC of TVL deposited in the platform will be eligible for a whitelist of up to 500 USDC total deposits in the SAIL curve before the Curve becomes open to the public.\
   \
   *Duration: We estimate this phase to last approximately 1 month.*<br>
2. **Whitelist Phase:** At this time whitelisted users will be able to deposit USDC in the SAIL bonding curve to receive SAIL tokens up until their 500 USDC total available balance/allotment.  Once this allotment is met, users will no longer be able to purchase additional SAIL tokens even if they have disposed of (sold) their SAIL tokens/redeemed them for USDC via the curve.\
   \
   Note: During this phase the protocol will purchase 5% of the total SAIL from the bonding curve to use for marketing, development, and infrastructure purposes and this amount will be accessible periodically after a timelock expiration. More information about the protocol allocation can be found in [Anti-Whaling Policies](/about-blacksail-finance/anti-whaling-policies).\
   \
   *Duration: We estimate this phase to last approximately 2 weeks.*<br>
3. **SAIL Token Full Launch:** SAIL revenue allocation and protocol buyback goes fully live. Users will be able to purchase SAIL from the bonding curve despite their whitelist status. \ <br>

   <figure><img src="/files/eS0HbEOeUm78GxC4vjwT" alt=""><figcaption><p>SAIL Token Initial Distribution Fig 1.1</p></figcaption></figure>

*SAIL Token Initial Distribution Fig 1.1 Legen&#x64;**:***

* **Open Market Curve Available Balance (Remaining Balance):**&#x20;
  * 525,000 tokens (75%)&#x20;
* **User Whitelist Allocation (Est.:**&#x20;
  * 140,000 tokens (20%) \*estimated but depends on total user whitelist participants&#x20;
* **Protocol Whitelist Allocation:**&#x20;
  * 35,000 tokens (5%)&#x20;
* **Total Supply:**&#x20;
  * 700,000 tokens (100%)


# Blacksail Parlays

## Parlay Overview

A **parlay** is a type of contest where participants purchase tickets for a chance to win a prize. In the context of **Blacksail Parlays**, users can either&#x20;

1. purchase blocks for a chance to win a whitelisted NFT sent directly to the winning wallet address \
   OR
2. users can create their own parlay game with any whitelisted NFT collection on Sonic, specifying the NFT ID, total game price, and duration; to earn Sonic.

## Creating a Parlay on Sonic

1. **Whitelisted NFT Collection**: You can create a parlay using any NFT collection that has been whitelisted on Sonic. This ensures that only verified and approved NFTs are used in the parlay. \
   \
   *Note: If you would like to use an NFT from a collection that has not been whitelisted, reach out to the Blacksail team for a whitelist request via Discord or TG.*
2. **NFT ID**: Each NFT in the collection has a unique identification number, known as the NFT ID. This ID is used to specify which NFT is being included in the parlay.
3. **Game Price and Duration**: The game price is the cost associated with participating in the game, and the duration is the length of time the game will run. Options include anywhere from 12 hours to 14 days.
4. **Block Price Setting**: The block price is set based on the game price. This means that the price for each block/ticket of the parlay is determined by the overall game price divided by the number of players.

## Example Game

Let's say you want to create a parlay with the following details:

* **NFT Collection**: Derps
* **NFT ID**: 484
* **Game Price**: 441 Sonic
* **Duration**: 7 days

In this example, the block price will be set based on the 441 Sonic game price, and the parlay will run for 7 days.

<figure><img src="/files/hPg9SVTBZeGWmh44AXqR" alt=""><figcaption><p>Fig 1.1 Deploying a Parlay<br><br></p></figcaption></figure>

## Selecting & Purchasing Blocks

In the Blacksail Parlay game view you can purchase blocks by simply  clicking on the NFT image on the blocks you would like, which will be highlighted as **Blue blocks** and clicking "Purchase Selected Blocks" to acquire the selected tickets.\
\
You will be prompted to approve and submit the transaction via your connected wallet. Purchased (owned) tickets will show up as **green blocks** in the UI, other users tickets will show up as **red blocks**.

<figure><img src="/files/wPLmHq8j5BdzkqekgCzU" alt=""><figcaption><p>Fig 1.2 Purchasing Parlay Squares<br><br></p></figcaption></figure>

## Game Outcomes

1. A user purchased the winning block:
   1. The user that purchased the winning block will receive the NFT from the Parlay contract, sent directly to their wallet that they used to purchase the blocks. The parlay creator will receive their NFT along with the raffle ticket pool (ie the total amount of sonic used to purchase the squares by the players).
2. No user purchased the winning block:
   1. If there is no winner, then the parlay creator will receive their NFT they used to create the game along with the raffle ticket pool (ie the total amount of sonic used to purchase the squares by the players).

## Viewing Previous Games

You can view past Parlays by clicking on the "Archived" tab in the Blacksail Parlays page, here you will be able to view the winning block, along with a direct link to the Parlay game contract and the winning address.&#x20;

<figure><img src="/files/b6kvQoC6mgidyVHzaNah" alt=""><figcaption><p>Fig 1.3 Viewing Previous Games</p></figcaption></figure>


# Anti-Whaling Policies

At Blacksail Finance, we are committed to fostering a fair and equitable market for our community. Our **anti-whaling policies** aim to counteract the challenges faced by bonding curve models and prevent the negative impact of early whale buyers who dominate supply and destabilize token value.

<figure><img src="/files/y3YjsTcZYbBpJzwq9wkO" alt=""><figcaption></figcaption></figure>

## The Problem with Whales&#x20;

In traditional bonding curve models:

* Whales (large-scale investors) tend to dominate early markets by purchasing large portions of the token supply.&#x20;
* This behavior creates an unfair market, where early big buyers (Whales):&#x20;
  * Push token prices up rapidly due to bonding curve mechanics.&#x20;
  * Eventually "dump" their holdings at inflated prices, causing significant value loss for smaller investors.&#x20;

These practices harm the broader community and undermine trust in the protocol.

## Our Solution: A Closed Market with Purchase Caps&#x20;

To prevent these issues and ensure fair market participation, Blacksail Finance has implemented the following measures during the early phase of SAIL token distribution:

## Closed Market for Early Investors&#x20;

A closed market period will give early investors a fair chance to purchase SAIL tokens without the risk of whale domination.&#x20;

During this period: A purchase cap of $500 USDC per person will be enforced. This cap prevents any single individual from acquiring an oversized position in the token supply, reducing the likelihood of "pump and dump" scenarios.&#x20;

## Eligibility for the Closed Market

Only whitelisted individuals will be allowed to participate in the closed market phase. To qualify for whitelisting:

Users must have a deposited value of $100 or more in Blacksail Finance vaults during the snapshot period. This ensures that early investors are genuine participants in the protocol's ecosystem and rewards our community members for their engagement.

## Protocol Safeguards: Timelocked Supply&#x20;

The protocol itself will play a role in ensuring a balanced token launch:

* Upon deployment of the SAIL curve contract, the protocol will:&#x20;
  * Purchase the first \~5% of the supply.&#x20;
  * Timelock this supply in a smart contract for an extended period, lasting beyond the closed market phase and well into the open market period of SAIL.&#x20;

This timelock adds additional stability and discourages speculative market manipulation.

## Benefits of Our Approach&#x20;

By implementing these measures, Blacksail Finance ensures:

* A fair and transparent market for all participants.&#x20;
* Protection against whale domination and speculative dumping.&#x20;
* Stronger trust and long-term value for our community.&#x20;

We are committed to creating a sustainable and balanced ecosystem that benefits everyone, not just the largest players.


# Protocol Revenue

Blacksail Finance was built with low fees in mind after becoming frustrated with high fees imposed by other protocols which have become standard in the DeFi ecosystem.

## Vault Fees

Blacksail has a flat 4.5% fee on AMM Farming Rewards and does not impose any fees on deposits or withdrawals however there may be a third-party fee for withdrawals and deposits charged by the farm provider aka DEX (decentralized exchange)

Additionally, while other projects retain their revenues and charge substantial fees, Blacksail instead reinvests and distributes protocol revenue as rewards through a bonded USDC revenue token known as SAIL. This approach allows users to grow alongside the platform and build their own treasury reserve backed by a liquid stable coin. SAIL tokens can be redeemed from the bonding curve to receive USDC, while the value of the tokens is scaled up as demand increases.

* 2% is used to deposit USDC into the SAIL curve and distribute the SAIL to SAIL stakers, along with boosted vaults as needed to attract targeted liquidity.
* 2% is allocated to the treasury for platform infrastructure, development and marketing resources.
* 0.5% is used to reward the caller of the harvest function which compounds the earned strategy rewards

This fee is delegated towards rewarding the pool harvester, SAIL revenue vault, boosted pools and a treasury fund which will also be auto-compounded to attract liquidity to the protocol from other chains.

## Swap Fees

A 2.5% fee is applied to every transaction on the SAIL bonding curve. This fee is deducted from the input token and held in the treasury, outside of the bonding curve reserves. These accumulated fees are periodically distributed to designated addresses or contracts when triggered by specific functions. As swaps/redemptions occur. A harvest function can be called by anyone at any time to transfer the tokens in the treasury to their appropriate addresses.

The Fee Treasury Split is;

* 2% is allocated to SAIL lenders
* 0.5% is allocated to Blacksail Treasury&#x20;


# Audits

At Blacksail Finance, the security of our smart contracts and user assets is our top priority. We understand that the DeFi space is rapidly evolving, and with it, the need to maintain robust, secure, and transparent protocols. To ensure the highest standards of safety and reliability, we subject our smart contracts to audits by third-party firms and conduct thorough in-house reviews.

## Our Approach to Security

Blacksail Finance follows a multi-layered security approach to protect our ecosystem. This includes:

* **Comprehensive Smart Contract Audits** – All core contracts are meticulously analyzed for vulnerabilities, inefficiencies, and potential exploits.
* **Ongoing Monitoring** – We continuously monitor contract performance and user activity to detect anomalies.
* **Secure Development Practices** – Our developers adhere to industry best practices, implementing secure coding standards and peer reviews.

## Audit Subfolders

Blacksail Finance maintains full transparency by publishing audit reports conducted by both external firms and our in-house security team.

## 1. SolidProof Audit

**Link:** [SolidProof.io](/about-blacksail-finance/audits/solidproof.io)

Blacksail Finance has partnered with **SolidProof.io**, a blockchain security firm, to conduct third-party audits on our smart contracts. SolidProof is known for its comprehensive and unbiased audits. The auditing process consists of the following systematic steps:

1. **Specification Review:** Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
2. **Manual Code Examination:** Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
3. **Specification Alignment:** Ensure that the code accurately implements the provided specifications and intended functionalities.
4. **Test Coverage Assessment:** Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
5. **Symbolic Execution:** Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
6. **Best Practices Evaluation:** Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
7. **Actionable Recommendations:** Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

The full audit report by SolidProof can be found in the dedicated subfolder, showcasing their findings, recommendations, and Blacksail's implemented fixes.

## 2. In-House Audit

**Link:** [In-House Audit](/about-blacksail-finance/audits/in-house-audit)

In addition to third-party audits, our experienced internal security team conducts regular audits to ensure ongoing integrity and performance. Our in-house audits focus on:

* Code consistency and logic errors
* Stress testing and performance under high load
* User experience and contract interaction flows
* Real-time threat simulations

The in-house audit subfolder contains detailed reports highlighting internal findings and proactive security measures implemented by the Blacksail development team.

## Commitment to Continuous Improvement

Security is not a one-time effort – it is an ongoing process. Blacksail Finance remains committed to evolving our security framework, staying ahead of emerging threats, and providing our users with the safest DeFi experience possible. We invite our community to review our audit reports and stay informed about the measures we take to protect the ecosystem.

For further inquiries or to access audit reports, please visit the respective subfolders.


# SolidProof.io

## SolidProof.io Blacksail Finance Audit Report

<figure><img src="/files/KFfFnvNDcoNU9k1vz0G9" alt=""><figcaption></figcaption></figure>

**Link to Official SolidProof.io report:** <https://app.solidproof.io/projects/blacksail>\
The information below has been transcribed from the Solidproof.io official report above, and additional detailed information of the resolutions have been added.

## Blacksail Finance Overview

**Website:** [www.blacksail.finance](http://www.blacksail.finance/)\
**Description:** Blacksail Finance is a smart contract yield compounding suite on the Sonic Blockchain network. It automates compounding of DeFi rewards for crypto tokens, enabling users to maximize returns on their holdings.

**Blacksail Contracts GitHub Repository:** <https://github.com/Blacksail-finance/audits/tree/main/contracts>

***

## Security Assessments

* **Vault**
* **Language:** Solidity
* **Onboard Date:** 18/12/2024

## Scope of Work

**3 Contracts Evaluated;**

* **Blacksail\_StrategyV3.sol,**&#x20;
* **Blacksail\_Vault.sol,**&#x20;
* **Blacksail\_Interface.sol**

The auditing process consists of the following systematic steps:

1. **Specification Review:** Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
2. **Manual Code Examination:** Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
3. **Specification Alignment:** Ensure that the code accurately implements the provided specifications and intended functionalities.
4. **Test Coverage Assessment:** Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
5. **Symbolic Execution:** Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
6. **Best Practices Evaluation:** Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
7. **Actionable Recommendations:** Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

## **Summary:**

* **No High or Medium Critical Issues Found**
* **Key Contract Properties:**
  * No minting by contract owner
  * No blacklisting of addresses
  * Contract owner cannot set high fees
  * Funds cannot be locked by the owner
  * No burn function
  * Ownership not renounced
  * Contract not upgradeable

***

## **Ownership Privileges**

**Blacksail\_StrategyV3.sol**

* The owner can update the vault contract address.
* The owner can enable/disable the harvest on deposit setting in the contract.
* The owner can withdraw the reward tokens.
* The owner can pause/un-pause the contract.
* The owner can update the withdrawal fees to not more than 0.1%.
* The owner can update the slippage tolerance value to not more than 15%.

**Blacksail\_Vault.sol**

* The owner can propose a new Strategy implementation in the contract.
* The owner can upgrade the proposed strategy after the approval delay has passed.

***

## **Key Findings and Resolutions**

#### High Issues | 1 Finding

**Resolved**\
**#1 High Issue – Unsafe Use of tx.origin**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 150, 192, 212*\
**Description:** Using tx.origin in Solidity smart contracts poses a phishing attack risk. An attacker could manipulate transactions by deploying malicious contracts and invoking key functions like harvest() or withdraw(). This vulnerability arises because tx.origin does not distinguish between original users and intermediary contracts.\
**Resolution:** The code has been updated to replace tx.origin with msg.sender, ensuring secure authorization checks and reducing exposure to phishing threats.

<figure><img src="/files/2Ql9uUZ0UET0A0GwG20b" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R418">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R418</a></p></figcaption></figure>

***

#### Medium Issues | 7 Findings

**Resolved**\
**#1 Medium Issue – Missing 'isContract' Check**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 141-144*\
**Description:** Without verifying if addresses are contracts, EOAs (Externally Owned Accounts) could inadvertently be set for contract-specific parameters. This may lead to execution failures.\
**Resolution:** Implemented Solidity’s Address library isContract function to validate contract addresses before assignment.

<figure><img src="/files/j3b4zz9KcfqH2U64n4el" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758</a></p></figcaption></figure>

**Resolved**\
**#2 Medium Issue – Missing Access Control**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 155-162*\
**Description:** A public function was accessible to all users, raising the risk of unauthorized access.\
**Resolution:** Access control checks were implemented, restricting function calls to specific roles (owner/operator).

<figure><img src="/files/UszAuGY7AFxEcMeRRJ7P" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R418">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R418</a></p></figcaption></figure>

**Resolved**\
**#3 Medium Issue – Missing Non-Reentrant Check**\
*File: Blacksail\_Vault.sol*\
*Lines: 131-148*\
**Description:** The claim function allowed potential re-entrancy attacks by failing to update internal states before external token transfers.\
**Resolution:** A nonReentrant modifier was applied to prevent repeated function calls during execution.

<div align="left"><figure><img src="/files/ykZs2UGYbloAcjZAET3n" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d</a></p></figcaption></figure></div>

**Resolved**\
**#4 Medium Issue – Missing Non-Reentrant Check**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 211-214, 176-201*\
**Description:** Similar re-entrancy risks as the vault contract existed in strategy contracts.\
**Resolution:** The nonReentrant modifier was added to safeguard external calls.

<div align="left"><figure><img src="/files/Bhp7bA81p3XuFTHGGDHY" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62</a></p></figcaption></figure></div>

**Resolved**\
**#5 Medium Issue – Insufficient Slippage Protection**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 260-283*\
**Description:** The absence of minimum output in swaps exposed the contract to slippage risks.\
**Resolution:** Minimum output values were set based on market conditions to reduce slippage vulnerability.

<div align="left"><figure><img src="/files/hnK9q7hO4mH5xrQY48pe" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62</a></p></figcaption></figure></div>

**Resolved**\
**#6 Medium Issue – Missing Zero Check**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 233-247*\
**Description:** Transfers proceeded without verifying reward or native token balances, risking failed transactions.\
**Resolution:** require statements were added to ensure token balances and allowances were validated before execution.

<figure><img src="/files/apGs6xXgTHafHom2xaSM" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758</a></p></figcaption></figure>

**Resolved**\
**#7 Medium Issue – Owner Can Withdraw Tokens from Reward Pool**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 337-340*\
**Description:** The panic function allowed unrestricted withdrawal of funds from the 3rd party reward pool, introducing centralization risks.\
**Resolution:** The project owner has confirmed the issue as the part of the business logic as a security measure to protect user funds in the case of a 3rd party exploit or contract error. Governance mechanisms and multi-signature controls may be implemented. Time locks now delay critical functions, allowing community review.

***

#### Low Issues | 6 Findings

**Resolved**\
**#1 Low Issue – Floating Pragma Solidity Version**\
*File: Blacksail\_StrategyV3.sol*\
*Line: 3*\
**Description:** Floating Solidity versions risk compiling with outdated compilers.\
**Resolution:** Solidity version was pinned to a specific, stable release.

<figure><img src="/files/pKU9zN2Axccrmfi0HBjy" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758</a></p></figcaption></figure>

**Resolved**\
**#2 Low Issue – Floating Pragma Solidity Version**\
*File: Blacksail\_Vault.sol*\
*Line: 3*\
**Description:** Similar to above, ensuring stable compilation by specifying a Solidity version.\
**Resolution:** Solidity version fixed.

<figure><img src="/files/yLpKID8i2QwEmvOuEMLu" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d</a></p></figcaption></figure>

**Resolved**\
**#3 Low Issue – Missing Events Arithmetic**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 382-386, 329-334*\
**Description:** Key parameter changes lacked event emissions, reducing transparency.\
**Resolution:** Event emissions were added for critical state changes.

<figure><img src="/files/Ww0fydklrkohwyjYNQCy" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R79">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758R79</a></p></figcaption></figure>

**Resolved**\
**#4 Low Issue – Missing Visibility**\
*File: Blacksail\_Vault.sol*\
*Line: 21*\
**Description:** Visibility modifiers were missing, potentially exposing internal functions.\
**Resolution:** Functions were updated with appropriate visibility modifiers.

<figure><img src="/files/TIqVUyOYkG9JwQKT1FoM" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07d</a></p></figcaption></figure>

**Resolved**\
**#5 Low Issue – Missing Error Handling for External Calls**\
*File: Blacksail\_StrategyV3.sol*\
*Lines: 260-283*\
**Description:** External calls lacked error handling, risking transaction failures.\
**Resolution:** try-catch blocks were introduced to handle external call errors gracefully.

<figure><img src="/files/46jqrF7aaoN1HPfnlHsM" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758</a></p></figcaption></figure>

<figure><img src="/files/y9LNkYmrRSb0QJcd7ttk" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-87ca7834790d165b47783f985a627c4d062eb031404ef8aa2e7a14d1befee758</a></p></figcaption></figure>

**Resolved**\
**#6 Low Issue – Missing Events**\
*File: Blacksail\_Vault.sol*\
*Lines: 89-107*\
**Description:** Critical operations lacked event emissions.\
**Resolution:** Events were added to track significant contract interactions.

<figure><img src="/files/Z7DXt09ljKbfFbUypj6T" alt=""><figcaption><p><a href="https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07dR106">https://github.com/Blacksail-finance/audits/commit/4834446d7fa92f6c929166bf7cd853bc8fa34e62#diff-7a58729d37fcdf053b0d47ff03eb14d7252dcd5d3e42c3b8570834f7edd4f07dR106</a></p></figcaption></figure>

***

### Ownership Privileges

* **Blacksail\_StrategyV3.sol:**
  * Update vault contract address
  * Enable/disable harvest on deposit
  * Withdraw reward tokens
  * Pause/unpause contract
  * Update withdrawal fees (max 0.1%)
  * Adjust slippage tolerance (max 15%)
* **Blacksail\_Vault.sol:**
  * Propose new strategy
  * Upgrade strategy post-approval delay

***

#### Files

* **Blacksail Contracts Github Repository:** [**https://github.com/Blacksail-finance/audits/tree/main/contracts**](https://github.com/Blacksail-finance/audits/tree/main/contracts)

### Final Words

This audit analyzed Blacksail's smart contracts for vulnerabilities, providing recommendations for enhanced security. While no high/medium severity issues remain and all discovered issues have been resolved, ongoing diligence and additional audits are advised for new contracts and updates. Users are encouraged to conduct further research prior to interaction.


# In-House Audit

## Blacksail Audit Report

**3 Contracts Evaluated;**

* **Blacksail\_StrategyV3.sol,**&#x20;
* **Blacksail\_Vault.sol,**&#x20;
* **Blacksail\_Interface.sol**

### 1. Overview

**Type:** Yield Strategy Contract\
**Frameworks/Libraries Used:**

* **OpenZeppelin** (AccessControl, Pausable, ReentrancyGuard, SafeERC20)\
  **External Interfaces:**
* **IEqualizerPool** (reward pool interactions)
* **IIchiDepositHelper** (deposit interactions)
* **IUniswapRouterV3** (Uniswap V3 for swaps)
* **ISolidlyRouter** (token routing)

**Blacksail Contracts GitHub Repository:** <https://github.com/Blacksail-finance/audits/tree/main/contracts>

***

### 2. Key Features

* **Token Staking and Harvesting:** Stake tokens in a reward pool and reinvest rewards.
* **Liquidity Management:** Automated token swaps for reinvestment.
* **Fee Structure:** Call fees, platform fees, and withdrawal fees.
* **Emergency Control:** Contract can be paused and migrated using the `retireStrat` function.
* **Flexibility:** Adjustable slippage tolerance and fee parameters.

***

## 3. Findings

### 3.1 Security Analysis

**Reentrancy Vulnerability:**

* **Risk Level:** Low
* **Mitigation:** Applied `nonReentrant` modifier to withdraw and other sensitive functions. This effectively mitigates reentrancy attacks.

**Access Control:**

* **Observation:** Functions such as `setVault`, `setSlippageTolerance`, and `pause` are restricted to the owner via `onlyOwner`.
* **Mitigation:** Secure storage of the owner's private keys is essential to prevent unauthorized access.

**Allowance Risks:**

* **Observation:** Functions `_giveAllowances` and `_removeAllowances` use maximum approvals (unlimited). This poses a risk if external dependencies are compromised.
* **Recommendation:** Implement incremental allowances to reduce exposure.

**Unchecked External Calls:**

* **Observation:** Functions like `addLiquidity` and `forwardDepositToICHIVault` rely on external contracts, posing a cascading failure risk.
* **Mitigation:** `try-catch` blocks wrap external calls (already implemented in `addLiquidity`).

***

### 3.2 Logical and Functional Analysis

**Fee Handling:**

* **Observation:** `WITHDRAW_FEE` and `PLATFORM_FEE` are hardcoded. Parameterizing via governance could enhance flexibility.

**Error Handling in Swaps:**

* **Observation:** Uniswap V3 interactions include robust error handling (`try-catch` with reason logging). This ensures smoother debugging.

**Harvest on Deposit:**

* **Observation:** `harvestOnDeposit` auto-harvests but disables withdrawal fees. Ensure this trade-off aligns with economic incentives.

**Rewards Conversion:**

* **Observation:** The `rewardToNative` route is predefined. Ensure external audits validate routing efficiency and stability.

***

### 3.3 Gas Optimization

**Loops in Constructor:**

* **Observation:** `rewardToNative` initialization in a loop may lead to high deployment gas costs.
* **Recommendation:** Segment initialization or hardcode routes to reduce gas usage.

**Repeated State Reads:**

* **Observation:** Functions like `withdraw` and `addLiquidity` repeatedly access state variables.
* **Recommendation:** Cache values in memory to minimize redundant reads.

**Complexity in chargeFees:**

* **Observation:** Fee calculations (`platformFee`, `callFeeAmount`, `treasuryFee`) occur sequentially.
* **Recommendation:** Simplify calculations to improve clarity and reduce gas costs.

***

### 4. Recommendations

* **Add Time-Locks to Critical Functions:** Sensitive parameter changes (e.g., `WITHDRAW_FEE`, `slippageTolerance`) should have time-locks to prevent governance attacks.
* **Event Logging:** Additional event logs for key activities like `addLiquidity` success enhance monitoring and tracking.
* **Slippage Tolerance Cap:** Cap `setSlippageTolerance` at 5-10% to minimize user exposure to high slippage scenarios.
* **Documentation and Comments:** Add more inline comments, especially in complex functions like `_harvest`.

***

### 5. Tests and Simulations

**Test Coverage:**\
Ensure unit tests cover edge cases:

* Harvesting with no rewards.
* High-slippage swaps.
* Emergency scenarios (paused contracts).

**Simulated Attack Scenarios:**

* **Reentrancy:** Mocked contracts tested reentrancy vulnerabilities.
* **Owner Privilege Misuse:** Simulated fee manipulation to assess impact.

***

### 6. Overall Assessment

**Strengths:**

* Modular design with strong error handling.
* OpenZeppelin libraries ensure reliability.
* Flexible fee and slippage mechanisms.

**Weaknesses:**

* External contract dependencies introduce inherent risks.
* Certain operations could benefit from gas optimizations.

**Final Rating:**

* **Security:** 9/10
* **Efficiency:** 8/10
* **Flexibility:** 9/10

***

#### Files

* **Blacksail Contracts Github Repository:** <https://github.com/Blacksail-finance/audits/tree/main/contracts>


# Blacksail Contracts

<table data-full-width="true"><thead><tr><th>Name</th><th>Address</th></tr></thead><tbody><tr><td>Blacksail Vault Contract</td><td><a href="https://sonicscan.org/address/0x6AE9e8F1010deCC51639B159672756Dace7Ffe29">0x6AE9e8F1010deCC51639B159672756Dace7Ffe29</a></td></tr><tr><td>Blacksail Strategy Contract</td><td><a href="https://sonicscan.org/address/0x4d8C24Ab68B5C32c38BC39ab841B6cCE454C03aD">0x4d8C24Ab68B5C32c38BC39ab841B6cCE454C03aD</a></td></tr><tr><td>Blacksail Parlays</td><td><a href="https://sonicscan.org/address/0xf6cde6Cd0CDFA97863FF1108899B5cdb1fE472c4">0xf6cde6Cd0CDFA97863FF1108899B5cdb1fE472c4</a></td></tr><tr><td>Blacksail Zap</td><td>0xd59510ddD372bee1d9880aA164C469761ffbEC0f</td></tr><tr><td>SAIL Bonding Curve Contract</td><td>WIP</td></tr></tbody></table>

<figure><img src="/files/hTKEresQqr3mRkLoE17n" alt=""><figcaption></figcaption></figure>


# Risks

{% hint style="danger" %}
By using Blacksail, you confirm that you are not a resident of any OFAC sanctioned country or territory.
{% endhint %}

All investing comes with risk. It's important to do your own research on the underlying crypto assets and DeFi platforms you are interacting with via Blacksail. \
\
Although, Blacksail takes the highest level of precautions available regarding Auditing, Testing, and Rigorous 3rd party protocol reviews. It is important to never invest more than you can lose - you alone are responsible for your investment.  Blacksail Finance is not responsible for any lost funds due to crypto price fluctuations, external DeFi exploits etc. \
\
Please ensure you understand these risks before continuing. By using Blacksail, you acknowledge you are eligible to use Blacksail and take responsibility for the risks involved.

These risks include, among others: inability to access or use the Blacksail interface provided at [www.blacksail.finance](http://www.blacksail.finance) due to hosting outages; delays in deposits, withdrawals, or other transaction errors resulting from the interface and/or the Sonic network being unresponsive or offline; an incorrect display of information on the interface resulting from server or third-party API errors; errors or omissions in, or loss or damage incurred from the use of, any information displayed on the interface. All information displayed on the interface is for informational purposes only. You should not take, or refrain from taking, any action based on any information displayed on the interface.


# Mission Statement

Blacksail Finance is on a mission to fortify decentralized finance on the Sonic Network. The Blacksail protocol aims to support all of the projects on the Sonic Network by:&#x20;

* Developing customized yield strategies that both optimize and align incentives on each platform, driving robust liquidity to the ecosystem.
* Removing the guesswork and difficulty of discovering and capitalizing on yield strategies for our users. Allowing them to receive more of their favorite tokens without any additional work.
* Empowering individuals to build a liquid USDC reserve (represented by the SAIL token) to strategically fund and invest in both up and coming and established Sonic protocols alike.

<figure><img src="/files/kCKdIWUnuSFcu23C5Lkj" alt=""><figcaption></figcaption></figure>


# Letter to the Community

When we set out to build Blacksail Finance, we didn’t just choose a pirate theme for its charm or flair (though we admit, it’s undeniably exciting). We chose it because pirates represent something far deeper, something that resonates profoundly with the ethos of decentralized finance. Pirates were rebels, disruptors of oppressive systems, and champions of individual freedom. They didn’t abide by the rules of empires that sought to hoard wealth and control trade. Instead, they charted their own course, defying the status quo and creating a system that, while imperfect, offered a sense of independence and shared spoils.

In many ways, centralized finance today plays the role of the old empires, gatekeepers of opportunity who prioritize the privileged few. They’ve monopolized access to wealth, veiled transactions in secrecy, and made true financial freedom feel like an elusive treasure hidden on a map few can access. For centuries, these institutions have dictated the terms of economic participation, leaving the rest of us to navigate stormy waters with little more than scraps.

That’s where DeFi, and our project specifically, comes in. Like the pirates of old, we’re here to reclaim what’s been hoarded, to dismantle the barriers erected by centralized powers, and to empower a new generation of adventurers to take control of their financial destinies. Decentralized finance isn’t just about the technology or the treasure, it’s about restoring freedom, fairness, and opportunity to all who seek it.

Our mission is to create a space where everyone has access to the tools and knowledge needed to participate in this new financial era. A space where transparency replaces secrecy, collaboration triumphs over exclusion, and wealth is no longer the privilege of a select few.\
\
We weren’t just inspired by the boldness and freedom of pirates, we saw a parallel between their fight for liberation and our mission to reclaim financial sovereignty in a world dominated by centralized institutions. Pirates charted their own paths, shared their treasures, and built communities bound by shared purpose and trust. At Blacksail, we’re bringing that spirit to DeFi, creating a platform where wealth isn’t hoarded but redistributed, and opportunities are accessible to all.

#### The Power of the SAIL Token

At the heart of Blacksail Finance is the **SAIL token**, a bonded USDC revenue token that fuels our mission. The SAIL token is not just a utility—it’s a gateway to financial empowerment, backed by real value and governed by innovative design.

Here’s why SAIL is unlike anything you’ve seen before:

* **Backed by Liquid USDC Reserves**: Every SAIL token is backed by a fully liquid reserve of USDC, ensuring stability and value. Tokens can be redeemed anytime through the SAIL Bonding Curve, giving holders direct access to their share of the treasure.
* **Revenue Sharing**:
  * **Vault Revenue**: SAIL holders receive 50% of all protocol revenues, distributed via the SAIL Vault.
  * **Swap Revenue**: Holders also earn 80% of all swap revenues, making SAIL a continuous source of rewards.
* **Collateral and Liquidity**: SAIL tokens can be used as collateral to borrow USDC for other uses, all while earning swap revenue. A unique blend of utility and profitability.
* **Scaling with TVL**: Periodic fee redistributions drive consistent buy pressure for SAIL, with its value scaling as Blacksail’s Total Value Locked (TVL) grows.
* **Price Appreciation**: With a limited supply of 700,000 tokens, pricing is governed by a bonding curve function that rewards early adopters and incentivizes participation.
* **Exclusive Perks**: SAIL holders are eligible for partner airdrops, including tokens, NFTs, and other exciting rewards, while enjoying governance rights to shape the future of Blacksail Finance.

Blacksail Finance is more than just another dApp. We’re here to help users maximize their crypto earnings by automatically compounding rewards into their original assets, making wealth generation seamless and efficient.

Unlike traditional projects that charge high fees and retain revenues, Blacksail reinvests and redistributes earnings through the bonded USDC backed SAIL token. This ensures that users grow alongside the platform, building their own liquid USDC reserve.

Our mission is clear:

1. **Optimize Liquidity**: Develop customized yield strategies that align incentives across the Sonic Network, driving robust liquidity for all.
2. **Simplify Earning**: Remove the guesswork from yield generation, enabling users to effortlessly grow their favorite token holdings, while providing high visibility into all available opportunities.
3. **Empower Investment**: Help users strategically fund and invest in both emerging and established Sonic protocols, building a stronger decentralized ecosystem.

Blacksail is setting a new course for decentralized finance, one that’s transparent, inclusive, and designed to empower individuals. Together, we’ll reclaim financial sovereignty, redistribute the wealth, and build a community that thrives on collaboration.

Will you decide to join us in this daring endeavor as we sail the open seas of decentralized finance Together, we’ll map a future where financial empowerment is no longer a distant dream but a shared reality. The treasure is out there, and it belongs to everyone, no empires, no gatekeepers, just a collective pursuit of prosperity.\
\
We have had a fantastic launch, and a fun couple of weeks as we have released the largest yield strategy collection on the Sonic Network, but there is even more to look forward to on the horizon.

Are you ready to hoist the sails and embark on this journey with us? The adventure awaits crew.


# Partnership Inquiries

**Let's connect!**

If you’re an upcoming project planning to launch on **Sonic Network**, or an existing project looking to leverage a customized yield strategy, feel free to reach out. Contact us directly through our [**Twitter**](https://x.com/blacksail_fi),  [**Telegram**](https://t.me/blacksail_finance) or [**Discord** ](https://discord.gg/BSZJgfvEE8)channels.


# Where Do Rewards Come From?

To ensure deep liquidity, Automated Market Makers (AMMs) need to encourage users to contribute their tokens to liquidity pools. This is where yield farming, also known as liquidity mining, becomes important.

In yield farming, users earn token rewards for supplying liquidity to AMM pools, which supports token exchanges. It’s similar to depositing money in a bank savings account and earning interest on your deposit. Users who provide tokens to these pools are known as liquidity providers (LPs), and the rewards they earn are called LP fees or LP rewards. To become an LP, users must deposit equal amounts of both tokens in the pool.

The LP rewards are generated from the token swaps that take place in the pool and are distributed among all LPs based on their share of the pool’s total liquidity. Additionally, some projects, in an effort to promote their tokens, offer extra rewards to liquidity providers in specific pools. These additional rewards can significantly boost a provider’s overall annual return.

The yield a user earns from supplying tokens to a liquidity pool can vary widely, depending on factors like the protocol, the specific pool, the tokens deposited, and overall market conditions. Some pools offer higher rewards, but they may also carry greater volatility and risk.


# What is a Bonding Curve?

A **bonding curve** is a pricing mechanism that determines the price of a token based on its supply. As more tokens are bought, the price per token generally increases according to a pre-defined mathematical function (e.g., linear or exponential). This approach creates a dynamic, automated pricing system that reflects demand.


# What is Liquidity Staking?

Most decentralized exchanges (DEXs) operate by having liquidity providers deposit an equal dollar value of at least two different cryptocurrencies into a liquidity pool, this is known as **Liquidity Staking**. Traders then use this pool to swap between those cryptos. Each time a trade occurs, a small percentage of the total trade volume is taken as a fee, which is then distributed proportionally among all the liquidity providers in that pool.


# What are LP Tokens?

Liquidity pool **(LP) tokens** are given to liquidity providers as a reward for locking their assets in a pool on decentralized exchanges (DEXs) like Uniswap and Curve. Each LP token represents a share of the liquidity deposited in the pool and is used to withdraw those assets when needed. Some platforms allow liquidity providers to stake their LP tokens, offering additional crypto rewards to encourage them to keep their funds locked in the pool for longer periods.<br>


# What is a Yield Aggregator?

In addition to providing liquidity, you can stake your LP tokens to earn extra yield. However, the challenge in DeFi is making sure staking your LP tokens is actually profitable; otherwise, you could miss out on potential earnings. This is where **yield aggregators** come into play. Instead of manually searching for the best staking opportunities, platforms like Blacksail Finance gather all relevant staking contracts in one place, allowing you to easily compare options and choose the one that offers the best returns.


# What is Yield Farming?

**Yield farming** involves providing liquidity to a pool and then staking the LP tokens you receive in return. This strategy focuses on maximizing the yield from staking crypto, typically by depositing liquidity into an Automated Market Maker (AMM) protocol. Unlike centralized exchanges that rely on order books, DEXs use AMMs—smart contracts that facilitate decentralized liquidity for crypto traders.


# Bridging from Fantom to Sonic

<figure><img src="/files/I0QuoGr0Ryew70HJX0R3" alt=""><figcaption></figcaption></figure>

You can migrate Fantom tokens (FTM) on Fantom Opera Mainnet to Sonic tokens (S) on Sonic Mainnet via the official Sonic Labs Portal belo&#x77;**.**\
\
**Upgrade Portal:** <https://my.soniclabs.com/upgrade>

\
\
More information can be found at: <https://docs.soniclabs.com/migration/ftm-to-s>


# Connecting to Sonic on Metamask

1. **Shortcut Method:**\
   \
   Visit <https://sonicscan.org/> and scroll down to the bottom of the page and click on "Add Sonic"\
   \
   ![](/files/oABnmVuF09ildh04IZ38)<br>

2\. **Manual Method:**\
\
As an EVM compatible chain, you can connect to the Sonic network using MetaMask. Assuming you have already installed and configured [MetaMask](https://metamask.io/) in your browser of choice, start by adding the Sonic network:

1. Open the MetaMask extension.
2. At the top of the interface, click on the network you are connected to e.g. "Ethereum Mainnet".
3. Click on "Add Network":\
   ![](/files/DJiTclkSvYHwnQ4dL8Ja)<br>
4. Enter the following RPC settings:\
   \
   **Network Name:** Sonic\
   **New RPC URL:** <https://rpc.soniclabs.com\\>
   **Chain ID:** 146\
   **Currency Symbol:** S\
   **Block Explorer URL:** <https://sonicscan.org\\>
   \
   The [Sonic testnet](https://testnet.soniclabs.com/) features a button to add the network to your preferred Web3 wallet automatically. Otherwise, the following are the network details to add manually:

<details>

<summary>Testnet RPC URL</summary>

**Network Name:** Sonic Testnet\
**New RPC URL:** [**https://rpc.testnet.soniclabs.com/**](https://rpc.testnet.soniclabs.com/)\
**Chain ID:** 64165\
**Currency Symbol:** S\
**Block Explorer URL:** <https://scan.soniclabs.com/>\
\
The [Sonic testnet](https://testnet.soniclabs.com/) features a button to add the network to your preferred Web3 wallet automatically. Otherwise, the following are the network details to add manually:

</details>

After saving the network, you will be able to connect to it at any time using the dropdown menu.

Source: <https://docs.soniclabs.com/>


# Media Pack

Assets and brand images for marketing material

Blacksail Logos: Non-transparent background\
\
![](/files/8VCw413u89zYvXOzjySx)![](/files/odrAnRkuQ6C5XYKhYJrW)
----------------------------------------------------------------

## Blacksail Logos: Transparent Background

<br>

<figure><img src="/files/OgwEYV8JL6OfKMTy0BSQ" alt=""><figcaption><p>blacksail-white-transparent-lg</p></figcaption></figure>

<figure><img src="/files/86gxVQtPesXfJ2fFJjAL" alt=""><figcaption><p>blacksail-black-transparent-lg</p></figcaption></figure>

Sonic Logos: Transparent Background\
&#x20;
------

<figure><img src="/files/KnBfoyW7yk6GE54vGlCG" alt=""><figcaption><p>sonic-white-transparent-sm</p></figcaption></figure>

<figure><img src="/files/pJlm2ZzjubFFNSabAuwj" alt=""><figcaption><p>sonic-black-transparent-sm</p></figcaption></figure>


