Emergency Closing Positions

How to Close a Position on SYMM if the Frontend is Down

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.

Solution 1: Use the IPFS FE

Use the IPFS frontend to close the position (Website TBA)

Solution 2: Manually Close with a Block Explorer

Step 1: Locate the Transaction When You Opened the Position

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:

Step 2: Find the calldatas[] for Closing the Position

You 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:

  1. 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:

    Address: 
    0x976c87cd3eb2de462db249cca711e4c89154537b
    (SYMMIO: Clearing Engine)
  2. 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.

  3. 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.

Step 3: Execute the _call() on the MultiAccount Contract

Now that you have the calldata[], you can manually execute the closing request:

  1. 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.

  2. 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.

Last updated

Logo

All rights to the people (c) 2023 Symmetry Labs A.G.