`repay` should not throw when repaying a borrow of the same block
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
Aof the protocolPtries to repay its debt on AAVE viaPwhile userBof the protocol tries to borrow, also viaP. This is interpreted as an illegal sequence by the pool's logic that identifies user A and B asP.
Agree with the second point. This requirement has caused some issues for integrators where users positions are aggregated into one single account.
good to know. I am curious why you would disagree with the first point though :)
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