Comment on page
If you need to use native ETH in the protocol, it must first be wrapped into WETH. The WETH Gateway contract is a helper contract to easily wrap and unwrap ETH as necessary when interacting with the protocol, since only ERC20 is used within protocol interactions.
function deposit(address pool, address to)
Deposits WETH into the reserve, using native ETH. A corresponding amount of the overlying asset (tTokens) is minted.
function withdraw(address pool, uint256 amount, address to)
Withdraws the WETH _reserves of msg.sender.
function borrow(address pool, uint256 amount)
Borrow WETH, unwraps to ETH and send both the ETH and DebtTokens to msg.sender, via from argument in
function repay(address pool, uint256 amount, address to)
Repays a borrow on the WETH reserve, for the specified amount (or for the whole amount, if type(uint256).max is specified).
) external payable override returns (uint256)
Liquidates a borrow on the WETH reserve.