Loans pallet: Slippage protection and present value correction
Loans pallet: Slippage protection and present value correction: a task in LegoFlow-SWE (Harbor dataset). When a borrower calls borrow() or repay() on a loan that uses external pricing, the operation accepts a PricingAmount::External(quantity, settlement price) . Currently there is no check that…
The task
When a borrower calls `borrow()` or `repay()` on a loan that uses external pricing, the operation accepts a `PricingAmount::External(quantity, settlement_price)`. Currently there is no check that the supplied `settlement_price` is close to the current oracle price. A borrower could specify any `settlement_price`,…
Part of Lego-X/LegoFlow-SWE.