Vanilla is a meritocracy of the best investors. Investors who make profitable trades through Vanilla Trade receive VNL governance tokens and thus increase their influence over the network.
We hypothesize that a dynamic meritocracy will consistently outperform any other governance system.
Profit mining is a novel token distribution mechanism, where you "mine" VNL tokens by making a profit calculated in ETH. The more profit you make and the longer you've held your positions before selling, the more VNL you mine. Mining difficulty also increases over time, making early mining more lucrative.
You can see which tokens are eligible for profit mining on the Trade page.
Simply go to the trade page, choose a token and execute the purchase with ETH using Metamask or WalletConnect. The Vanilla contracts will execute the purchase on Uniswap and the tokens will be stored in the Vanilla smart contract. You can sell the tokens at any time to claim profit mining rewards and once sold, the ETH, including any profit you've made, will be returned to your wallet along with the VNL tokens you've mined.
Not right now. We will be adding this capability in the future, but it makes calculating profit mining rewards more difficult so we have left it out of scope for now.
Yes. VNL is the native asset of the Vanilla ecosystem. VNL is created by profit mining and is used for governance of the protocol.
No. The entire initial supply of VNL was created via profit mining by the community. Later the community collectively decided to fund the VanillaDAO alongside the Vanilla v1.1 launch by minting an amount equal to 15% of total supply to the Vanilla Treasury.
Vanilla was developed by Equilibrium and the initial smart contracts were deployed by an anonymous community member to the Ethereum blockchain.
The Vanilla system has been security audited extensively by Peckshield and Least Authority and there is an active bug bounty, but it is still experimental beta software as with most things built on Ethereum. We take the safety of your funds extremely seriously, but perfect security doesn't exist so tread carefully.
Yes. Most of Vanilla's contract logic is non-upgradable and thus can't be changed by anyone. The only exception to this is the dynamic safelist which is controlled by the VanillaDAO.
The VanillaDAO is a community controlled 4-out-of-7 ethereum multi-sig wallet, which hosts the VanillaDAO treasury and is used for deploying some parts of the Vanilla protocol. Equilibrium controls 3 of the 7 signers and the remaining 4 signers are the largest VNL holders from the community who volunteered.
No. Vanilla incorporates a dynamic safe-list of tokens, which is controlled by the VanillaDAO and defines the ERC-20 tokens that are eligible for profit mining rewards. The safelist allows the community to ensure that only legitimate tokens with enough liquidity can be traded through Vanilla Trade.
To calculate mining rewards in trade i
which sells tokens, Vanilla uses the following algorithm:
where
Absolute profit is determined by the positive difference of how much WETH the trader used to buy tokens and how much WETH the trader got back when selling those tokens. For example, buying 1000 USDC with 1 WETH, and selling them all for 2 WETH would equal 1 WETH profit.
To calculate the profit of the trade, the Vanilla contract must keep track of the purchase price. However, if the trader buys 1000 USDC for 1 WETH, then 1000 USDC for 0.5 WETH, and finally sells 1500 USDC for 1.5 WETH, what is the profit? Unfortunately, the traditionally used pricing conventions (FIFO and LIFO) are impractical to implement in smart contracts due to the gas costs of keeping track of all purchases. Instead, Vanilla uses a Weighted Average Exchange Rate to maintain the average purchase price for all token inventory in a fair and gas efficient way.
Weighted Average Exchange Rate after i
trades is calculated using two variables, () which represents the adjusted sum of WETHs used in trading and () which represents the trader's token balance.
When buying tokens with , Vanilla updates the variables as:
When selling tokens for , Vanilla calculates the absolute profit as:
and updates the variables for the next trade as
For reference, the quote for the average purchase price is calculated simply as a ratio of the two variables:
Finally, the rewardable Ether profit is calculated as the positive difference of average purchase price and the rewardable price.
Price manipulation is one of the biggest risks for VNL value. If a malicious trader can manipulate the token's ETH price in Uniswap at will, then they can easily rig the VNL supply. Price oracles are commonly used to mitigate this.
Uniswap v3 introduced robust price oracles which enable the pool to store variable amount of price observations on-chain. Integrating smart contracts can then use the observations to calculate a time-weighted average price (TWAP) across a time interval. Larger the time interval, the costlier it becomes to manipulate the average price.
The observation cardinality is the maximum number of the price observations in the Uniswap pool. Growing it requires someone to pay the fees and it's not incentivized in any way, which is probably why many pools still have the initial cardinality 1. When the cardinality is 1, it effectively means the pool doesn't keep enough price observation history to calculate any robust price average.
Vanilla uses the pool oracle in profit mining calculations to compute a TWAP across a 5-minute interval, which is the rewardable price . If the pool doesn't have enough observations to compute the full 5-minute TWAP, then the rewardable price is weighted proportionally based on longest available TWAP interval ( across seconds):
If the price observation history is not available at all (i.e. observation cardinality = 1), then the rewardable price will equal to the average purchasing price, meaning there's no rewardable profit and VNL will not be rewarded. This is also why the cardinality warning is displayed in the trading UI.
For each token you trade, Vanilla maintains the Weighted Average Purchase Block (WAPB) or . The WAPB after trades is calculated by using two variables, which represents the token-volume weighted sum of block numbers of the purchases and , which represents the trader's token balance, used already in Weighted Average Exchange Rate- calculations.
When buying tokens in a block number , Vanilla updates the as:
When selling tokens, Vanilla updates the proportionally to token balance change as:
The Weighted Average Purchase Block is then calculated as a ratio of these two variables:
Knowing this average block, The Holding/Trading Ratio (Squared) is calculated as:
where
The Holding/Trading Ratio (Squared) component can be interpreted as a ratio of two times:
In other words, the Holding/Trading Ratio (Squared) is just a ratio of times: The time the trade has been open compared to the time the system has been open. The times are measured in Ethereum blocks.
The following charts and tables depict simple heuristics of the incentive mechanisms. In all heuristics we vary one input in the VNL reward formula while keeping the other inputs unchanged and plot the amount of VNL in each case.
The first case observes the VNL attribution as a function of profits. We keep the Holding/Trading Ratios constant and inspect what happens to the attributed VNL. As we increase the sell price of the trade, while keeping the WAER constant, our profits increase. As profits increase 5-fold from 2 ETH to 10 ETH or 10-fold from 2 ETH to 20 ETH, there is a linear relationship with the increase associated with the VNL reward.
The second case observes the VNL attribution when we keep profits constant, but vary the Holding/Trading Ratio (Squared). The ratio is determined by how early the trader is participating in the Vanilla system and how long they are keeping their positions before closing them. The following chart depicts a case in which we vary the sell block number and keep the weighted average block constant.
We can easily see that when the Holding/Trading Ratio (Squared) increases from 25 % to almost 100 % (factor of 4) also the VNL rewards increase accordingly.
A trader can increase VNL rewards by: