IonZapper
A peripheral helper contract to interact with the IonPool
and the wstETH GemJoin
even when holding StEth and native Ether. At the core level, the IonPool
only interacts with wstETH and WETH. This contract will allow users to deposit StEth and native Ether into the IonPool
by auto-wrapping on the user's behalf.
State Variables
POOL
WETH
STETH
WSTETH
WSTETH_JOIN
WHITELIST
Functions
onlyWhitelistedLenders
Checks if msg.sender
is on the whitelist.
This contract will be on the protocolControlledWhitelist
. As such, it will validate that users are on the whitelist itself and be able to bypass the whitelist check on IonPool
.
Parameters
Name | Type | Description |
---|---|---|
|
| to validate the whitelist check. |
constructor
Creates a new IonZapper
instance.
Parameters
Name | Type | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
zapSupply
Deposits WETH into the IonPool
by auto-wrapping the user's native ether on their behalf.
Parameters
Name | Type | Description |
---|---|---|
|
| to validate the whitelist check. |
zapRepay
Repays WETH into the IonPool
by auto-wrapping the user's native ether on their behalf.
Parameters
Name | Type | Description |
---|---|---|
|
| of the collateral. |
zapJoinWstEth
Deposits wstETH into the wstETH GemJoin
by auto-wrapping the user's StEth on their behalf.
Parameters
Name | Type | Description |
---|---|---|
|
| to gem-join. [WAD] |