Creating a Sub-Account
Last updated
Last updated
All rights to the people (c) 2023 Symmetry Labs A.G.
In order to place trades using a SYMM frontend solution or otherwise, it's necessary to create a sub-account using a MultiAccount
contract that is whitelisted to interact with the hedger. All MultiAccount
contract addresses are listed in the table below:
Project Name | Version | Hedger State | Chain | SYMMIO Address | Collateral Address | MultiAccount Address | PartyBAddress | PartyB API Address | Main Subgraph | Analytics Subgraph | Parties Subgraph | Funding Rate Subgraph | Events Subgraph | Muon |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Users are required to provide a name an input parameter when they create a sub-account. All positions on a sub-account are in CROSS, but positions between sub-accounts are ISOLATED. If you're creating a bot that hedges against the impermanent loss an LP might incur, it could be useful to create a sub-account for each hedged position.
First, we'll define our environment-dependent variables in a .env
file like so:
The PROVIDER_URL
field should contain the Ankr RPC URL and the appropriate MUON_URL
can be found here.
First we'll define the contract that we want to interact with using Web3. In this case it's the MultiAccount contract. We create a new web3 Contract with the ABI provided in the /abi
directory and the multiAccountAddress
. We'll also use our WALLET_PRIVATE_KEY
defined in the environment to set up our web3 account.
The addAccount()
function takes one parameter, the accountName
, here we are simply calling the function on the MultiAccount contract and logging information related to the transaction.
This function creates a sub-account and returns the address.
Core
0.8.2
Active
Blast
0x3d17f073cCb9c3764F105550B0BCF9550477D266
0x4300000000000000000000000000000000000003
0xd6ee1fd75d11989e57B57AA6Fd75f558fBf02a5e
0xECbd0788bB5a72f9dFDAc1FFeAAF9B7c2B26E456
blast-hedger.rasa.capital
IntentX (Blast)
0.8.2
Active
Blast
0x3d17f073cCb9c3764F105550B0BCF9550477D266
0x4300000000000000000000000000000000000003
0x083267D20Dbe6C2b0A83Bd0E601dC2299eD99015
0xECbd0788bB5a72f9dFDAc1FFeAAF9B7c2B26E456
blast-hedger.rasa.capital
Thena V3
0.8.2
Active
BNB
0x9A9F48888600FC9c05f11E03Eab575EBB2Fc2c8f
0x55d398326f99059ff775485246999027b3197955
0x650a2D6C263A93cFF5EdD41f836ce832F05A1cF3
0x9fa01a45E245015fA685F21763e60C60832Ed2D6
IntentX
0.8.2
Active
Base
0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
0x8Ab178C07184ffD44F0ADfF4eA2ce6cFc33F3b86
0x9206D9d8F7F1B212A4183827D20De32AF3A23c59
Based
0.8.2
Active
Base
0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
0x1c03B6480a4efC2d4123ba90d7857f0e1878B780
0x9206D9d8F7F1B212A4183827D20De32AF3A23c59
base-hedger82.rasa.capital
CloverField (Polygon)
0.8.3
Pending
Polygon
0x976c87Cd3eB2DE462Db249cCA711E4C89154537b
0x50E88C692B137B8a51b6017026Ef414651e0d5ba
0xffE2C25404525D2D4351D75177B92F18D9DaF4Af
0x5044238ea045585C704dC2C6387D66d29eD56648
polygon-hedger-test.rasa.capital