Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdapper committed Mar 13, 2023
1 parent f8ef52e commit f03e244
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# aave-unwind

## Contract

[`Unwind.sol`](./src/Unwind.sol) can be used by users to unwind their levered
positions by:
1. Flashloaning the debt/borrowed asset from Balancer/Aave-v3.
Expand All @@ -17,3 +19,15 @@ Note: Users have to approve their collateral aToken to the contract so it can

At the end of `Unwind.unwind` transaction all the remainder collateral and debt
token assets are returned back to the user.

## Script

[`Unwind.s.sol`](./script/Unwind.s.sol) can be used by users to unwind their positions
as a series of necessary txs and encoding calldata, etc. It has code for using [OpenOcean](https://openocean.finance)
and [Odos](https://odos.xyz) aggregators and their APIs for figuring out the
swap paths for optimal collateral swap outputs. More aggregators can be
integrated similarly.

```bash
forge script ./script/Unwind.s.sol --rpc-url ... --private-key ... --broadcast
```

0 comments on commit f03e244

Please sign in to comment.