Closed 0xDosa closed 2 years ago
https://github.com/RageTrade/arbitrage-bot/blob/cb9dc696b06a609800a58b72ecfed43082484c7d/arbitrage-bot/rage-trade/index.ts#L242 This check should be basis the position that you are trying to take and not you current position
check seems correct, for margin ratio after trade, that check is done in simulatePostTrade
https://github.com/RageTrade/arbitrage-bot/blob/cb9dc696b06a609800a58b72ecfed43082484c7d/arbitrage-bot/rage-trade/index.ts#L242 This check should be basis the position that you are trying to take and not you current position