Skip to content

Commit

Permalink
fix slippage calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmDreamy committed Jan 3, 2025
1 parent a9d214e commit dbf061e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web3-functions/magicusd0pp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ Web3Function.onRun(
args: [
quote.transaction.to,
quote.transaction.data,
(quote.outputTokens[0].amount * WAD) /
parseEther(`${(10_000 - slippageLimitBps) / 10_000}`),
(quote.outputTokens[0].amount *
parseEther(`${(10_000 - slippageLimitBps) / 10_000}`)) /
WAD,
],
}),
});
Expand Down

0 comments on commit dbf061e

Please sign in to comment.