Open dapp-whisperer opened 1 year ago
degen
script https://github.com/Badger-Finance/ebtc-sims/pull/7/commits/06b610d0d728503c486a40d750c27f60b86b6f9abetaGang
profile scaffold https://github.com/Badger-Finance/ebtc-sims/pull/7/commits/ecda5d151192d479660e76713acd764408ba1762@rayeaster what is the next step towards getting this able to be hooked up to a UI?
@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
eBTC
is a generally good (even the best for the long term) choice for BTC short position in regard to cost; eBTC
helps to gain more (leveraged) exposure AND keep good LSD staking reward at the SAME time;eBTC
allows better fund utilization (lower MCR
& NO need to sell LSD asset to specified quote token) 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
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
@spadaboom
For AAVE:
the average borrowing APY (variable type) rate taken in simulation is around 1.5%
https://app.aave.com/reserve-overview/?underlyingAsset=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&marketName=proto_mainnet_v3
"2X leverage" is taken from the calculation using wstETH
as collateral in AAVE: since its Collateral Ratio is around 144%
(69%
LTV), the theoretically maximum leverage allowed with wstETH
position would be 144/(144-100)
= 3.3, so "2X" is a safe reasonable leverage option for AAVE https://app.aave.com/reserve-overview/?underlyingAsset=0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0&marketName=proto_mainnet_v3
Currently total position (Position Collateral
and Position Debt
) is simulated and reported by the tool as shown there https://github.com/Badger-Finance/ebtc-sims/pull/8#issuecomment-1661478513
Good point on flashloan fee for AAVE, now the tool use AAVE's own flashloan fee instead of defisaver's https://docs.aave.com/developers/v/2.0/guides/flash-loans#flash-loan-fee
Swap fee for eBTC
leveraged position depends on the available liquidity of pair eBTC-ETH
or eBTC-stETH
. It would be perfect if we could achieve similarly good slippage for the majority of market trade in regular size compared to the popular pair wBTC-ETH
Similar to the post for GMX comparison, we could do a dedicated thread for AAVE comparison as well:
Below comparison assume a FlashLoan fee of 0.0003
& swap slippage of 0.005
for eBTC system during position openning
AAVE charges a variable borrowing interest (up to 100%, typically 1.5%
) for wBTC
debt
Although AAVE enable wstETH as collateral but due to its LoanToValue limit (maximum LTV is 69%
), a safe leveraged position on AAVE could only get up to 2X to 3X (use 2X for comparison).
Compare how eBTC
& AAVE
would stack up if both users are now in a long ETH/BTC position up to $6M
(6X leverage) & $2M
(2X leverage) respectively when starting with $1M
. To hold that position for one Year it cost eBTC users $19718
& AAVE users $21400
Also eBTC user could earn staking reward of $126k
while a less ($84k
) staking reward earned by AAVE position
Calculating the annualized cost compared to starting capital it’s 1.48%
for eBTC & 2.14%
for AAVE.
eBTC user could earn $106k after subtracting the costs when using eBTC to long ETH/BTC! Annualized that’s earning 10.63% to keep this position open which doesn’t include if it ends up being a successful trade (ex. ETH outperforms BTC).
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
https://github.com/Badger-Finance/ebtc-sims/pull