Skip to content

ZapCurvePoolBase

senamakel edited this page Sep 1, 2024 · 1 revision

Solidity API

ZapCurvePoolBase

This contract allows users to perform a Zap operation by swapping collateral for zai tokens, adding liquidity to curve LP, and staking the LP tokens.

zapWithZaiIntoLP

function zapWithZaiIntoLP(uint256 zaiAmount, uint256 collateralAmount, uint256 minLpAmount) external

Zaps ZAI and collateral into LP tokens

This function is used when the user already has ZAI tokens.

Parameters

Name Type Description
zaiAmount uint256 The amount of ZAI to zap
collateralAmount uint256 The amount of collateral to zap
minLpAmount uint256 The minimum amount of LP tokens to stake

_addLiquidity

function _addLiquidity(uint256 zaiAmt, uint256 collatAmt, uint256 minLp) internal virtual

Clone this wiki locally