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
Name | Type | Description |
---|---|---|
[0] | uint256 | Amount 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
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of SFRXETH to deposit |
minOETH | uint256 | Minimum amount of OETH to receive |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Amount of OETH sent to user |
_mint
function _mint(address asset, uint256 minOETH) internal returns (uint256)
Internal function to mint OETH from an asset
Parameters
Name | Type | Description |
---|---|---|
asset | address | Address of asset for the vault to mint from |
minOETH | uint256 | Minimum amount of OETH to for user to receive |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Amount of OETH sent to user |