Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Margin ? #5

Closed
Nathan-Kr opened this issue Mar 14, 2022 · 3 comments
Closed

Cross Margin ? #5

Nathan-Kr opened this issue Mar 14, 2022 · 3 comments

Comments

@Nathan-Kr
Copy link

I did a proof of concept doing funding arbitrage on okx, while i was trying to make a production version i found your project which is exactly what i was trying to do. This really is great work.

But I was wondering why wouldnt you go cross margin usdt. It's very unlikely you will get a margin call considering the spread on okx. Like when your short position loose money, your long will gain some anyway. Doing isolated need stoplosses whereas cross shouldnt need any.

Is my thought wrong or please would you clarify on that ?

Thanks you for your work

@Aureliano90
Copy link
Owner

It's mainly a risk concern. Wicks do happen.

If what you meant by "cross margin usdt" is "Single currency margin" mode with cross margin positions, you only get "P&L offset" when you open margin long with USDT and perpetual short. If you want to use spot cryptos as margin, you have to use "Multi-currency margin" mode and cross margin positions. It only increases capital efficiency by at most 33% compared to 3x leverage in isolated margin mode. And to keep position value in USD relatively the same you have to dynamically leverage and deleverage, which is already done in isolated margin mode.

@Nathan-Kr
Copy link
Author

I'm using single currency margin.
I'm opening my positions like so and i'm earning money somehow:
Here is looks-usdt-swap long x5
and looks-usdt margin sell x5 where i'm borowing looks, the only thing being that loan fees are incresing my liabilty so i need to repay(reduce) my position to get it the same size as my perp position.

image

I dont get why they wouldn't be the same usd value. I'm still newbie at this and maybe this is horribly wrong but it has proven itself for 2 weeks.
Maybe it's taking funding account as collateral because i have plenty of crypto on their too ?

Also wicks could be a problem thats right.

@Aureliano90
Copy link
Owner

Aureliano90 commented Mar 15, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants