🪙Independent Sale

Swap your legacy tokens at the market price and get COT immediatly

Overview

In the Independent Swap method, you have the ability to swap your legacy Tokens - TREE, TCO2, and SEED - at market price. This means that you can convert your existing tokens into COT based on the current market value, ensuring a fair and transparent process.

Let's take the SEED-COT conversion as an example. This conversion is done through a two-step process. First, we get the SEED-WBNB (Wrapped Binance Coin) price. This is achieved using our Current DEX V2 pairs, which acts as an oracle providing real-time and reliable price feeds for the SEED-WBNB pair.

Next, we get the WBNB-USD price. For this, we use the Binance oracle, which provides the current market value of BNB in USD. By combining these two steps, we can accurately determine the value of SEED in terms of USD.

Finally, we convert SEED to COT. The price of COT is derived from the Absorption Sale smart contract, as detailed in the relevant paragraph of this guide. This ensures that the conversion rate between SEED and COT is accurate and up-to-date, reflecting the true market value of these tokens.

This Independent Swap method allows you to seamlessly convert your legacy tokens into COT, ensuring that you're always getting the most value out of your participation in the TreeDeFi ecosystem.

Executing the swap

To swap your legacy token, simply select it from the list and choose your desired amount. You will see the expected COT amount value. To get COT, simply click on "Swap" button and that's it! If it is your first swap, you will need an additional approval transaction, otherwise, you will get your COT immediatly in your wallet.

After confirming the transaction, you'll be able to check the transaction table.

Note that this value represents only the last transaction made and this information will disappear after refreshing the page.

Involved math

the calculation of the COT (Carbon Offsetting Token) value per Legacy Token in our smart contract involves several steps:

This system uses a method in the Smart Contract called independentSwapForCot to convert what we call Legacy Tokens (these could be any specific type of cryptocurrency) into Carbon Offset Tokens (COTs). Let's walk through this process step by step.

  1. Legacy Token to WBNB (Wrapped BNB) Ratio: The first step is to determine how much our Legacy Token is worth in terms of another cryptocurrency called WBNB (Wrapped BNB). This is akin to knowing how many euros you get for your dollar when you exchange them. This exchange rate is typically determined by the market supply and demand for both these cryptocurrencies.

  2. WBNB to USD Conversion: Next, we need to understand how much one WBNB is worth in US Dollars (USD). This is similar to knowing how many dollars we can get for one euro. This helps us understand the value of our Legacy Token in terms of traditional currency (USD).

  3. USD to COT Ratio: Now, we have our Legacy Token's value in terms of USD, but we want to convert this into COT. So, we need to know the current value of COT in USD. This is similar to knowing how many dollars we need to buy a specific item.

  4. Final Calculation: Lastly, we calculate how many COTs we get for our Legacy Token by multiplying the value of our Legacy Token in USD with how many COTs we can get for one USD.

The result is the number of COTs we get for our Legacy Token. This would help you to swap your Legacy Tokens for COTs at the current market rate.

Last updated