Current problem
Arbitration bots are spamming the network with very little value of the transaction. The logic behind this behavior is that they are splitting arbitration trades in multiple micro-transactions, to reduce the chance of being outpaced by another trader.
Currently, a bot that is not spamming has a big chance of seeing his transaction reverted due to a front-ran transaction done by another spammer bot, causing slippage.
As transaction order inside blocks are kept to the discretion of the validator, having hundred of micro-transactions increase the chance of having a good amount of those transactions completed,
while having one big transaction would eventually have a greater chance to fail, with zero profit created for the arbiter.
Short term solution from the Harmony team is to change the minimum gas-fees rate from 1 Gwei to 30 Gwei. This solution however comes with a cost of accessibility for our users.
Currently, Harmony’s key feature is low-gas fees transaction, which attracted thousands of users from third-world countries, and a lot of video-game projects like Defi Kingdoms or Crypto Royale.
Those games rely heavily upon daily transactions made by users, which can cost multi-millions gas each.
As an example, a “quest” transaction in Defi Kingdoms (6 heroes, end of quest, 5 runs) would cost approximately 5M gas, or ~0.15 one with a minimum Gwei per gas of 30 Gwei.
It is at the current One token price around 4cts/tx @ 30 Gwei, which seems affordable enough but might prove to be harmful in the long run, as One token price might raise in the future.
I do believe there is a better solution to this problem, and Harmony should keep an edge against competition in the transaction fee domain.
Solution
The solution I want to discuss here would be to:
- Ensure predictive sorting of transaction in each block created, each transaction being sorted by hash of the transaction data contained into the transaction.
- Add an optional parameter “customNonce” into the block to offer the possibility to the block signatory to forge a signature of small size, allowing the creator to “front-run” the block.
Given this solution is provided to the arbitration bots, their ability to take profit now will rely on their capability of quickly generating a nonce which allows them to have a hash with low value.
There won’t be any interest anymore into spamming each block with many transactions, as a big transaction with customNonce well-crafted to be prioritized into the block will outrun most of the remaining transactions.
The competition race between bots will be kept outside the blockchain, and they will need to invest in their own equipment to forge the best nonce in the limited amount of time of a block.
This system will also complicate the possibility for a “greedy” validator to inject front-run transactions into any block based on the current backlog of transactions, as they will need during the little time they have to perform a search for the best nonce to prioritize their transaction and outrun other transactions.
The field could remain optional, in which case the value of the customNonce would be “0”, allowing any existing client to continue working without any modification, while bot creators and specialized developers could update their client, take advantage of this feature to push their transaction on top of the block.