babylonchain / simple-staking

Simple staking application
Other
2 stars 5 forks source link

Perform safety check on fees #290

Closed jrwbabylonchain closed 2 days ago

jrwbabylonchain commented 1 week ago

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.

jrwbabylonchain commented 4 days ago

https://github.com/babylonchain/simple-staking/pull/302