Equilibrium received a grant from Web3 Foundation to pioneer handy developer tools that facilitate other DeFi projects’ migration to the Polkadot ecosystem. Specifically, a financial pallet that introduces a lot of ready-to-go functionality for DeFi developers.
The grant came with three milestones to reach, and we have previously completed two of them. Today we are pleased to share our successful completion of the third and final one. This third milestone for our W3F grant pertained to volatility and Value at Risk calculations.
We’ve implemented a method for calculating a given user’s account or portfolio volatility. This is an important measure for any investor because it not only gauges risks, but tracks the probability of a declining market as well.
We’ve also implemented a method for calculating Value at Risk (VaR). This simple measure uses standard and log-normal distributions based on an assumption of gaussian returns, but it still allows for capturing some risks associated with user portfolios. Equilibrium uses this measure to stress test its liquidity pools and evaluate system health.
We’ve demonstrated these volatility and VaR calculations in action within our substrate for several different portfolios, testing the correct implementation of our financial pallet. We’ve even run integration tests: running a full node, deploying the substrate with oracle and financial pallets, and calculating sample portfolios using different assets and different frequencies with time shifts.
We’ve been working diligently to bring tools that make Polkadot a more convenient developer environment. We expect that it will incentivize those who are considering migration of their DeFi projects to Polkadot. You can check out the software code representing this third completed milestone at our public GitHub repository, and we look forward to updating you on exciting developments to come.