Smart Contract Design
An overview of the contract structure that makes Pragma secure, robust, and easy to integrate
Contract Structure
The V1 of the Pragma Oracle consists of three smart contracts, that each play a role in making the oracle easy to use and robust.
Publisher Registry
The most static component, designed to be updated extremely infrequently because its state should be permanent (each publisher and their address). Currently an ownable contract but will become permissionless as Pragma decentralizes.
Oracle Proxy
A proxy contract that coordinates the Publisher Registry and the Oracle implementation(s). This is the contract which protocols interact with directly.
Oracle Implementation
Contains the logic for storing and aggregating specific key/value data streams. Designed to be updated only as frequently as absolutely necessary.
Aggregation Mechanism

1
Data Collection
Multiple publishers submit data from various sources to the Oracle
2
Initial Aggregation
For each source, a median price is calculated from publisher-submitted values
3
Final Aggregation
When consuming data, users can select their preferred method to aggregate across sources
Security Measures
Peer Reviews
Our contracts have thoroughly been peer-reviewed by multiple actors in the Starknet ecosystem
Professional Audit
Complete audit by Nethermind, with the report available here
Bug Bounty
Active bug bounty program through ImmuneFi
Direct Contact
Direct communication channel at matthias@pragma.build
Explore the Data
Interactive Explorer
We have a fully-fledged explorer available on our website.
There you can explore what’s happening on and off-chain, who is providing data, and more.
If there is any other information you would like to see displayed, let us know!
Deployed Contracts
Contract | Address |
---|---|
Publisher Registry | 0x24a55b928496ef83468fdb9a5430fe031ac386b8f62f5c2eb7dd20ef7237415 |
Oracle | 0x2a85bd616f912537c50a49a4076db02c00b29b2cdc8a197ce92ed1837fa875b |