Posts

Leobridge Transaction size Impact

avatar of @notak
25
@notak
·
·
0 views
·
3 min read

Why is Transaction size important for LEOBridge

The LEO finance team, were very cautious about releasing their bridge, because they had a concern that if the transaction size was too large then there would be significant slippage, which would act as a fee.

So over time as liquidity increased in the bLEO pool (and wLEO), the LEO finance team increased the transaction size caps.

This got me thinking, what has the actual cost been in using the bridge.

For those that don't know the bridge converts the ERC20 coin into wLEO, this then is bridged across to Native LEO on hive, and then the native LEO is then sent to bLEO on BSC, and then this is converted to the customers ultimate coin selection on BSC.

Analysis performed

It has taken me some time to work out how to query both blockchains and then link them together so I can see a transaction end to end. I have the data now, and there are some interesting insights.

The first insight is that most transaction process on the BSC blockchain within a couple of minutes of being processed on the ETH blockchain. I was quite impressed by this, and credit to the LEO finance team for designing a system that is fast with as little market exposure as possible.

Anyway, back to the analysis, I could match 33 transaction that were from a stable coin to a stable coin (all USD). I thought these transaction are great candidates to see how much it really costs, as you expect the same value out as you have put in (less the fees).

The results were surprising, and are shown below:

return is the output tokens divided by the input tokens (both USD)

Why is the trend backwards?

The first thing that surprised me was that the return seemed to trend down with transaction size. This means the larger the transaction ,the more it costs, in this graph, 100% is no cost, 90% is a 10% cost etc.

I can't work out a good reason for the backward trend, apart from just luck. So it would be interesting to revisit this later, when there are more transactions.

Why are there returns above 100%?

This is the more fascinating discovery, you can actually make a profit from using the bridge, but how? Well I have thought of two possible explanations:

  1. there is a significant delay between the time the ETH transaction is made, and the value of LEO increases before the BSC transaction is processed. The problem with this theory is that the delay is usually only a couple of minutes
  2. There are differences in the price of bLEO and wLEO, thereby creating opportunities to profit.

I am of the view that the second reason is driving this.

So when should you use the bridge?

Quite simply when wLEO is cheaper than bLEO, that way you buy more LEO from ERC20 coins, and when you sell it for BEP20 coins you receive more.

Should I split a large transaction up?

Not necessarily, all depends on the current situation, in equilibrium than that's the right thing to do, but the differences seen here are bigger than slippage might be, so if you were to separate large transactions, you need to wait for arbitragers to come back in and re-stablise the price between wLEO and bLEO, so don't do your transactions in too quick succession.

So with the upcoming MATIC bridge will we see the same?

I doubt it, I don't know how it will be implemented but if its implemented the same as the current bridge, it is likely there will be bots written to take advantage of arbitrage situations. the reason this works better on BSC-MATIC is that the transaction fees are so small, so the prices will likely align, whereas on ETH, the gas fees are high, so the difference needs to be large enough to overcome the gas fees before it is equalised.

Let me know if you like this sort of analysis, I might be able to publish the data in an easy format to use if anyone is interested

Posted Using LeoFinance Beta