Skip to content

Commit 628084e

Browse files
committed
account for gas fees
1 parent 3b35eae commit 628084e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uBTC.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ contract uBTC is WETH, Ownable {
8787

8888
function withdraw(uint64 amount, uint32 btcBlockHeight, string calldata dest) public {
8989
// burn uBTC
90-
// TODO(powvt): how to account for gas fees? burn and have user pay?
91-
_burn(msg.sender, uint256(amount));
90+
// TODO(powvt): this hardcoded amount is the btc withdraw gas fee paid by the network
91+
_burn(msg.sender, uint256(amount) + 1000000);
9292

9393
// Create Bitcoin transaction using the UTXOs
9494
bytes memory signedTx = CorsaBitcoin.createAndSignBitcoinTx(address(this), amount, btcBlockHeight, dest);

0 commit comments

Comments
 (0)