Withdraw Liquidity

The withdraw function sends an application request into the protocol, this application request consists of the amount in which the user wants to withdraw, the address of which the users wants to transfer the asset and the market of which the asset is locked.

function withdraw(uint _amount, address _to, bool _isMarket) external;
  • _amount : The amount of asset you want to withdraw from the pool.

  • _to : Withdraw to the address of the user. The withdrawal address could be the address of the user or any address provided by the user.

  • _isMarket : true if the asset is a base market and false if the asset is the Token


CEGORAS egoras = CEGORAS(0xd9E373F....);
require(egoras.withdraw(50,0xd9E373F.,true/false ), "unable to withdraw");


const instance = await new web3.eth.Contract(abi, address)
await instance.methods.withdraw("50,0xd9E373F.,true/false").send({from: 0xMyAccount});