Entangle Router

This page contains a list of relevant ERC-20 Token Addresses.


function buyForLP(uint128 sid, uint lpAmount) public 
  • Allows purchasing CDT tokens using SID and LP amount.

  • Transfers LP tokens from user to contract balance.

  • Initiates deposit to corresponding farm.

  • Approval of appropriate LP token expected on EntangleDex contract

function sellForLP( uint128 sid, uint256 synthAmount, address recipient)  
  • Sells Synth token, returns LP tokens from the farm, and transfers LP tokens to the recipient.

function sellForLPAndWithdraw(uint128 sid, uint256 synthAmount, uint64 chainID, address recipient) public
  • Sells Synth token, unwraps LP tokens and returns underlying tokens to the recipient.

View Functions

function convertLpToSynth(uint128 sid, uint256 lpAmount) external view returns (uint256 synthAmount)
  • Returns the amount of Synth tokens equivalent to the provided LP amount.

function convertSynthToLp(uint128 sid, uint256 synthAmount) external view returns (uint256 lpAmount)
  • Returns the amount of LP tokens equivalent to the provided Synth amount.


mapping(uint128 => SidInfo) public sidInfo;  
  • mapping stores technical states of SIDs.

struct SidInfo{

bool isPausedSid;

  • struct contains information like whether the SID is paused.

  • isPausedSid - if this setting is set to true - it means that we have suspended work on this SID, for example, due to a protocol hack of the corresponding LP token.

Last updated