Inspiration

Today, DeFi does not have a risk free rate of return. This is a major issue because

  • the risk free rate of return is the fundamental building block for pricing all other assets in the economy according to modern finance. How can we properly value Web 3 assets and make sound investment decisions if we do not consider the risk free rate of return?
  • the risk free rate underpins a $1 quadrillion market of interest rate futures contracts, derivatives, swaps and options. If there is no risk free rate, how we can begin to bring these securities on-chain and understand the present value of money?
  • the risk free rate is determined by the return from holding secure government securities, a $37 trillion market. These securities range from maturities of 30-days to 30-years. How can we make the Web 3 economy more robust without having legitimate risk free assets?
  • consumer and business loans often reference the risk free rate in determining the expected return. How can smart contracts become more serious alternatives to loans contracts without a risk free rate?

Yi3ldCurv3 is the start of our journey to bring the utility, power, and safety of risk free assets to Web 3's disruptive technology layer and create the revolution of modern finance that that Web 3 enthusiasts have long promised.

What it does

  • Yi3ldCurv3 brings the power of risk free to Web 3. We make all of our risk free rates, risk free rate smart contracts, and automated investment decisioning contracts publicly available at Yi3ldCurv3.com. Now users on these networks can conveniently access the risk free rate of return for different time periods just by calling our dedicated smart contracts.
  • Yi3ldCurv3 uses AI, machine learning, and the Nelson Siegel Svensson interest rate model to calculate a continuous risk free rate (yield curve) based upon the daily prices of US government bills, notes, and bonds and the underlying characteristics of each individual security. We precalculate the risk free rate of return for 15 key periods (30 days, 60 days, ...2 years, 5 years, 7 years, ... 30 years).
  • Yi3ldCurv3 uses Chainlink Functions and Automations to deploy these 15 key periods to 15 self updating smart contracts on 3 different networks (Ethereum, Avalanche, and Polygon). Now any smart contract on these networks can obtain the risk free rate for any of these periods by calling our smart contract. There are 45 smart contracts in total that update at least daily. They are all listed on Yi3ldCurv3.com
  • Yi3ldCurv3 uses Chainlink CCIP and Automations to expand our risk free rate to other networks like Arbitrum who do not currently have support for Chainlink Functions. We create two receiver and sender contracts from Ethereum to Abritrum to provide the 30 day and 90 day risk free rates to users on the Arbitrum network. We use Chainlink Automations to send the information at least daily from Ethereum to to Arbitrum.
  • Yi3ldCurv3 uses Chainlink Price Feeds, specifically the ETH staking rewards, to create a smart contract that can determines whether the risk free rate of return or ETH staking is offering a higher rate of return. Users of this smart contract can programatically adjust their investments according to the risk

How we built it

  • For Chainlink Functions, Automations, CCIP and Price Feeds, we typically started with Chainlink's starter kits and then adjusted to our needs. For example, to deploy 45 self-updating interest rate smart contract data series, we updated the deployment process and command line arguments to make the deployment process somewhat more straightforward.

  • For the yield curve creation, security cashflowing and more, we used Typescript and Cloudflare Workers to implement our data calculation, storage, retrieval and dissemination. That means we have created our own API, use Cloudflare's D1 database to store data, and written all of our calculation and machine learning libraries natively in Typescript. We use our API to deliver the data to Chainlink Functions.

Challenges we ran into

  • Getting testnet tokens on networks for gas (for the networks, not Chainlink - Chainlink makes it easy!)
  • Getting comfortable with Web 3 architecture. We iterated on our approach several times as we learned of best practices, so the project experienced many iterations in terms of design
  • Yield curve fitting - we may be the first people to actually fit a Nelson Siegel Svensson yield curve in Typescript. We did a lot of things "from scratch" to make that possible, and that's why we're currently keeping our repo private. Please just ask us to share with you if you need access but do not have it!

Accomplishments that we're proud of

  • Bringing 47, self-updating risk free rate rate series to 4 networks by deploying 49 individual smart contracts
  • Creating a robo-investing smart contract that bridges TradFi (risk free rate) and DeFi (ETH staking rate) to show the potential of bringing this data on-chain so that users can use this information to power their investment decision-making.
  • Learning and implementing Chainlink Functions, Automations, CCIP, and Price Data feeds for this project. These four Chainlink services in particular are essential to Yi3ldCurv3's feasibility. We had no prior experience with any of these services and thanks to the starter kits and templates provided by Chainlink, we were able to get up an and running.
  • Creating an accurate, continuous yield curve. Even though this is unrelated to Web 3 in particular, fitting an accurate yield curve is very difficult and requires machine learning and non-linear optimization techniques and many hundreds of iterations to achieve convergence. We have to cashflow every security and implement the Nelson Siegel Svensson interest rate model to minimize our error. Even the risk free rates provided by the US Treasury do not account for all outstanding securities, which is why most serious financial market participants used the more advance techniques that we do.

What we learned

  • This was our first time using Chainlink, so we used it and the 4 services for the first time. We can say the boilerplates and documentation are pretty robust! Thank you for making it possible for us to get up and running.
  • We deepened our understanding of interest rate models and bond valuation models. It's a fairly nuanced topic, so the chance to take on this big project strengthened our understanding in many ways.

What's next for Yi3ldCurv3

  • We can begin to deliver more data including futures rate, zero coupon rates, securities information, and indexes to meet the needs of more and more users
  • We can create loan contracts that specifically reference our interest rate in determining their own
  • We are also exploring creating a fully collateralized, escrow smart contract that is similar in spirit to a Treasury Bill. This will enable investors to finally access the risk free rate of return but will not require investing in a treasury bill directly. Please let us know if you'd like to learn more!

Built With

Share this project:

Updates