Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repay should not throw when repaying a borrow of the same block #691

Closed
jkrivine opened this issue Jul 15, 2022 · 3 comments · Fixed by #705
Closed

repay should not throw when repaying a borrow of the same block #691

jkrivine opened this issue Jul 15, 2022 · 3 comments · Fixed by #705

Comments

@jkrivine
Copy link

Reading at the audits it seems AAVE added this check in order to force users to use flashloan instead of the borrow-repay sequence in the block. I think this is wrong for two reasons:

  • a flashloan is a service that has an added value to the user because you can borrow the liquidity of other accounts on the pool (which might justify fees). However a sequence borrow-repay is done on the user's collateral. So preventing this should be considered as abusive.
  • this restriction might become a blocker for cash managers that rely on AAVE pools because their account on aave integrates multiple user's account on their side: user A of the protocol P tries to repay its debt on AAVE via P while user B of the protocol tries to borrow, also via P. This is interpreted as an illegal sequence by the pool's logic that identifies user A and B as P.
@miguelmtzinf
Copy link
Contributor

Agree with the second point. This requirement has caused some issues for integrators where users positions are aggregated into one single account.

@jkrivine
Copy link
Author

good to know. I am curious why you would disagree with the first point though :)

@miguelmtzinf
Copy link
Contributor

good to know. I am curious why you would disagree with the first point though :)

I assume was initially designed to prevent free loans of 1 block duration, since there is already a function for that. I dont have any personal preference about this

@miguelmtzinf miguelmtzinf linked a pull request Aug 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants