aave / protocol-v2

Aave Protocol V2
https://aave.com
Other
668 stars 755 forks source link

Paraswap Repay Adpter #222

Open sameepsi opened 3 years ago

sameepsi commented 3 years ago

This PR adds a new adapter that is able to execute trades on ParaSwap in order to repay the user's loan(debt assets) either with/without a flash loan, with the option to repay the entire loan, and option to use permit signature instead of prior approval. It is similar to the existing adapter using only Uniswap, but you can only do one repay at a time.

Unit tests are included, to run them do 'npm run test' inside the Docker container. They include tests to cover the various scenarios using a mock swapper contract and the majority of possible errors