Add a safety check right before user submit the tx into mempool.
Perform a simple rough diff calculation with the fee derived from btc-staking-ts lib.
If the fee difference is X times bigger, then stop the submission and show warning error.
The formula is tx byte * fee rate
The X is yet to be determined, but can start with 2 in the code as a constant.
Add a safety check right before user submit the tx into mempool. Perform a simple rough diff calculation with the fee derived from btc-staking-ts lib. If the fee difference is X times bigger, then stop the submission and show warning error. The formula is
tx byte * fee rate
The X is yet to be determined, but can start with 2 in the code as a constant.