DeFi Saver
Action that withdraws tokens from the pool via the depositTarget burning lpToken.
User needs to approve the DSProxy to pull lpToken.
If one of the tokens == 0xEeee... the receiver will receive WETH instead of native ETH.
The withdrawExact flag:
  • if withdrawExact == false exactly burnAmount of lpToken will be used to withdraw at least withdrawAmounts of tokens. Zero protocol fee.
  • if withdrawExact == true at most burnAmount of lpToken will be used to withdraw exactly withdrawAmounts of tokens.


  • address sender - Address from which to pull lpToken.
  • address receiver - Address that will receive the tokens.
  • address depositTarget - Pool contract or zap deposit contract from which to withdraw.
  • address lpToken - LP token of the pool.
  • bytes4 sig - Target contract withdraw function selector.
  • uint256 burnAmount - Amount of lpToken to burn in the withdrawal.
  • uint256[] withdrawAmounts - Amount of tokens to withdraw.
  • address[] tokens - Tokens to withdraw.
  • bool withdrawExact
  • bool useUnderlying - Some pool contracts take this additional parameter.
Last modified 2mo ago
Copy link