Skip to content

Commit

Permalink
Fix basis points in mBTC swap rates
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Feb 15, 2021
1 parent cabb395 commit d44cbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/mBTC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const getSwapRates = async (mBTC: Masset) => {
const output = await mBTC.getSwapOutput(inputAddress, outputAddress, input)
const scaledInput = applyDecimals(input, inputToken.decimals)
const scaledOutput = applyDecimals(output, outputToken.decimals)
const percent = scaledOutput.sub(scaledInput).mul(1000).div(scaledInput)
const percent = scaledOutput.sub(scaledInput).mul(10000).div(scaledInput)
console.log(
`${inputStr} ${inputToken.symbol.padEnd(6)} -> ${outputToken.symbol.padEnd(6)} ${formatUnits(
output,
Expand Down

0 comments on commit d44cbf4

Please sign in to comment.