Modefi
  • Introduction
  • Oracle Solutions Suite
    • Decentralized Aggregated Oracle
    • On-Demand Oracle
      • On-Demand Oracle - Technical Manual v0.1
        • The On-Demand Oracle System
        • Types of Users
          • Data Request Creators
            • Requesting Data
            • Setting Times
            • Cancelling Data Requests
            • Disputing Results
          • Validators
            • Account Management
            • Staking (and Unstaking)
            • Providing/Endorsing Data
            • Disputing Results
            • Receiving Payment
          • ODO Custodian
        • Algorithms
          • Computing Request Costs
          • Depositing and Withdrawing Coins
          • Staking to Endorse Data
          • User and Staking Slot Tiers
          • Timing/Lateness
          • Bumping
          • Withdrawing
          • Endorsing
          • Payment
          • Slashing
          • Reputation
          • Staking Bonuses
          • Disputes and Resolutions
          • Coin Credits
          • Account Transfer
      • On-Demand Oracle - High-Level Overview
    • Oracle Marketplace
  • Defi Dashboard
    • What is the Modefi DeFi Dashboard?
  • Token
    • Tokenomics
      • Token Distribution
      • Token Stats
      • Token Emission Schedule
    • Token Sale
    • Token Utility
  • General Information
    • History of Oracle Based Hacks / Exploits
      • Synthetix $1 Billion Exploit
      • Trader Exploits bZx Oracle for $330,000 Profit
      • $100 M Liquidated on Compound Following Oracle Exploit
  • Blockchain Basics
    • What is a Smart Contract?
    • What is an Oracle?
  • FAQ
    • Staking on Fantom
    • Staking on Binance Smart Chain
  • How-to's
  • Smart Contract Addresses
  • Links and Socials
  • Media Kit
  • Disclaimer
  • Terms and Conditions
  • Privacy Policy
Powered by GitBook
On this page
  • 1. Cancel One Or More Named Datasets (DataStoreCommon)
  • 2. Cancel Entire Batch (DataStoreCommon)
  1. Oracle Solutions Suite
  2. On-Demand Oracle
  3. On-Demand Oracle - Technical Manual v0.1
  4. Types of Users
  5. Data Request Creators

Cancelling Data Requests

When things inevitably go wrong or someone makes a mistake, the creator can cancel data they’ve requested. Data is cancelable up until a user provides the data, so even if a user is staked already, the dataset can still be cancelled. The reasoning is the same as in the case of changing a dataset time with a staked user. There are two operations for data cancellation: cancelling a single dataset and cancelling an entire request batch.

Additionally, a concept of staleness exists for datasets. If a user provides data, but for some reason no one else endorses any data for a very long time, then the dataset becomes stale and is eligible for cancellation.

1. Cancel One Or More Named Datasets (DataStoreCommon)

function cancel_datasets(
    address delegator_address,
    string[] calldata datasets_to_cancel) external;

A conceptually straightforward feature with a slight quirk. By specifying a list of datasets to cancel the creator can receive a refund of the coins they deposited for paying users. The quirk of this function is that there is an optimal ordering for the datasets in the case where the datasets have custom times. This is generally invisible to users, but anyone calling to cancel datasets directly (e.g., bypassing the front end using Remix, the command line, or another front end) should pass the datasets ordered from the latest to the earliest custom time.

2. Cancel Entire Batch (DataStoreCommon)

function cancel_request_batch(address delegator_address) external;

The other way to cancel datasets is by cancelling an entire batch. This will cancel any datasets that are cancellable when the transaction is being mined. This is a function that optimizes the cancellation by skipping expensive writes to storage that only update data that will never be accessed again, so it is preferable over calling to cancel individual datasets when appropriate to do so (such as the final remaining dataset(s) of a request batch).

PreviousSetting TimesNextDisputing Results

Last updated 1 year ago