0

Since once a private key is public knowledge, anyone can sign with them, and there are plenty of bots prepared to drain funds added to exposed accounts. My question is, what ways are there to nonetheless fund such an exposed account and do another transaction (e.g. calling a smart contract) via that account? In other words, is there a way to make sure a block only contains a transaction funding said account iff it also contains a transaction directly using (most of) that funding?

2 Answers 2

1

There is no way to block transactions, once your private key is public your each deposit will be drained as soon as its sent. Just leave the key and generate new once.

Some MEV bots are set to tarket a minimum account balance amount you can check if that is the case to make some transactions if you're MEVed.

1
  • Agreed, you cannot block a transaction. The question is whether there are mechanisms to make sure your spending happens first. I wonder if a flashbot can manage this, but that probably requires the funding and spending to happen in the same block yet in the proper order, which I don't know the feasibility of...
    – Zommuter
    Commented Oct 26, 2023 at 7:58
1

Flashbots can be used to fund a compromised account and spend those funds in the same block. But aside from scams and honeypots there probably is no feasible use case to intentionally expose a private key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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