Skip to content

Commit

Permalink
0.1% fee for eth-btc
Browse files Browse the repository at this point in the history
  • Loading branch information
taureau75 committed Jun 15, 2023
1 parent ae1fc6f commit 6d4be06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/eth_btc/btc_pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function makePayments() {

const balanceCheck = await exec(`${process.env.BITCOIN_CLI_PREFIX} getwalletinfo`);
const walletInfo = JSON.parse(balanceCheck.stdout);
let outgoing_amount = (bridge.deposit_amount * 0.998 * eth_btc_price) - network_fee;
let outgoing_amount = (bridge.deposit_amount * 0.999 * eth_btc_price) - network_fee;
outgoing_amount = Number(outgoing_amount.toFixed(8));
if (walletInfo.balance < outgoing_amount) continue;

Expand Down
2 changes: 1 addition & 1 deletion scripts/eth_btc/eth_pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function makePayments() {
break;
}

const outgoing_amount = ethers.BigNumber.from((bridge.deposit_amount * 0.998 * btc_price / eth_price * 1e18).toFixed(0)).sub(network_fee)
const outgoing_amount = ethers.BigNumber.from((bridge.deposit_amount * 0.999 * btc_price / eth_price * 1e18).toFixed(0)).sub(network_fee)
if (makerBalance.lt(outgoing_amount)) continue;

const select_deposit = await db.query("SELECT paid FROM bridges WHERE deposit_txid = $1", [bridge.deposit_txid]);
Expand Down

0 comments on commit 6d4be06

Please sign in to comment.