Docs
Search…
Exit Market
Exit a market - it is not an error to exit a market which is not currently entered. Exited markets will not count towards account liquidity calculations.

Comptroller

1
function exitMarket(address dToken) returns (uint)
Copied!
  • msg.sender: The account which shall exit the given market.
  • dTokens: The addresses of the dToken market to exit.
  • RETURN: 0 on success, otherwise an Error code.

Solidity

1
Comptroller troll = Comptroller(0xABCD...);
2
uint error = troll.exitMarket(dToken(0x3FDA...));
Copied!

Web3 1.0

1
const troll = Comptroller.at(0xABCD...);
2
const errors = await troll.methods.exitMarket(DEther.at(0x3FDB...)).send({from: ...});
Copied!