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


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 and DeversiFi cannot take possession of customer funds. If DeversiFi were to go offline, traders can always retrieve their funds. More information regarding the StarkWare settlement system is available here

DeversiFi Trading Key (DTK)

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

When you register your Ethereum address with DeversiFi for the first time (the registration transaction) a DeversiFi trading key is generated behind the scenes in a trustless manner and is 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

Some wallets natively support the DeversiFi Trading Key and therefore you do not need to make a backup. Some wallets do not yet natively support the DeversiFi Trading Key and therefore you do need to make a backup and store in a safe place

The DTK that you generate when connecting your Ledger to DeversiFi via MetaMask is not the same DTK that is generated if you were to connect directly to DeversiFi using Ledger without MetaMask

You can use the link in under the 'Wallet' menu at the top of the app.deversifi.com page to backup your DTK if you are connecting to DeversiFi with Keystore or Metamask in a few simple clicks:

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


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
Was this article helpful?
Thank you!