Skip to content

Commit

Permalink
test: log min dstAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Jan 8, 2025
1 parent a3b576b commit c18b8da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/liquidation-sdk-viem/src/LiquidationEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,11 @@ export class LiquidationEncoder<

console.log(`repaidAssets: ${repaidAssets}, dstAmount: ${dstAmount}`);

console.log(
"min dstAmount",
repaidAssets.wadMulDown(BigInt.WAD + slippage),
);

if (dstAmount < repaidAssets.wadMulDown(BigInt.WAD + slippage)) {
// If we don't have enough liquidity, we try to swap to the alternative token and retry
if (
Expand Down

0 comments on commit c18b8da

Please sign in to comment.