Skip to content

ZapSafetyPool

senamakel edited this page Nov 25, 2024 · 2 revisions

Solidity API

ZapSafetyPool

This contract allows users to directly stake into the safety pool

safetyPool

contract IERC4626 safetyPool

The safety pool contract

zai

contract IERC20 zai

The ZAI stablecoin

odos

address odos

TokenTransferFailed

error TokenTransferFailed()

ZaiTransferFailed

error ZaiTransferFailed()

constructor

constructor(address _safetyPool, address _zai, address _odos) public

Initializes the contract with the required contracts

zapIntoSafetyPool

function zapIntoSafetyPool(contract IPegStabilityModule psm, uint256 amountIn) external

Allows a user to zap into the safety pool

Parameters

Name Type Description
psm contract IPegStabilityModule The Peg Stability Module for the asset
amountIn uint256 The amount to zap

zapIntoSafetyPoolWithOdos

function zapIntoSafetyPoolWithOdos(contract IPegStabilityModule psm, contract IERC20 swapAsset, uint256 swapAmount, uint256 minShares, bytes odosCallData) external payable

sweep

function sweep(contract IERC20 token) public

Clone this wiki locally