Skip to main content

OETHZapper

OETHZapper​

oeth​

contract IERC20 oeth

vault​

contract IVault vault

weth​

contract IWETH9 weth

frxeth​

contract IERC20 frxeth

sfrxeth​

contract ISfrxETH sfrxeth

Zap​

event Zap(address minter, address asset, uint256 amount)

constructor​

constructor(address _oeth, address _vault) public

receive​

receive() external payable

Deposit ETH and receive OETH in return. Will verify that the user is sent 1:1 for ETH.

deposit​

function deposit() public payable returns (uint256)

Deposit ETH and receive OETH in return Will verify that the user is sent 1:1 for ETH.

Return Values​

NameTypeDescription
[0]uint256Amount of OETH sent to user

depositSFRXETH​

function depositSFRXETH(uint256 amount, uint256 minOETH) external returns (uint256)

Deposit SFRXETH to the vault and receive OETH in return

Parameters​

NameTypeDescription
amountuint256Amount of SFRXETH to deposit
minOETHuint256Minimum amount of OETH to receive

Return Values​

NameTypeDescription
[0]uint256Amount of OETH sent to user

_mint​

function _mint(address asset, uint256 minOETH) internal returns (uint256)

Internal function to mint OETH from an asset

Parameters​

NameTypeDescription
assetaddressAddress of asset for the vault to mint from
minOETHuint256Minimum amount of OETH to for user to receive

Return Values​

NameTypeDescription
[0]uint256Amount of OETH sent to user