QRY Engine
The QRY Engine is the smart contract layer responsible for managing subscriptions, payments, and the registration of API Public Keys on the QRY Blockchain. Users create subscriptions by sending QRY tokens, subscription parameters, and registering their API public keys on the blockchain.
The smart contract managing the subscriptions checks the QRY token amount using the subscription price in USD or another currency, and an on-chain oracle provides the exchange rate. This enables more accessible pricing strategies for developers and interfaces using QRY.
The QRY Engine also maintains a consolidated list of available Gateway endpoints for Clients to access. Clients, in turn, probe these endpoints to determine the best options for sending signed requests, and can report back the latency for each provider and their location, contributing to form a network latency matrix for QRY. This approach ensures that clients can efficiently access the data and services they need from the most suitable providers within the QRY ecosystem.
Gateways interact with the QRY Engine smart contracts on the blockchain to authorize usage by validating client signatures and subscription status before fulfilling any request. They also periodically submit usage information to the blockchain to maintain accurate records and facilitate dispute resolution if needed.
After a query is successfully fulfilled, users can rate the Providers, ensuring a feedback loop that promotes the best-performing Providers. In case of any discrepancies in usage, users can raise disputes, which are then settled by the consensus group, ensuring fairness and transparency in the resolution process.
Furthermore, Integrators will be encouraged to create free tiers of service. These free tier subscriptions are tracked similarly to paid subscriptions, enabling wider access to the platform while maintaining usage records. To prevent spamming and abuse, Providers are advised to allow free tier access only for subscriptions created by trusted Portals, which have more control over user validation.