Put down collateral, Borrow, and repay a loan from Aave! Use this to short assets and accrue interest.
You can see a web3 version of this here.
In our aave_borrow.py
script, we do the following:
- Approve our
ETH
to be swapped forWETH
- Swap an
amount
ofETH
forWETH
- Using
deposit_to_aave
we deposit theWETH
as collateral - We use that collateral to borrow
DAI
withborrow_erc20
- Then, we pay it back!
- We can view the txs on etherscan to see what's going on under the hood.