ebtc-protocol / ebtc

GNU General Public License v3.0
55 stars 25 forks source link

Flippening product economic simulation #499

Open dapp-whisperer opened 1 year ago

dapp-whisperer commented 1 year ago

https://github.com/Badger-Finance/ebtc-sims/pull

rayeaster commented 1 year ago
dapp-whisperer commented 1 year ago

@rayeaster what is the next step towards getting this able to be hooked up to a UI?

rayeaster commented 1 year ago

@rayeaster what is the next step towards getting this able to be hooked up to a UI?

I think UI could try to use this tool now with GMX & AAVE cost comparison to

But the simulation output(conclusion) depends heavily on the available liquidity in eBTC-stETH weighted pool of Balancer. It seems around $100M ~ $300M worth of eBTC plus stETH would help to achieve good slippage for a big leveraged position of size $5M

rayeaster commented 1 year ago

Some helpful insights from @spadaboom

Aave

- swap fee should be considered the same for comparison purposes
- are we using variable or fixed fee for interest rate? Is the average for variable 1.5% which is the number you used?
- We should use the flashloan fee that Aave charges not Balancer via defisaver. Since we could be in the same boat once they integrate our contracts.
- We need to take into consideration utilization somehow.
- Can you explain the "2x leverage" being the max allowed on Aave?
- We need to have some type of way to show your total position since with eBTC having lower MCR we can borrow much more in $$ terms. Thats pretty important for a user that wants XYZ short position.

SNX

- i think we missed the mark on this comparison. There is no way its $0 to keep a position open. Funding rate is going to be competitive with GMX and others or they would of already taken all the users. We need to include a funding fee here
rayeaster commented 1 year ago

@spadaboom

For AAVE:

rayeaster commented 1 year ago

Similar to the post for GMX comparison, we could do a dedicated thread for AAVE comparison as well:

rayeaster commented 1 year ago

According to Synthetix/Kwenta API data, I fetched funding rates for sBTC market from 2023-02-09 to 2023-09-13 (over 7 months) with following summary (positive funding rate means short position will receive money while negative funding rate means short position will pay out money):

Toal Hour Count=5028
Hourly funding rate Avg=0.007405%

Positive Count=3025(60.16%)
Positive Hourly funding rate Avg=0.02845%

Negative Count=2003(39.83%)
Negative Hourly funding rate Avg=-0.02438%

So for Sythetix/Kwenta comparison, maybe it make sense to use Quarter (3 months) instead of Year as the observation duration. We may argue that in the worst case (in favor of eBTC), funding rate of Kwenta during that entire period (3 months in a bear market) could be all negative for short position.

And another quite worrying aspect (if not the most) for trader in Synthetix/Kwenta is that they need to swap the principal (native ETH or wstETH) to sUSD to open position. So they would lose the upside of ETH forever

@spadaboom please shed your light on this