Greg pfp
Greg
@greg
Just deployed an experimental token (not a memecoin, you can't buy it) — its a smart contract that transparently manages an Aave position of 2 parts ETH to 1 part USDC. Effectively 2x leveraged ETH Ownership of the token represents ownership of the underlying assets, so users can redeem the underlying ETH at any time It's designed to be permissionless, but I don't trust my Solidity skills enough and don't want you to lose money so I've restricted depositing to myself. Just excited about my first defi contract and wanted to share :) https://github.com/gskril/aave-manager
11 replies
15 recasts
90 reactions

Blinky Stitt pfp
Blinky Stitt
@flashprofits.eth
Neat. You should use a flash loan instead of calling _withdrawEthSwapForUsdcAndRepay three times. You already have a uniswap trade in there so just use that as the source of all the initial funds.
1 reply
0 recast
0 reaction

Greg pfp
Greg
@greg
hmmm not sure I fully understand — the reason I broke it into 3 chunks is because aave wouldn't let me withdraw collateral before repaying the loan since the position could get liquidated you're suggesting i should take a flash loan of USDC to repay the loan so I can withdraw collateral in and rebalance in one go?
1 reply
0 recast
0 reaction