Click here to watch the full length demo video!
https://drive.google.com/file/d/1trqOYkJ5BL6NJQnGPo1OCRigboIU0T8I/view
Pull Based Oracle Project Completed!
Project ID: 1100090
Project Name: CHARLi3 “pull oracle” real-time price feeds on request (On Demand Validation service MVP)
Milestone: 5/5
Milestone link: https://milestones.projectcatalyst.io/projects/1100090/milestones/5
Summary of outputs
In this article we provide:
- A summary of the entire project
- Links to view the active data feed on a partner site (or a dummy site that we host in the event of not moving forward with any partner)
- A detailed summary of the solution including how the architecture works (as much as we can without giving out our IP and protecting the security of our networks)
- Close out video
- Close out report
The rock star development team from Charli3 and Metalamp, under the leadership of George Flevorsky, have just completed the project that delivers a “pull based” oracle architecture.
Project Summary
Standard push based oracles update data on-chain at regularly scheduled intervals. For this project we restructured our back-end and on-chain architecture at Charli3 Oracles to enable protocols to request data whenever they want and our oracle networks will respond within a block with the requested data. The triggering mechanism for requesting data is to simply send the gas for an update to a contract. This allows protocols to easily integrate with the pull based functionality (or On Demand Validation — ODV service from Charli3 Oracles).
Architectural Differences between Charli3 Push vs Charli3 Pull:
The ODV architecture uses 90% of the same logic as the current oracles on main-net (Oracle-V3). The difference lies in the triggering event for the node-update and aggregate transactions.
Current oracles on main-net (Oracle-V3) use a heartbeat, which means they generate a feed with a specific frequency or when a given percentage of change occurs. For this, the contracts need an X amount of C3 tokens in the contract to maintain constant feed generation. These tokens are used to reward node operators and platform operators consuming a fraction with each feed generation.
The contracts on ODV will always maintain a 0 C3 balance most of the time. If an application (or user) wants to generate an oracle feed, they must first send C3 tokens into the contract to cover all rewards. The pull-request transaction dynamically calculates and sends the minimum amount of C3 tokens that the contract needs to generate one aggregation.
For those familiar with the heartbeat model, the transaction we are describing in the ODV model is the add-funds transaction. So, we have changed the purpose of this transaction; in the heartbeat model, it serves as a method to support and keep alive any oracle by injecting and staking C3 amounts that will serve to generate feeds in the future. In the ODV model, it adds funds but only for one round.
What were the steps to completing this project?
- Firstly, we needed to review our current architecture and re-design it for this functionality. In milestone 1 we delivered the design after 1.5 months of research.
Here is a link to view the research and design completed during this stage: https://oraclecharli3.medium.com/charli3s-odv-catalyst-reporting-milestone-1-e90f7b218382
- Second, the team delivered a MVP of the service in August after 2 months of development. Documentation and SDK was made publicly available with a demo video of the service functioning successfully on pre-production Cardano. Since we did not have a partner to showcase this functionality, we designed a dummy use-case.
Here are some links to view the output from this phase of the project:
- Demo video of MVP: https://drive.google.com/file/d/15kvbd-NoFF2U76NC7CuqxYzSMqfUhaoK/view?usp=drive_link
- Documentation (WIP) and SDK: https://github.com/Charli3-Official/swap-demo-contract
- Pre-production odv contract: https://preprod.cexplorer.io/address/addr_test1wzy5k07lnrrdjjqwzq4t3vvn0zp5de34s4z7res9y4jjuwcaz3amy/tx#data
- Swap contract (dummy use-case): https://preprod.cexplorer.io/address/addr_test1wp5p6ztmlsc5agr2crc3yhrqpwrkq7a29a2muyzn3ekdrhqmzzdjz/tx#data
- Third, the team completed 1 month of thorough testing including an internal code audit/review.
Here are the links to view the output of this phase of the project:
- Internal Audit Report: https://drive.google.com/file/d/1WMLlFjnOGMU0Z7VOaLEYUoaG4amuRG7N/view?usp=sharing
- Fourth, the team created a live use-case on mainnet Cardano.
Here are some links to review the final output:
- Detailed Architectural design: https://oraclecharli3.medium.com/pull-oracle-main-net-progress-report-8adf465c1ad4
- Demo Video: https://drive.google.com/file/d/1trqOYkJ5BL6NJQnGPo1OCRigboIU0T8I/view
- Contract address: https://cexplorer.io/address/addr1w93vmc4m23cc6j507lhjf2duqxpjp5mdfey3fs767etxxjcyfmfv3/tx#data
- Github Repo for the dummy use-case: https://github.com/Charli3-Official/swap-demo-contract
Impact
Now, protocols on Cardano will be able to use Charli3 to request data on demand (instead of setting an interval to receive the data, otherwise known as a push oracle).
The benefit to protocols will be
a) lower costs as you only pull data when required, and
b) the ability to integrate payment for data delivery at time of user request. The latter benefit comes with increased integration work, but the elimination of the need to regularly “fill up” feeds with tokens/payment.
Please contact the charli3 team at info@charli3.io if you would like to integrate and use this new service.
Thank you for your continued support,