BSC Performance Benchmark — Traders Can trade better with the BDN

bloXroute Team
5 min readOct 29, 2021

By: Eyal Markovich, Co-Founder & COO

Over the last two weeks, we have deployed several performance improvement measures for BSC and seen a large number of new BSC traders signing up for our service. As a result, the performance of the BSC-BDN improved significantly. On average over 90% of the transactions received in our test came from the BDN first, instead of the public P2P network. For the same reason, transactions sent via the BDN were delivered significantly faster than the public P2P network. These results reaffirm that BSC traders can trade better using the BDN.

Our benchmark test focused on three main areas that are important for most BSC traders: hearing important transactions timely, sending transactions to validators timely and streaming new blocks timely. In this post we will describe the testing methodology and present the results.

Testing Environment

  • Two regions were involved — US East and Singapore.
  • The profiling script ran on a separate host with similar latency to the Go Gateway and to a BSC node (not connected to the BDN). Ping times were identical 0.5 milliseconds on average.
  • The BSC node was not connected to the BDN.
  • The Go Gateway was running under a bloXroute Enterprise Elite account.
  • The instance type in use was an ali instance type ecs.i2.2xlarge, with 8 vCPU, 64 GiB memory and local NVMe SSD — I/O-Intensive local disk.
  • The BSC node was configured with 200 peers.

Hearing Pending Transactions

The ability to hear about trigger transactions as timely as possible is crucial for Defi trading success. We used a compare script, which streams transaction hashes from both of the Go Gateway and the BSC node at the same time, to record when the transactions were received by the endpoint and see whose transactions arrived first.

US East Region

Below is the result of running the script for 10 minutes in the US East region:

Interval: 600 seconds. End time: 2021–10–20 19:31:41. Minimum gas price: NoneAnalysis of Transactions received on both feeds:Number of transactions: 60834Number of transactions received from Gateway first: 58015Number of transactions received from BSC node first: 2819Percentage of transactions seen first from gateway: 95%Average time difference for transactions received first from gateway (ms): 106.6Average time difference for transactions received first from BSC node (ms): 36.1Total Transactions summary:Total tx from gateway: 74563Total tx from bsc node: 60894Number of low fee tx ignored: 0

The result above shows that during the10 minutes of testing 90% of the transactions arrived first from the gateway with an average difference of above 100 milliseconds.

To test under a more real environment, we then focused on PancakeSwap only. To filter just on the PancakeSwap Router address, the script needs to perform additional web3 calls to get the transaction content from the node.

Interval: 600 seconds. End time: 2021–10–20 19:17:36Minimum gas price: NoneAnalysis of Transactions Received on Both Feeds:Number of transactions: 14486Number of transactions received from Gateway first: 14390Number of transactions received from BSC node first: 96Percentage of transactions seen first from gateway: 99%Average time difference for transactions received first from gateway (ms): 104.0Average time difference for transactions received first from BSCnode (ms): 8.0Total Transactions Summary:Total transactions from gateway: 14751Total transactions from BSC node: 14491Number of low fee transactions ignored: 0

In this test, 99% of the Pancake transactions the script first received came from the gateway.

Singapore Region

We ran another similar load in Singapore and it showed similar results:

Interval: 180 seconds. End time: 2021–10–19 21:42:16. Minimum gas price: NoneAnalysis of Transactions received on both feeds:Number of transactions: 17800Number of transactions received from Gateway first: 16046Number of transactions received from Ethereum node first: 1754Percentage of transactions seen first from gateway: 90%Average time difference for transactions received first from gateway (ms): 108.7Average time difference for transactions received first from Ethereum node (ms): 10.3Total Transactions summary:Total tx from gateway: 20081Total tx from eth node: 17888Number of low fee tx ignored: 0

Sending Transactions

In order to compare the speed gain from the BDN for propagating transactions to validators, we have used the same technique we used for the Ethereum BDN benchmark test. A pair of almost identical transactions using the same nonce was sent at the same time. One transaction is being sent to a BSC node and the other to the BDN via the Go Gateway. We then checked which transaction was included in a block. Since the two transactions in the pair used the same gas price, the one that arrived at the validator sooner should be mined first.

Initial check completed. Sleeping 3 sec.Sending tx group 1.blxr response: JsonRpcResponse<{“jsonrpc”: “2.0”, “id”: “1”, “result”: {“txHash”: “17f701e1d4465f134f0f9f56f9065a27d4b7c5168defd950a24aac0e05cf6926”}}>node response: JsonRpcResponse<{“jsonrpc”: “2.0”, “id”: “3”, “result”: “0xfed0b4ab9b78bb600b1e32a2d1a50013f4fd3495352cd1881e10a40f8acefea3”}>Sleeping 3 sec.Sending tx group 2.….Sleeping 1 min before checking transaction status. — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -Sent 100 groups of transactions to bloXroute and BSC endpoints, 100 of them have been confirmed:Number of confirmed transactions is 8 for BSC endpoint.Number of confirmed transactions is 92 for bloXroute endpoint.

The results show that 92% of the transactions sent via the BDN were mined.

Hearing New Blocks

As the block time in BSC is 3–4 seconds, being able to hear the latest blocks in real time could give traders a huge advantage especially when the strategy is new blocks arbitrage.

Below is the result of running the blocks compare script. The script analyzes which source (the BDN gateway or BSC node) provided the new block information first.

Interval: 300 seconds. End time: 2021–10–21 18:08:07Blocks summary:Number of new blocks received first from gateway: 115Number of new blocks received first from node: 1Total number of blocks seen: 116Total blocks from gateway: 121Total blocks from eth node: 100Analysis of Blocks received on both feeds:Number of blocks: 93Number of blocks received from Gateway first: 93Number of blocks received from Ethereum node first: 0Percentage of blocks seen first from gateway: 100%Average time difference for blocks received first from gateway (ms): 1271.4Average time difference for blocks received first from Ethereum node (ms): 0

The results show that all blocks during the 5 minutes run arrived first from the BDN with an average difference of over 1 second.

--

--

bloXroute Team

Scaling blockchains to thousands of on-chain transactions per second. Today.