Emergency Closing Positions
Last updated
Last updated
All rights to the people (c) 2023 Symmetry Labs A.G.
If you need to close your position or cancel a quote to unlock collateral but the frontend is unavailable, you can follow these steps to execute the operation manually using on-chain methods.
Use the IPFS frontend to close the position (Website TBA)
You need to find the SendQuote
event log that was emitted when you initially opened your position. This log contains essential information such as the partyA
address and the quoteId
. You can obtain this information from a block explorer (like Etherscan) by searching for your account and looking for _call()
transactions .
Here’s an example of what the SendQuote
emitted event might look like:
calldatas[]
for Closing the PositionYou need the calldata[]
to send to the diamond contract (in this case, the SYMMIO Clearing Engine) to request to close your position. Here's how you can do that:
Find the Diamond Address: From the SendQuote
log (from Step 1), identify the address of the SYMMIO Clearing Engine It will look something like this:
Access Louper.dev:
Go to louper.dev.
Paste the diamond address and select the correct chain (e.g., Ethereum, BSC, etc.).
Connect the wallet you originally used to open the position.
Request to Close the Position:
Navigate to the Write tab in louper.dev.
Look for the function requestToClosePosition
(or requestToCancelQuote
if the quote was never responded to). Populate the fields using the data you extracted from the SendQuote
log:
Make sure you adjust the closing price to ensure it reflects current market price with some added slippage to ensure that the closing operation goes through. For longs the closePrice
should be slightly less than the marketPrice
and for shorts the closePrice
should be slightly more than the marketPrice
Once you’ve populated the fields, click Write and wait for a wallet popup. Click the View Raw button to see the raw transaction data. This is where you’ll see the calldata[]
generated. Copy this as a HEX string.
_call()
on the MultiAccount ContractNow that you have the calldata[]
, you can manually execute the closing request:
Find the MultiAccount Contract: This is the contract you used to open the position, the same one you checked the logs for to find the SendQuote event.
Perform the _call()
:
Connect your trading wallet to the appropriate block explorer depending on the chain the trade was opened on (e.g., Etherscan or another compatible tool).
Perform a _call()
by pasting the calldata[]
and partyA
address into the appropriate fields.
Submit the transaction on-chain to close the position by clicking Write. If everything was set up correctly, the position should be closed successfully.