Skip to content

Commit

Permalink
🚸 Leverager: increate slippage on MARKET_OUT approval
Browse files Browse the repository at this point in the history
  • Loading branch information
sebipap committed May 16, 2024
1 parent ce1c9c4 commit f829411
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contexts/LeveragerContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@ export const LeveragerContextProvider: FC<PropsWithChildren> = ({ children }) =>
break;
}
case 'MARKET-OUT': {
const _slippage = (leverageStatus.borrow * ((maIn.floatingBorrowRate * 5000n) / 31_536_000n)) / WAD;
const _slippage = (leverageStatus.borrow * ((maIn.floatingBorrowRate * 3_600n * 12n) / 31_536_000n)) / WAD;

const borrowShares = await marketIn.read.previewWithdraw(
[limit.borrow - leverageStatus.borrow + _slippage],
opts,
Expand Down

0 comments on commit f829411

Please sign in to comment.