Strategies with Validator Nodes - Elixir Finance

Given the strong interest in this category of posts, we return to the topic. Staying in the EVM environment, let's look together at Elixir Finance and why it might be interesting to launch a node.

But first, what’s Elixir Finance?

A Quick Introduction to Elixir Finance

Elixir Finance is a Delegated-Proof-of-Stake network that allows to provide liquidity to orderbook DEXes. The protocol allows to provide liquidity to books by adopting a variation of the Avellaneda & Stoikov algorithm, the orderbook’s equivalent of Uniswap v2 xy=k formula.

What problems are to be solved?

Market makers have 2 main issues:

  • inventory risk;

  • quoting an optimal bid-ask spread.

Elixir Finance introduces the concept of "reserve price": in a sideways market, the market maker sets bids and asks at an equivalent distance from the market price as it functions properly without emptying inventory on either side, whereas this does not happen in directional markets.

So it is necessary to find a way to establish the ideal bid/ask spread, and Elixir Finance has developed it from what they call the "reserve price."

r(s,t)=sqγσ2(Tt)r(s,t) = s-qγσ^2(T-t)

s = current market price
q = quantity base asset / units to desidered asset target
σ = volatility
T = closing time normalized at 1
t = current time, represented as a time fractionγ = inventory risk parameter

This formula allows the network to determine the distance between current inventory and target inventory, adjusting bids and asks appropriately, dividing liquidity on both sides of the orderbook without causing inventory imbalances should the asset price begin to have directionality.

Avellaneda & Stoikov developed a formula that determines the density of the orderbook that allows a reference price to be established, from which the optimal spread between bids and asks will then be determined.

δa+δb=γσ2(Tt)+ln(1+γ/κ)δa+δb = γσ^2(T-t) + ln(1+γ/κ)

δa, δb = bid/ask spread
δa = δb --→ symmetrical spread
κ = order book liquidity parameter

Starting with the reserve price, the ideal market price to be used based on the target inventory set by the user is calculated, and then the optimal bid/ask spread of a pair is calculated based on the depth of the book. Only then bids and asks are placed, thus making liquidity better distributed.

I refer you to the complete paper to better understand how this orderbook DEX model works.

In the Elixir Finance model, the intention is to eliminate any element of potential gamification in the application of the Avellaneda-Stoikov algorithm, and to do so, one does not linearly progress (Tt)(T-t) to zero, but rather randomly generates a value between 0 and 1 via SGX-secure enclaves, which will then be shared to validators.

Each pair listed in the DEX will have a different parameter, generating enough entropy to make it more difficult to calculate future values from an input data set for both the optimal spread (δa,δb)(δa, δb) and the reserve price r(s,t)r(s,t).

An additional element of randomness must be added to the timing of orders by applying so-called "flickering orders," preventing experienced market makers from playing with network orders.

Token $ELX

$ELX token has already been confirmed by the team and will be used to ensure the security and proper operation of the entire network. All validators and all nodes will have to staking a certain amount of ELX token to keep the infrastructure up and running.

$ELX is the only governance token in the ecosystem, as well as the only tool to control the direction of fees generated by the network. Those who participate in governance how network fees are generated and where they will be directed.

Who is supporting the project?

Elixir Finance has closed a $7.5M Series A fundraising round and a $2.1M Seed Round, at a $100M valuation.

It is supported by Hack VC, FalconX, Arthur Hayes, Kucoin, Commonwealth, NGC Ventures, AngelList Venture, Bloccelerate and Chapter One, already presenting several native integrations, including:

  • Perpetual Protocol and Perennial, perpDEX on Optimism and Arbitrum, respectively;

  • SudoSwap, AMM NFT-to-Token Marketplace;

  • dYdX, Magpie Protocol and many other DeFi protocols.

An airdrop has not been confirmed, but it costs nothing to try to launch a node, given also the low entry barrier.

Don’t forget to subscribe on Mirror to stay tuned to all future articles.

Elixir Node Validator - Step-by-Step Guide

To begin the procedure, you need a computer with any Linux distro installed, Ubuntu 20.04 or later will do, an SSD with +30 GB and a fast Internet connection (at least 100Mbit/s).

