I got two wallets on the BSC. The first one (walletA) is empty of BNB but has access to another token, say TOKENX, and the second one (walletB) has BNB. What I want to do, is tranfer some TOKENX from walletA to a third wallet (walletC), but as walletA has no BNB in it, I must send first some from walletB to walletA. It works well, except that I have to wait for the BNB transfer to be confirmed in order the transaction walletA --> walletC to be sent. The workflow is as follow

tx1 = BNB from walletB --> walletA
wait for confirmation of tx1
tx2 = TOKENX from walletA --> walletC (fees are paid with the previoulsy sent BNB)

What I would like to do, is put in the same block, or at least send at the same time those two transactions to accelerate the process and ensure that no one would be able to retrieve the BNB from the first transaction before the second one is executed.

Is that possible, or is there a clever way to do it ?

The original issue is that there is a hacker that has access to walletA and can retrieve any BNB on it. I would like to be able to interact with TOKENX, but for that I need some BNB to pay fees. The problem is that as soon as I put some BNB on the walletA, the hacker retrieves them so that my transaction on the contract for TOKENX cant be completed as I dont have any BNB to pay fees. I need to be faster than the hacker and I dont figure how to do it properly.


1 Answer 1


Not entirely sure if it is possible to force two transactions, especially from two different address to be in the same block, I would say your best bet would be to use Flashbots, they were created to tackle MEV problems and frontrunning.

Not the answer you're looking for? Browse other questions tagged or ask your own question.