Skip to content

ZapBase

senamakel edited this page Dec 7, 2024 · 2 revisions

Solidity API

ZapBase

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.

staking

contract IERC4626 staking

pool

contract IERC20Metadata pool

zai

contract IERC20Metadata zai

collateral

contract IERC20Metadata collateral

decimalOffset

uint256 decimalOffset

me

address me

OdosSwapFailed

error OdosSwapFailed()

CollateralTransferFailed

error CollateralTransferFailed()

TokenTransferFailed

error TokenTransferFailed()

Zapped

event Zapped(address user, uint256 collateralAmount, uint256 zaiAmount, uint256 newStakedAmount)

constructor

constructor(address _staking) internal

Initializes the contract with the required contracts

_sweep

function _sweep(contract IERC20 token) internal

Clone this wiki locally