For those without resources capable of supporting a validator node at home, you can fall back on VPS (Virtual Private Server) solutions, that is, you can rent a virtual server.

There are several solutions, which I recommend below:

  • Contabo, I recommend the Cloud VPS S model, with 4 vCPU Cores, 8 GB RAM, 200 GB SSD SATA3;

  • Aeza, I recommend at least the VIEs-3 or PARs-3 model, with 4 vCPU Cores, 8 GB RAM, 120 GB NVMe. This is a Russian VPS service and payment by credit/debit card is not possible from many Western countries, but payments in crypto (BTC, BEP20, ERC20, TRC20, DASH, LTC, XMR...) are possible.

After payment is made, you will receive the IP address to access.

Contabo doesn't pay me in advertising them...yet. Referral link is possible? 👉🏻👈🏻
Contabo doesn't pay me in advertising them...yet. Referral link is possible? 👉🏻👈🏻

If operating from Windows, download the PuTTy app - SSH and telnet client - and enter the IP address of the VPS. A Linux terminal screen will open for you.

Enter the username (usually root) and password you chose at the time of purchase. If you have done everything correctly, the following screen will appear:

After login on PuTTy on VPS provided by Contabo
After login on PuTTy on VPS provided by Contabo

We can start by preparing the environment and installing docker.

sudo apt -y update
sudo apt -y upgrade
sudo apt -y install git curl build-essential screen gnupg lsb-release
sudo apt -y autoremove

Create the keyrings folder and install docker:

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt -y update
sudo apt -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin

To make sure that everything has been installed correctly, run the following command, it should return the message shown in the comment:

sudo docker run hello-world

# Hello from Docker!
# This message shows that your installation appears to be working correctly

Download Elixir Finance’s DockerFile file via wget and open it in nano:

wget https://files.elixir.finance/Dockerfile
sudo nano Dockerfile

Let’s create a new Etherum wallet (I recommend Metamask since Elixir Finance’s dashboard is still very immature) and edit:

ENV ADDRESS = 0xC929C76e437630761f5157aFbfAB753c74B1C3dc
ENV PRIVATE_KEY = private_key_from_Metamask
ENV VALIDATOR_NAME = 0xOuterGod
  • Paste your public address instead of 0x in ENV ADDRESS;

  • Paste your private key instead of 0x in ENV PRIVATE_KEY;

  • Choose what name you want to use for your validator node in ENV VALIDATOR_NAME.

Save the .env file as reported earlier by pressing Ctrl + XY and then Enter.
Now launch build command, start the node with screen and run the node:

docker build . -f Dockerfile -t elixir-validator
screen -S elixir
docker run -it --name ev elixir-validator
Launching docker logs ev
Launching docker logs ev

Request ETH Goerli on the following faucet.
Join the Discord channel --→ Link

Nyan ETH go brrr
Nyan ETH go brrr

Visit the Elixir Finance dashboard at the following link, connect with Metamask and claim the 1000 $ELXR. Stake via the “Stake” button and register the wallet validator with the “Enroll” button.

Dashboard on Elixir Finance
Dashboard on Elixir Finance

It is necessary to delegate tokens to other validators, I recommend doing that at my wallet as a way to support my work. You probably won't find it these days, but a team member has already confirmed that there will be an update soon and that the dashboard will be improved.

I'll leave you the public address of my node validator, so you can delegate your tokens to it: 0xC929C76e437630761f5157aFbfAB753c74B1C3dc

On the dashboard connect Twitter and Discord accounts and click on "Claim Role," which you can confirm on Discord.

Congratulations, you have successfully completed the installation of your node!

To update the node, run the following commands:

docker kill ev
docker rm ev
docker pull elixirprotocol/validator:testnet-2
docker build . -f Dockerfile -t elixir-validator

docker run -d --restart unless-stopped --name ev elixir-validator

To read the logs and make sure everything is working properly, run the command:

docker logs ev

If you like my work, I suggest you to subscribe and mint the entry in order to support my work. The cost is insignificant for you, but it helps me to know that you like this kind of content.

Subscribe to 0xOuterGod
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.