What is A DeversiFi Trading Key and How Do I Make A Backup?

What is A DeversiFi Trading Key and How Do I Make A Backup?


Background

DeversiFi uses cryptography called STARKs to prove and verify trading activity on DeversiFi in a trustless manner. This means that trading on DeversiFi is self-custodial. DeversiFi cannot take possession of customer funds and if DeversiFi were to go offline, traders can activate an ‘escape hatch’ via the Data Availability Committee to retrieve their funds. 

More information regarding the StarkWare settlement system is available here


DeversiFi Trading Keys

As STARKs use a different signature scheme to the Ethereum blockchain, a STARK keypair needs to be generated, which allows for the interaction with the StarkWare high speed settlement system. Every time a DeversiFi trader submits an order to the exchange, or makes a deposit/withdrawal they are cryptographically signing a message using their Ethereum wallet private key that instructs their DeversiFi trading key on the required action. This is a process that is common to all self-custodial layer-2 exchanges that use zero-knowledge cryptography (STARKs, SNARKs etc).

The trading key generation happens behind the scenes in a trustless manner, making on-boarding to the DeversiFi exchange effortless.

When you register your Ethereum address with DeversiFi for the first time (the registration transaction) a DeversiFi trading key is generated and associated with your Ethereum address. You can think of your DeversiFi trading key as similar to an API key on a centralised exchange.



Backup Your DeversiFi Trading Key


If you are connecting to DeversiFi via Ledger or Keystore, then you do not need to create a separate backup of your DeversiFi trading key. If you are connecting via Ledger then you simply need to make sure you have made a backup of your Ledger seed phrase. if you are connecting via Keystore, then you need to create a backup of your Keystore Ethereum private key, using the 'create backup option detailed below. 

If you are connecting to DeversiFi using MetaMask, then you need to make a backup your DeversiFi trading key and keep it safe (instructions below). If you lose your DeversiFi trading key, then you will lose your ability to trade on DeversiFi, but can still interact directly with the DeversiFi smart contracts to withdraw funds back to your MetaMask Ethereum address. See the instructions on how to withdraw your funds if you lose your trading key here


1) Keystore 

How to backup your Keystore Ethereum Private Key using DeversiFi

Keystore natively supports STARKs on DeversiFi, therefore you do not need to create a backup of your DeversiFi trading key if connecting via Keystore. Every time a trading key signature is needed to sign an order on DeversiFi, the Keystore wallet deterministically generates the trading key as-and-when required. You simply need to backup your Keystore Ethereum private key using the option on DeversiFi. 

Simply navigate to the keystore wallet option in the ‘connect wallet’ section, and use the ‘Back up wallet’ option to export a.JSON file of your Ethereum private key that is encrypted using your choice of password.




2) MetaMask

How to backup your DeversiFi trading key if you connect to DeversiFi using MetaMask 

If you are connecting to DeversiFi using MetaMask, then you can backup your DeversiFi trading key directly after you make the initial registration transaction for the first time.




If for some reason you cannot backup your DeversiFi trading key at the point of registration, or you forget to, you can backup your trading key using the prompt in the ‘balances’ widget.




In future it will be possible to backup your DeversiFi  trading key even after you have already made the first backup copy.


Ledger Nano S or Nano X

Ledger Nano S and Nano X natively support the STARK cryptography that is used to generate the DeversiFi trading key, and therefore a separate DeversiFi trading key backup is not needed if you are connecting to DeversiFi via Ledger. Every time a trading key signature is needed to sign an order on DeversiFi, the Ledger hardware wallet deterministically generates the trading key as-and-when required. Therefore you simply need to make sure that you have made a backup of your Ledger master seed phrase.

Instructions on how to save your Ledger recovery phrase are available in the Support section of the Ledger Website

Ledger Nano S

Ledger Nano X




Trouble Shooting


Can I use my DeversiFi Trading Key with more than one Ethereum address/wallet (MetaMask Account)? 

It is only possible to have one DeversiFi Trading Key per Ethereum wallet (MetaMask account). 

You are able to reimport the DeversiFi Trading Key file using another PC/Browser provided that you are connected to the same Ethereum Address (MetaMask).

However, it is not possible to import a DeversiFI Trading Key to use with a different Ethereum address (MetaMask account). 


How to I withdraw my funds if I lose the trading key registtered to my MetaMask account? 

Please see the instructions on how to interact directly with the DeversiFi smart contract here


Did this solve your problem?