# 🔮🌜 Delphi **Published by:** [vex](https://paragraph.com/@vexil/) **Published on:** 2022-03-14 **URL:** https://paragraph.com/@vexil/delphi ## Content In ancient Greece, the people considered the center of the world to be in Delphi, and many journeyed to seek the advice of the city’s oracle when making important decisions. This tool is like the city of Delphi in that most will come to it seeking advice, but some may leave their learnings behind for future visitors as well.Obligatory apology for the obscure and corny intro. This is my first article, did I do that right? In short, Delphi enables anyone to easily create management-free oracles. The kicker is, these oracles represent an equation that is evaluated each time its value is fetched. The oracle’s equation evaluator supports both arithmetic and boolean operators, and its variables are assigned to ChainLink aggregator results.Sounds cool! But… why?TL;DR- Synthetic Assets Good question! Delphi is a feeless and permissionless tool, not a protocol. Without an application, it is just a cool toy. Thankfully, we’ve got the perfect use-case. At Bao Finance, we’re currently working on our Markets protocol- a collateral debt position (CDP) style synthetic asset issuer. Recently, we deployed Markets along with baoUSD, the flagship synthetic asset of the protocol. Now that we’ve got a way to collateralize and issue our synthetics, we can start the real work. With Delphi, you can create oracles that represent creative, unique positions, all without the need to write any code. In the UI, the oracle creation dashboard lets you designate an equation that will be stored in the oracle contract. Each time the latest value is fetched, your equation will be evaluated and the result will be the oracle’s answer. Variables in this equation represent ChainLink aggregator results and/or constants. By using ChainLink, we can ensure that Delphi Oracles are provided the most reliable, secure and accurate on-chain data available. Because of the near endless possibilities and its reliance on ChainLink for data, Delphi is perfect for creating reliable oracles for synthetic assets that represent obscure positions. Squared ETH, ETH vs. BTC Market Cap, or Inverse Oil? No problem!Delphi UI - Oracle Creation (Not Finalized)Because the equations can also include boolean logic, piecewise functions can be defined using the ternary operator. For example, an oracle could be created to adjust a synthetic's price from 2x to 4x OIL based on a constant price threshold.Example piecewise exposure adjustment function for OIL/USDExplorerThe Delphi explorer shows oracles that have been endorsed by the protocol and offers a search function for all other oracles. Here, you can view the equations of existing oracles as well as 90 day historical data that starts when the oracle is deployed.Delphi UI - Explorer (Not Finalized)Equation SpecificationDelphi equations support the following arithmetic and boolean operators:Addition a + bSubtraction a - bMultiplication a * bDivision a / bPercent a % b - Alias for (a * b) / 1e18Square Root sqrt(a)Equality a == bInequality a != bGreater than a > bGreater than or equal to a >= bLess than a < bLess than or equal to a <= bBoolean and a && bBoolean or a || bTernary (if/else) x ? a : bLogarithms log(c, a, b) - See guide on UIFractional Exponents & nth roots nth(c, a, b, x) - See guide on UIIntegrating into BAO MarketsThere are a few steps we’ll need to take before Delphi’s oracles power BAO’s synthetics. To begin with, Delphi needs to be tested thoroughly and audited. After that, a formal process for creating synthetics supported by Delphi oracles must be established. The process for creating a synthetic based on a Delphi oracle will likely look something like what I’ve laid out below, however it is subject to change:Create a data feed on Delphi.Submit your data feed for audit.The audit process will involve rating the synthetic’s risk, ensuring that the equation is safe and modeling the potential price action of the synth based on existing historical data.Once the data feed has been audited and approved by the Testing & QA Galaxy and contributors, a governance vote will be presented for the DAO to approve the new synthetic.Once the governance vote passes, the team will configure and deploy the synthetic, and then the multisig will add it to BAO Markets.Final NotesTo me, synthetic assets are exciting- the possibilities are endless. Delphi embraces that idea, offering a permissionless playground for the creation of synthetic asset data feeds and a process for users to have their own synthetics listed on BAO’s Markets. I’ve had a blast learning and evolving with the BAO team over the past year, and it’s rewarding to see the original goals of the DAO start to take shape. We’re just getting started 😉 Delphi is an early idea and a functional proof of concept. I hope to be able to expand upon it with off-chain data provided by ChainLink, Uniswap style TWAP oracle support, more variable types, and overall provide the tool with as much customization potential as possible without compromising its security. If you’d like to contribute or report an issue, Delphi’s GitHub repos can be found at baofinance/delphi & baofinance/bao-ui. Delphi still has to go through extensive testing before being deployed on mainnet, and we’ll likely find a few issues here and there over the next couple weeks. Delphi is licensed under GPL-3.0. If you made it here, thanks for reading! Special shoutout to N0xMare for the initial idea and the BAO team for feedback throughout the initial stages of the development process. If you’re learning about BAO Finance from this article, consider joining our discord and checking out the project :) The testnet UI is located at https://delphi.baofinance.dev. ## Publication Information - [vex](https://paragraph.com/@vexil/): Publication homepage - [All Posts](https://paragraph.com/@vexil/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@vexil): Subscribe to updates