1. Entangle Router - Entry point

Let's look into how our protocol works, starting with the Entangle Router smart contract, which is key for buying and selling synthetic tokens and keeping track of their prices. When a transaction happens, Entangle Router smoothly handles the movement of LP tokens, taking them from the user and sending them to the main part of the protocol, the MasterChef.

The amount of CDT tokens is calculated on-chain via the following formula:

CdtAmount = LpAmount * 10^18 / price

..where the price is:

price = LpTokenTotalBalance * 10^18/ TotalSupply ,

..where LpTokenTotalBalance - total balance of LP tokens invested through our protocol and TotalSupply is total supply of synth token by given SID. NOTE: We mentioned SID here. SID is a unique uint128 number that describes each CDT token. Read more about SID here.

The starting price is set at 10^18 and is expected to increase with each compounding process. Regardless of whether the token balance or total supply drops to zero, the price will remain at 10^18.

When selling CDT tokens, the quantity of LP tokens you'll receive can be calculated using the following formula:

LpAmount = CdtAmount * price / 10^18

..where the price can be calculated using the formula we have mentioned above.

Last updated