DigiDollar Whitepaper: A Fully Decentralized USD Stablecoin on The DigiByte Blockchain #319
Replies: 7 comments 5 replies
-
What are some ways we can leverage / utilize DigiDollars if our goal is to hold the same DigiDollars for the full lock up period? Staking, trading of other cryptocurrencies or Digibyte, collateralize loans, etc.. |
Beta Was this translation helpful? Give feedback.
-
Will I be able to mint DigiDollar if my DigiByte are stored on a Ledger hardware wallet? This was a question asked by @Chiller1001 on X Should we expect ledger DigiDollar support for minting as well as sending and receiving? |
Beta Was this translation helpful? Give feedback.
-
DigiDollars could actually used somewhat as a trust fund for your kids to bypass volatility for however many years you decide your lock up period will be for. This way your kids will have future #Digibyte I’m sure there will need to be some extra software or UI/UX Maybe AI how could this be implemented |
Beta Was this translation helpful? Give feedback.
-
Looks like one of the key ingredients here is that an exchange or exchanges would need to list DigiDollars. Without this, how would you be able to generate more DigiDollars to satisfy the initial lock of up DGB? |
Beta Was this translation helpful? Give feedback.
-
Wow—what an incredible whitepaper! Reading through the DigiDollar proposal absolutely made my day. Thank you for sharing and working on this. There’s so much possibility here to unlock, and this whitepaper serves as an outstanding blueprint to get us started. From its technical foundations to its vision for a fully decentralized USD stablecoin on DigiByte, the potential impact is enormous. Naturally, this raises a ton of important questions—about governance, stability mechanisms, real-world adoption, and more. I encourage everyone to dig in, think deeply, and ask hard questions. Let’s leverage our collective expertise, challenge assumptions, and iterate together until we’ve ironed out every detail. I truly believe DigiDollar could be the killer-use-case for DigiByte, transforming the protocol’s future and driving real, positive change for humanity. Let’s collaborate, innovate, and bring this vision to life! |
Beta Was this translation helpful? Give feedback.
-
Subject: DigiDollar Opportunity and UTXO Alliance Updates Dear @SogobiNapiasi, I would like to share some information that could positively impact the development of the “DigiDollar: A Fully Decentralized USD Stablecoin on the DigiByte Blockchain.” I’m Jose, a volunteer for the DigiByte community and a member of the UTXO Alliance. The UTXO Alliance is a consortium of blockchains, blockchain projects, and research groups. In February, we received an exciting news alert from Ignacio, a UTXO Alliance member, about the formation of the Stability Problem Committee and a call for papers on stability mechanisms, CBDCs, AMMs, stablecoins, and related topics. Here’s a link to Ignacio’s comment on the Workshop Alert.
Additionally, Stability Nexus on X commented on a post, asking if you plan to submit the DigiDollar white paper to the Stability Workshop. I invited them to join this discussion. I see significant potential in collaborating and networking through these working groups and workshops, and I hope you’re interested. Thank you for sharing the DigiDollar white paper. I wanted to make you aware of these opportunities and hope to see the DigiDollar project come to fruition. Sincerely, |
Beta Was this translation helpful? Give feedback.
-
Many of you have have DigiDollar questions that can be answered with this Technical Implementation Specification document found in a new discussion thread here: https://github.com/orgs/DigiByte-Core/discussions/324 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
DigiDollar: A Fully Decentralized USD Stablecoin on The DigiByte Blockchain
By Sogobi Napiasi
1. Abstract
DigiDollar is proposed as the first fully decentralized stablecoin native to the DigiByte blockchain. It enables users to lock DigiByte (DGB) coins as collateral and mint a token pegged to the US Dollar (USD) at a 1:1 value. The system operates completely on-chain without any centralized issuer, using time-locked DGB outputs and decentralized price oracles to maintain the peg. DigiDollar’s design ensures that each stablecoin is backed by DGB reserves and can be redeemed in a non-custodial manner at any time for $1 worth of DGB. This whitepaper details the technical architecture, consensus changes, oracle mechanism, and implementation steps required to integrate DigiDollar into DigiByte Core v8.22.0. It covers how DigiDollar maintains its USD parity through real-time pricing and on-chain enforcement, how users interact via core wallet and RPC, and how security issues (like oracle manipulation or spam attacks) are mitigated. By introducing a USD-pegged asset into the DigiByte ecosystem, DigiDollar aims to combine the stability of fiat currency with DigiByte’s speed and security, enhancing DigiByte’s utility for everyday transactions and decentralized finance.
2. Introduction
Background – DigiByte as a UTXO Blockchain:
DigiByte (DGB) is a UTXO-based public blockchain launched in 2014, derived from the Bitcoin protocol. Over years of development, DigiByte has implemented numerous upgrades from Bitcoin’s codebase, and as of version 8.22.0 it incorporates changes up through Bitcoin Core v22.
DigiByte is known for its high throughput and decentralization: it uses five mining algorithms for security and achieves 15-second block times (approximately 40× faster than Bitcoin).
This makes DigiByte one of the longest and fastest UTXO blockchains in production, well-suited to handle a high volume of transactions. DigiByte’s scripting system is based on Bitcoin’s, enabling features like multisig, time-locks, and SegWit, but it does not natively support complex smart contracts or stable-value tokens in its base layer.
Motivation – The Need for a Decentralized Stablecoin:
Cryptocurrency volatility is a major barrier for everyday use and financial applications. Stablecoins address this by pegging value to fiat (e.g. USD), but popular stablecoins like Tether (USDT) or USDC are centralized, requiring trust in custodians holding equivalent fiat reserves. Decentralized stablecoins, by contrast, maintain their peg through on-chain collateral and algorithms, removing the need for a single issuing authority. Projects like MakerDAO’s DAI on Ethereum have demonstrated the viability of collateral-backed decentralized stablecoins – DAI is maintained by smart contracts with no single entity in control, and is backed by crypto assets to hold a 1:1 peg to USD.
However, until now the DigiByte ecosystem has not had a native stablecoin due to the limited script capabilities of UTXO systems. Introducing a stablecoin on DigiByte can greatly enhance its utility: users and dApps (decentralized applications) could transact in a stable unit of account while still benefiting from DigiByte’s speed, low fees, and security. A decentralized stablecoin also aligns with DigiByte’s ethos of trustless decentralization – there is no central issuer that could censor transactions or fail to honor redemptions.
Overview of the DigiDollar Concept:
DigiDollar is a USD-pegged token fully implemented within DigiByte’s UTXO framework. The core idea is locking DGB as collateral to generate DigiDollars. A user who wants DigiDollars will send DGB into a special time-locked output that cannot be spent normally. In return, the protocol mints a corresponding amount of DigiDollar tokens (equal to the USD value of the locked DGB at that moment) to the user. The USD value is determined by a real-time oracle price feed for DGB/USD, sourced from multiple exchanges to ensure accuracy. Once issued, DigiDollars are freely transferable between DigiByte addresses, just like DGB, except they represent a stable USD value. When a user wants to redeem DigiDollars for the underlying DGB, they initiate a burn of their DigiDollar tokens, and the locked DGB collateral is released back to them (in proportion to the amount redeemed). This redemption is non-custodial – it does not require permission from any third party or centralized entity; the blockchain protocol itself enforces that presenting and burning DigiDollar tokens unlocks the corresponding DGB. Throughout this process, the peg is maintained by always valuing DGB collateral at the current market price and ensuring that the amount of DigiDollars in circulation never exceeds the collateral value (with a safety margin). The result is a trust-minimized stablecoin: users trust only the blockchain’s consensus rules and the distributed oracles, not a company or bank, to guarantee that each DigiDollar is backed and redeemable.
Advantages in the DigiByte Ecosystem:
DigiDollar brings several advantages:
Competing UTXO-based blockchains have begun exploring stablecoin protocols (e.g., Ergo’s SigmaUSD stablecoin which inspired Cardano’s Djed), demonstrating that it is possible to achieve a decentralized stable asset on a UTXO ledger. DigiDollar extends this innovation to DigiByte, leveraging its unique strengths (decentralization, speed) to create a stablecoin implementation that is efficient and secure at scale.
This whitepaper proceeds to detail the system architecture and components of DigiDollar (Section 3), the required consensus changes (Section 4), the decentralized oracle network (Section 5), and the specific transaction and script designs for minting, transferring, and redeeming DigiDollars (Section 6). We then describe user-facing integration in the core wallet GUI (Section 7) and new RPC calls for monitoring (Section 8). Transaction and fee considerations are discussed in Section 9, followed by a thorough analysis of security concerns (Section 10). Finally, Sections 11 and 12 outline potential future improvements (Taproot, Schnorr, etc.) and conclude with the impact on the DigiByte ecosystem and next implementation steps.
3. DigiDollar System Architecture
On-Chain Implementation within DigiByte:
DigiDollar is implemented directly on the DigiByte blockchain as an extension of its native transaction protocol. There is no separate sidechain or off-chain token ledger – the existence and state of DigiDollar tokens are embedded in DigiByte’s UTXO set and maintained by network consensus. Key components of the architecture include: the collateral UTXOs (time-locked DGB outputs that back DigiDollars), the DigiDollar token UTXOs (outputs that represent holdings of the stablecoin), and the oracle data that provides the exchange rate. The design philosophy is to reuse Bitcoin-compatible primitives (UTXO, scripts, transactions) and augment them with minimal new features necessary for stablecoin functionality. This ensures that DigiDollar leverages DigiByte’s proven infrastructure (mining, validation, networking) and remains lightweight.
Time-Locked DGB as Collateral:
Collateral for DigiDollar is provided by DGB coins that are locked in special outputs using script conditions. When a user locks DGB to mint DigiDollars, those DGB become unspendable for a certain duration or until certain conditions are met (specifically, until the corresponding DigiDollars are returned and burned). The primary mechanism used is Bitcoin’s time-lock functionality: e.g., an output script can use OP_CHECKLOCKTIMEVERIFY (CLTV) to prevent spending until a future block height or timestamp.
In DigiDollar’s context, each collateral output may include a timelock that enforces a minimum lock period (for example, 30 days) during which the collateral cannot be reclaimed by the original owner except via the stablecoin redemption process. Time-locking has two purposes here:
The lock duration might be user-selectable (e.g., 1 month, 3 months, 1 year) at the time of minting, and the system can track statistics by duration. Longer lock periods could be encouraged (as they provide longer stability) or required for higher minting ratios. The locked UTXOs still belong to the user (they control the private keys to spend it), but the script encumbrance means those coins are effectively escrowed for the benefit of DigiDollar holders until redemption conditions are fulfilled.
Real-Time Pricing via Decentralized Oracles:
A crucial component for maintaining the USD peg is obtaining the current USD value of DGB in real time. DigiDollar relies on a decentralized oracle system to feed the DGB/USD exchange rate into the blockchain. This is implemented by having a set of independent oracle nodes (which could be community-run or elected entities) that pull price data from external sources (e.g., major cryptocurrency exchanges trading DGB/USD or DGB/BTC and a reference BTC/USD). These oracle nodes digitally sign the price data (with their unique private keys), and the signatures are broadcast and included in DigiByte blocks (details in Section 5). The consensus protocol will use this price data to validate DigiDollar issuance and redemption transactions. By taking an aggregate of multiple sources (for example, a median of prices reported by 5 out of 7 trusted oracles), the system minimizes the risk of any single bad data point. The pricing information is updated frequently (potentially every block or at fixed intervals like every N blocks) so that the exchange rate used is as current as possible at the time of any DigiDollar transaction. Each full node maintains the latest valid price from oracle data embedded in the blockchain and uses it to check the value of new DigiDollar mints or redeems.
Core Wallet Integration & User Experience:
DigiDollar functionality will be integrated into the DigiByte Core wallet (v8.22.0 and above) so that users can easily access stablecoin features through a graphical interface. From the user’s perspective, the wallet will simply provide new options to “Mint DigiDollar” or “Redeem DigiDollar” alongside normal send/receive functions. Under the hood, the core wallet handles the specialized transaction construction and communicates with the blockchain to obtain oracle prices. The integration also means DigiDollar transactions propagate and confirm just like normal DGB transactions, and they are stored in the same blockchain ledger. To external observers (and older wallets), a DigiDollar transaction will appear as a transaction with some unfamiliar outputs (new script types or OP_RETURN metadata). Only updated clients will interpret those outputs as DigiDollar tokens. This approach ensures backward compatibility: nodes that have not upgraded will reject unknown transaction types (if not made backward-compatible), but the goal is to implement DigiDollar via a soft fork or as standard transactions so that non-upgraded nodes simply treat them as anyone-can-spend or benign data (more on this in Section 4). Overall, the system architecture strives to keep all DigiDollar logic on-chain and transparent, with the core nodes and wallets providing the necessary logic to enforce the peg and facilitate user interactions.
Summary:
In DigiDollar’s architecture, the DigiByte blockchain is the foundation providing security and record-keeping, script-locked collateral UTXOs ensure each DigiDollar is backed by DGB, oracle-fed price data provides the dynamic link to USD value, and the wallet/UI layer makes it accessible. The design does not introduce a new token standard or complex scripting language; instead, it extends DigiByte’s existing UTXO model with a few new consensus rules and scripts tailored to stablecoin operations. In doing so, DigiDollar retains the decentralization (miners validate stablecoin transactions just like any other), speed (15-second blocks for fast settlement), and security (tens of thousands of nodes verifying transactions) of the DigiByte network, while adding a stablecoin capability that operates seamlessly within this environment.
4. DigiByte Consensus and Protocol Changes
Implementing DigiDollar requires changes to DigiByte’s consensus rules and transaction processing. These changes ensure that the creation and redemption of the stablecoin are validated by every node, preventing improper issuance or double spending of collateral. We outline the necessary modifications, including introducing new transaction types or script opcodes, handling locked UTXOs in consensus, and extending the script interpreter for DigiDollar-specific logic.
New Transaction Types for Minting and Burning:
DigiDollar introduces two new logical transaction types: Mint transactions and Redeem transactions (and by extension, standard Transfer transactions for the stablecoin). While on a technical level these might not be distinct versioned transaction formats, the network will treat transactions that involve DigiDollar outputs in specific ways. A Mint transaction is one where a user provides DGB as input and outputs a corresponding DigiDollar token. It typically has (a) one or more DGB funding inputs from the user, (b) one output that locks the provided DGB as collateral (time-locked and script-encumbered), (c) one output that is a DigiDollar token assigned to the user’s address representing the newly minted stablecoins, and (d) possibly a small DGB change output or fee output. A Redeem transaction does the reverse: (a) it takes one or more DigiDollar token inputs (the user’s stablecoin holdings being spent/burned), (b) it takes the corresponding locked DGB collateral input, and (c) it outputs DGB back to the redeemer (and if applicable, a residual locked collateral output if not all collateral is released). In both cases, the transaction must obey specific rules: the amount of DigiDollars minted or burned must be consistent with the DGB collateral and the current price. While the base transaction format (inputs, outputs) remains the same as Bitcoin/DigiByte, these transactions carry additional semantic meaning and need special validation. To facilitate recognition, we may use unused bits in the transaction version or a marker in the outputs. For example, we could designate a new transaction version number (e.g., nVersion=0x0D1G as a flag for DigiDollar transactions) that indicates to nodes that this transaction includes stablecoin logic. Alternatively, the presence of a special script opcode or an identifying pattern in an output (like a specific OP_RETURN tag or OP_DIGIDOLLAR opcode) can serve to classify the transaction type. These identifiers ensure older software (not DigiDollar-aware) will not accept such transactions as valid (if the rules are a soft fork) and allow upgraded nodes to apply new consensus checks to them.
DGB-Specific Opcodes vs. OP_RETURN Metadata:
We consider two approaches to implementing the stablecoin operations in the scripting system: introducing a new DigiByte-specific opcode (such as OP_DIGIDOLLAR) or leveraging the existing OP_RETURN opcode for carrying metadata.
New Opcode Approach:
In this approach, we add one or more opcodes to the DigiByte script language that directly handle stablecoin logic. For instance, OP_DIGIDOLLAR could be an opcode used in the output script of a DigiDollar UTXO to mark it as a stablecoin token and possibly encode the amount. The script interpreter would be modified to understand this opcode: when validating transactions, encountering OP_DIGIDOLLAR could trigger special behaviour (like verifying that the total DigiDollar outputs equal the allowed amount given the inputs). We might also add an opcode like OP_CHECKORACLESIG or OP_CHECKPRICE to allow scripts to verify the included oracle price data against a known public key (though this could also be handled outside the script by consensus). The new opcode approach has the advantage of consensus-level enforcement using the existing validation framework – the rules for minting/burning can be embedded in script execution, making them tamper-proof. This approach is more elegant and secure, but requires a soft fork or hard fork to introduce the opcodes. If we repurpose existing disabled opcodes (e.g., use an OP_NOPx slot) and activate it as OP_DIGIDOLLAR with new meaning, it can be done as a soft fork (similar to how OP_NOP2 was repurposed for OP_CHECKLOCKTIMEVERIFY via BIP65). Every node would need to upgrade to enforce the new rules, but older nodes would see these scripts as anyone-can-spend (if using NOP originally) and thus not violate old rules.
OP_RETURN Metadata Approach:
Alternatively, we could implement DigiDollar using OP_RETURN outputs to carry token metadata, akin to how the Omni Layer and other protocols issue tokens on Bitcoin by embedding data. For example, a DigiDollar Mint transaction could include an OP_RETURN output that contains an identifier (like a tag “DigiDollar”) and the amount of stablecoin issued. The collateral output might be a standard P2SH or P2PKH that is locked by script, and the OP_RETURN would tie the stablecoin amount to that transaction. Transfer of DigiDollars would similarly be done by OP_RETURN outputs indicating a token transfer from one address to another. This approach has the benefit of simplicity – it doesn’t require changing the script interpreter since OP_RETURN data is ignored by script and simply stored in the blockchain for external interpretation. However, to achieve consensus enforcement, relying purely on OP_RETURN would fall short: the network by default does not validate the meaning of OP_RETURN data (e.g., anyone could craft an OP_RETURN claiming an issuance without collateral, and vanilla nodes would still consider the transaction valid as long as it met basic rules). We would need to implement additional consensus checks at the mempool or block validation level to interpret the OP_RETURN and enforce the stablecoin rules (effectively baking the DigiDollar protocol into the node software). In essence, the node would need to parse the OP_RETURN in each transaction, and if it matches the DigiDollar format, perform the necessary validations (collateral amount, price, etc.). This is a heavier and somewhat more ad-hoc approach, as it separates the logic from the script execution path.
Comparison and Chosen Approach:
We lean towards the new opcode approach (OP_DIGIDOLLAR) for DigiDollar due to the stronger security and cleaner integration. Embedding logic in the script ensures that all checks happen during the normal script validation pass, and invalid transactions (e.g., minting more stablecoins than allowed by collateral) can be rejected precisely at script evaluation with a clear failure condition. It also means that the rules governing DigiDollar are fully transparent in the script itself, which can be audited and reasoned about. The OP_RETURN approach, while used by protocols like Omni, essentially treats the base blockchain as a dumb carrier of data and relies on overlay logic – this introduces the risk of consensus divergence (if not all nodes apply the logic consistently) and complicates the implementation. Additionally, OP_RETURN outputs are unspendable and thus do not naturally support transfers – Omni solved that by making balances managed off-chain by wallet software reading OP_RETURNs, but in DigiDollar we want the tokens to be real UTXOs that are part of the state, not just logs. Therefore, we propose introducing new DigiByte opcodes for stablecoin support. Specifically, OP_DIGIDOLLAR will be used in DigiDollar token outputs (marking an output as representing a certain amount of DigiDollar), and possibly companion opcodes or script patterns for the collateral outputs as well. We will detail example scripts in Section 6.
Handling of Locked UTXOs and Consensus Enforcement:
Once DGB are locked as collateral, the consensus rules must strictly ensure those UTXOs cannot be spent arbitrarily. In practice, this means a collateral output’s script will make it unspendable by normal means – it might require a combination of conditions such as a specific signature and the presence of a DigiDollar burn proof. The network will enforce that for the life of that UTXO (until it’s unlocked via redemption), no transaction can appear that spends it unless it meets the exact script conditions. This is largely achieved by the script itself (if someone tries to spend the output without burning stablecoins, the script evaluation will fail and miners/nodes will reject it). In addition, we may have consensus-level tracking of outstanding stablecoin. Each mint transaction increases total DigiDollar supply and “binds” a certain DGB collateral to that supply. We can conceptualize that the system keeps a mapping of Collateral ID -> Stablecoin amount. In a simple implementation, the Collateral ID could be the outpoint (txid:vout) of the locked DGB UTXO. When a redeem occurs, it references that outpoint and includes stablecoin inputs that sum up to the required amount; the node validates that those stablecoins correspond to the same ID and then allows the outpoint to be spent. This could be done by encoding the Collateral ID within the DigiDollar token output script itself (so that any spend of the token carries that reference). An alternative (more fungible) design is to treat all DigiDollars as a single fungible currency not tied to specific collateral – in that case, we would treat the entire pool of locked DGB as backing the entire supply of DigiDollars. However, that approach either requires global tracking (which complicates partial redemptions and could allow arbitrage on specific collateral as discussed in Section 6 security) or introduces liquidation mechanics. For simplicity and predictability, each DigiDollar issuance is linked to specific collateral at the time of mint. Consensus enforcement then ensures that the same collateral cannot be used to back two different sets of stablecoins (no double minting), and that stablecoins cannot be redeemed for collateral other than their own (unless we later allow some form of pooled collateral with global redeemability).
Script Interpreter Changes for DigiDollar:
To implement the new opcodes and verification rules, the DigiByte script interpreter (in the core code, e.g. EvalScript in DigiByte Core) will be extended. For instance, defining OP_DIGIDOLLAR in script.h and implementing its logic in opcode.cpp (or equivalent) would be necessary. The OP_DIGIDOLLAR when executed could do the following: consume certain items from the stack (for example, it might expect the stablecoin amount and an oracle signature or price value to be on the stack), perform validation, and push a boolean result or require a subsequent OP_VERIFY. One possible implementation is that OP_DIGIDOLLAR is only used in the locking script of collateral outputs as a sort of assertion opcode that ensures redemption conditions. For example, the collateral output’s script could be:
Here, OP_DIGIDOLLAR could verify that if this output is spent, the spending transaction has burned stable_amount of DigiDollars at a price at least [oracle_price] (to safeguard value). Another usage is in the token output’s script, which could simply indicate this output represents X stablecoins and restrict who can spend it (owner’s public key). For instance:
In this hypothetical script, OP_DIGIDOLLAR
<amount>
might signal to the interpreter that this output is a stablecoin UTXO of “amount” units, and perhaps the interpreter records that amount in validation state. The actual enforcement might then be: when this output is later spent, the interpreter ensures the same amount is either transferred to other outputs with OP_DIGIDOLLAR or, if not, then it must be redeemed (meaning the output is consumed without outputting new stable tokens, effectively a burn). This would enforce a conservation of stablecoin principle: except when burning, the total DigiDollar amount in outputs must equal the total in inputs (similar to how DGB must balance, except DGB can also be paid as fee whereas stablecoin might not be allowed as fee).To summarize the interpreter changes:
These changes will be implemented as a network upgrade (soft fork) activated by supermajority of miners (similar to previous DigiByte upgrades). Non-upgraded nodes would reject transactions with unknown opcodes (if we use an OP_NOP slot, old nodes may think it’s NOP which always true and might accept weird transactions – hence careful fork logic is needed so old nodes don’t erroneously accept something invalid under new rules). The deployment would likely follow a BIP9-style signaling period, ensuring a smooth activation once the majority has upgraded.
In conclusion, DigiDollar requires careful but achievable consensus changes: defining new script semantics and transaction verification logic to handle the minting, transferring, and burning of a USD-pegged token. By adopting a strategy of minimal but sufficient modifications (favoring built-in script opcodes and consensus checks over external systems), we maintain DigiByte’s robustness while adding this significant new functionality.
5. Decentralized Price Oracle System
A reliable and tamper-resistant oracle mechanism is the linchpin that connects DigiDollar to the real-world USD value of DGB. Here we describe the design of the decentralized oracle system: how price data is gathered and aggregated, how it is injected into the blockchain and verified, and measures to secure it against manipulation or failure.
Aggregation of USD/DGB Price Data:
DigiDollar’s oracles pull the price of DGB in USD from multiple sources to ensure accuracy and robustness. The sources can include major exchanges (for example: Binance, KuCoin, Bittrex, etc., as well as aggregate price feeds like CoinGecko or CoinMarketCap). To avoid reliance on any single exchange (which might have API issues or an outlier price), the oracle nodes will retrieve prices from a set of (say) 5-10 exchanges. Each oracle node then computes a consolidated price – commonly the median of the collected exchange prices is used to reduce the effect of outliers or temporarily erroneous data. By using a median or trimmed mean, we ensure that even if one source reports an off price (due to low liquidity or error), it will not significantly skew the reported value. For instance, if 7 exchanges are queried and their DGB/USD rates are [0.105, 0.106, 0.108, 0.500, 0.107, 0.104, 0.106] USD, the oracle would sort these and perhaps take a median (0.106 USD in this hypothetical), ignoring the aberrant 0.500 value. Additionally, to get USD pricing indirectly, the oracle could use a BTC reference: fetch DGB/BTC from exchanges and multiply by BTC/USD from a reliable source if needed (though direct DGB/USD is preferable for simplicity). The aggregated price is then signed by the oracle and broadcast. We assume oracles update this price at a regular interval—potentially every block or every few blocks. A reasonable design is to have oracles update their price data every N seconds (e.g., 60 seconds) and whenever a new block is found, the miner can include the latest oracle reports.
Inclusion of Price Data in Blocks:
To make the oracle data available to scripts and consensus, each block of the DigiByte blockchain will contain a price record for DigiDollar. We propose a scheme where multiple oracle signatures are included in each block header or coinbase transaction. One approach is to utilize the coinbase transaction’s coinbase data field (which miners already use to include extra nonce and messages) to embed a small data structure containing the price and oracle attestations. For example, the coinbase’s scriptSig could contain a tag (like 0xD1G1 to indicate DigiDollar oracle data follows), then the price in a standardized format (e.g., a 4-byte or 8-byte integer representing price in micro-USD per DGB), followed by a set of Schnorr/ECDSA signatures from approved oracle public keys. The block validation logic will be extended to detect and parse this. Another approach is to dedicate an auxiliary block header field for the price (some blockchains extend the header or use OP_RETURN in coinbase output). Since DigiByte is derived from Bitcoin, directly extending the 80-byte block header is non-trivial without a hard fork; a simpler method is to use the coinbase transaction’s output: we could require that the coinbase TX has an OP_RETURN output that contains an “oracle bundle” – a piece of data encoding the price and signatures. This OP_RETURN would be unspendable and just carry info. During block validation, nodes will look for this output, decode the price and verify the signatures (outside of the normal script system, since OP_RETURN has no script execution effect).
Verification of Oracle Signatures in Block Headers:
Only data signed by trusted oracle keys should be accepted. At the genesis of DigiDollar (the activation point), the network or community will designate a set of oracle public keys that are allowed to feed prices. This could be a fixed set or modifiable via governance (e.g., a DigiByte Improvement Proposal to add/remove oracles). For each block, the validation rules might require at least M out of N valid oracle signatures on a price value for it to be considered the official price. For example, if there are 7 oracle providers, the rule might be that at least 5 signatures must be present on the same price value. The block would include those 5 (or more) signatures. Full nodes, upon receiving a new block, will extract the price and the signatures, then check each signature against the stored list of oracle pubkeys (using standard ECC signature verification). Only if the threshold condition is met and all signatures are valid and correspond to the claimed price will the block’s price be considered valid. This process is somewhat analogous to multi-signature consensus on a data feed. If a block is found without the required oracle data or with invalid signatures, nodes would reject it as it violates consensus (similar to how a block without the required difficulty or wrong coinbase is invalid). We assume miners will not mine a block without including the oracle data, because it would be futile (other nodes wouldn’t accept it). Miners themselves will typically not generate the price data – they will rely on the oracle nodes. A prudent design is for oracle nodes to broadcast their signed price messages to miners and the network; miners simply gather the latest signatures and insert them into their candidate block. This creates a weak dependency of miners on oracles: a miner needs a recent price update to construct a valid block. If oracles are slow or offline, it could delay block acceptance, which we discuss next.
Handling Missing or Stale Price Data:
It’s critical that the blockchain doesn’t grind to a halt if oracle data is briefly unavailable. We design a grace period or fallback. For instance, the consensus rules could allow the reuse of the last known valid price for a certain number of blocks if fresh signatures are not available. Concretely, suppose oracles are expected to update every block, but if in block B the miner cannot get new signatures in time, they might reuse the oracle data from block B-1 (just copy the same price and signatures). Nodes would accept it as long as it’s within an allowed window (maybe up to X consecutive blocks can carry the same oracle info). However, to avoid abuse of this (e.g., if price is changing rapidly, a miner shouldn’t keep using an outdated price to allow over- or under-collateralized actions), the protocol might restrict minting or risky transactions when price data is stale. Another fallback strategy is to have a secondary tier of data: for example, if the primary oracles fail, a default or “emergency” price feed from a backup source could be used. But that introduces complexity and trust issues. A simpler method is: if no oracle signatures are present in a block, then that block cannot include any DigiDollar mint or redeem transactions (it could still include normal DGB transfers). In other words, stablecoin-affecting transactions require a fresh price. A block without price data could still be mined (to not halt the chain), but it would effectively pause the stablecoin functionality until oracles resume. We expect oracles to be highly available, but network partitions or downtime are planned for with this design. Additionally, oracles themselves can use redundant infrastructure (multiple servers, fallback exchange APIs) to minimize failures.
Prevention of Price Manipulation and Sybil Attacks:
The decentralized oracle system is engineered to resist manipulation by any single actor. By drawing from multiple exchanges and requiring multiple independent signatures, no single oracle can unilaterally push a false price without collusion. To become an oracle, one must be recognized by the community (likely through an on-chain governance or multi-party agreement), making it hard for a malicious actor to insert sybil or fake oracles. The use of medians means that even if one exchange’s data is compromised or if one oracle tries to post an outlandish price, the others will override it. To further secure the feed, the oracle identities might be required to stake DGB or otherwise have skin in the game (though implementing a full staking slashable system on DigiByte may be outside the initial scope, it could be a future improvement). Additionally, there can be sanity checks on the price transitions: for instance, if the reported price deviates by more than, say, 20% from the previous block’s price, nodes could flag it and require extra signatures or a waiting period. This would prevent sudden swings caused by error (but if an actual market crash of >20% happens, we might not want to block it—so this is a tunable parameter).
From a security standpoint, one scenario to consider is a miner-oracle collusion: what if a majority of miners and a majority of oracles collude to manipulate the price feed and exploit DigiDollar? This would be a complex and risky endeavor, as they would essentially attack their own blockchain’s credibility. For example, if they artificially lower the price feed, they could redeem stablecoins for more DGB than they should (draining collateral), but such an event would be evident on-chain and would destroy trust in the stablecoin (and thus DGB’s value likely). Nevertheless, the multi-oracle design makes it so that an attacker would need control of several independent organizations to significantly skew the price, which is much more difficult than a single point of failure. Regular audits and possibly public reputation of oracle providers will add social trust on top of the technical safeguards.
In summary, the decentralized oracle system for DigiDollar works as follows:
The design uses redundancy and consensus to prevent manipulation, ensuring the stablecoin’s peg reflects a true market-driven DGB/USD rate.
This robust oracle mechanism is what enables DigiDollar to be fully decentralized; the blockchain itself “knows” the exchange rate and can autonomously enforce the value equivalence between DGB and the DigiDollar token.
6. DigiDollar Implementation Details
This section provides a detailed walkthrough of how DigiDollar is implemented in practice, including the exact mechanisms of locking DGB, minting DigiDollars, transferring them, and redeeming them back to DGB. We also illustrate sample transaction structures and script snippets to clarify the design.
Locking Mechanism for Collateral
When a user decides to mint DigiDollars, they must lock a certain amount of DGB as collateral. The core wallet will guide the user through this process:
Inputs: The user’s provided DGB inputs totaling at least the required collateral + fees. These could be UTXOs from the user’s wallet (just like funding a normal transaction).
Collateral Output: An output that locks the provided DGB amount. This output’s script is the key to the whole system. It will contain the conditions under which the DGB can be unlocked. A possible script template (using pseudocode for clarity) might be:
Let’s break this down:
<LockDurationHeight> OP_CHECKLOCKTIMEVERIFY OP_DROP
ensures that until a certain block height (current height + lock period), this script cannot be fulfilled by the owner alone. It basically enforces the time-lock. The OP_DROP removes the time value from stack after verification so it doesn’t interfere with subsequent ops.<CollateralKey> OP_CHECKSIGVERIFY
could be the public key of the original user (or a multi-sig of participants if needed). This means that to spend this output, the user’s signature is required (they remain the owner of the collateral). We include this so that both the stablecoin redemption and any eventual fallback require the user’s consent. (We might also design it so that redemption by others doesn’t require this – if we want any holder to redeem, we might omit this check or replace it with stablecoin proof; see discussion below).<StablecoinAmount> <OraclePrice> OP_DIGIDOLLARVERIFY
is a hypothetical opcode sequence that ensures the stablecoin conditions are met. We imagine OP_DIGIDOLLARVERIFY as an opcode that will only succeed if the spending transaction of this output is burning at least<StablecoinAmount>
of DigiDollar tokens given the<OraclePrice>
. Essentially, it checks that the output is being unlocked in tandem with the appropriate stablecoin burn.In summary, this script makes the output spendable only if (a) the time lock has expired or the user consents (depending on implementation), and (b) the required stablecoins are provided for redemption. We might refine this script later with Taproot (Section 11) to have multiple spend paths (one for normal redemption by anyone with tokens, one for owner reclaim after time).
DigiDollar Output: Another output represents the newly minted DigiDollar tokens delivered to the user. Since DigiDollar is not a built-in currency, we represent it via script. For instance, this could be a colored coin UTXO that carries the stablecoin value. An example script could be:
Here,
<UserStablecoinAddr>
might be a public key hash or script that locks the stablecoin to the user’s control (similar to how a normal output locks DGB to an address).OP_DIGIDOLLAR <Amount>
indicates that this UTXO is a DigiDollar token of a certain amount. We might not literally have an OP_TOKEN opcode, but conceptually, this script is marked as a token rather than a normal coin. In practice, we might implement DigiDollar outputs as anyone-can-spend from the base layer’s perspective but with metadata. If using a new opcode, perhaps:such that the presence of OP_DIGIDOLLAR triggers consensus to treat this output’s value field differently (maybe the DGB value is zero or dust). A simpler approach is to use an OP_RETURN output to represent the issuance and simultaneously credit the user’s wallet with the balance. But to keep it UTXO-based, let’s assume stablecoin outputs are actual UTXOs with special script. In any case, the output effectively says “X DigiDollars belonging to user Y”. The user’s wallet will recognize it and treat it as a balance of stablecoins.
Change Output (optional): If the user provided more DGB than needed (to cover fees or due to UTXO denominations), any leftover DGB is returned as a normal change output to the user’s wallet.
Fee: A small DGB fee is attached like a normal transaction to incentivize miners to include it. This fee must be in DGB; stablecoin cannot pay miner fees.
Consensus Validation of Mint Transaction:
When this transaction is broadcast and a miner attempts to include it, each validating node checks:
If all checks pass, the transaction is valid and can be mined. After confirmation, the DigiDollar is officially in circulation.
Minting Example:
To illustrate with numbers, assume no over-collateral for simplicity: Alice locks 1000 DGB when price is $0.10, to mint 100 DigiDollar (DD). The Mint transaction might look like:
H=height+43200 OP_CLTV OP_DROP AlicePubKey OP_CHECKSIGVERIFY 100 OP_DIGIDOLLARVERIFY
. (This locks 1000 DGB until ~30 days (assuming 43200 blocks at 15s each) and requires 100 DD to redeem).OP_DIGIDOLLAR 100 OP_DROP <AlicePubKeyHash> OP_CHECKSIG
. (This is a token output indicating Alice has 100 DD; her signature is required to spend it, meaning she “owns” these tokens).Alice’s wallet now shows 100 DigiDollar balance and 4.9 DGB change. The 1000 DGB is no longer spendable by normal means; it’s locked under the stablecoin contract.
DigiDollar Transfer (Sending and Receiving)
Once DigiDollars are minted, they can be sent to others just like a cryptocurrency:
After signing (Alice signs the DGB input with her key and the stablecoin input with her stablecoin key which is the same as her DGB key if we used pubkey hash, or anyway she has the key), she broadcasts the TX.
Nodes validate that the stablecoin input (100) equals the outputs (50+50) stablecoin (no loss or gain), and that the DGB in equals DGB out + fee. They also validate the scripts: Alice’s stablecoin input had OP_DIGIDOLLAR script which is now being consumed – likely the interpreter sees that and requires that outputs properly carry forward the token. This could be enforced by requiring the sum of OP_DIGIDOLLAR
<amt>
in outputs equals the input<amt>
for stablecoin. If valid, the TX is mined.Bob’s wallet, upon seeing the confirmed TX, now recognizes he has an output with 50 DigiD. It will show 50 DigiDollar in his balance.
This transfer is “free” in the sense that neither Alice nor Bob paid anything except the minor DGB network fee. There’s no stability fee or other charge by the protocol for normal sends.
User Warnings for External Transfers:
If Bob were using an outdated wallet or an exchange that doesn’t support DigiDollar, sending these tokens could result in loss (since an unaware wallet might ignore or accidentally burn the OP_DIGIDOLLAR output). Therefore, the core wallet will include warnings/pop-ups if the user attempts to send DigiDollars to an address that is not recognized as supporting stablecoin. This could be heuristically determined (perhaps DigiDollar addresses have a distinguishable format or prefix if using a new version of address encoding). Ideally, Bob should also use a DigiByte wallet updated for DigiDollar. The UI will emphasize safe usage, and perhaps maintain a whitelist of known services supporting DigiDollar.
Redemption Process (Burning DigiDollars to Unlock DGB)
Redeeming is the reverse of minting: a user destroys a certain amount of DigiDollar and gets the equivalent value in DGB from the locked collateral. Let’s say Bob now wants to redeem his 50 DigiD for DGB:
Bob’s wallet constructs a Redeem transaction:
Inputs:
Outputs:
Note: Bob could also redeem the full 100 if he had them, which would release all collateral and remove that UTXO entirely.
Validation:
Nodes validate this redemption carefully:
Provided all these conditions hold, the transaction is valid.
After Redemption: Bob receives his 500 DGB (which he can now spend freely), and the DigiDollar supply decreases by 50 (from 100 to 50). Alice’s position now backs only 50 DigiD with 500 DGB collateral. If Alice wanted to, she could redeem the remaining 50 DigiD (if she holds them) or someone else holding them can, or she might need to top-up if price changes, etc.
It’s evident that the redemption logic is the most complex part of the design due to handling partial redemptions and ensuring fairness. In a simpler model, we might enforce that only the original minter can redeem, but that breaks the “non-custodial” aspect for others. Alternatively, we could require full collateral lots to be redeemed in one go – meaning stablecoins from one issuance can’t be partially redeemed by multiple parties easily. However, that reduces liquidity (one might have to gather all tokens from that issuance to redeem, which is like an ERC20 with unique lots).
For the scope of this whitepaper, we assume the script/consensus is capable of handling proportional redemption to fulfill the non-custodial promise: any holder of DigiDollar can trustlessly convert their tokens back to DGB at the current market rate. This might be achieved by a design where collateral is pooled or at least any stablecoin can trigger a collateral release (with perhaps the original owner’s signature not required on that code path).
Transaction Structure Summary:
Below is a sample script illustrating a possible collateral output script, highlighting how the redemption might be enforced (pseudo-code for concept):
In practice, it’s likely cleaner with Taproot to have separate spending paths (one that requires stable burn, one that requires time lock + owner sig). Above script is a conceptual mix in legacy style. The actual implementation may lean on direct consensus checks rather than script opcodes for verifying stablecoin burns and oracle data, because Bitcoin script isn’t currently capable of such global checks without new opcodes.
Despite the complexity, the net effect is straightforward for users:
To mint: Lock DGB and get stablecoins.
To send: Use stablecoins like normal coins (with the wallet hiding the technical details).
To redeem: Send stablecoins back to a redemption address (possibly an integrated function in wallet), receive DGB at market rate.
Throughout these processes, the data structures and function names in code would be extended. For example, we might have new functions in DigiByte Core such as CreateStablecoinMintTx(amount, duration) in the wallet API, and validation functions like CheckStablecoinTx(const CTransaction& tx, CValidationState& state) that encapsulate the consensus checks. The RPCs described in Section 8 will allow developers to query the state (total supply, collateral, etc.) to verify that the system is sound at any point.
7. DigiByte Core GUI Enhancements
To make DigiDollar accessible to everyday users, the DigiByte Core wallet GUI will be enhanced with dedicated interfaces for the stablecoin. The goal is to seamlessly integrate DigiDollar management without requiring users to manually craft transactions or understand script details. Below are the planned GUI components:
DigiDollar Dashboard:
A new section in the wallet (likely a tab or panel) will provide an overview of the user’s DigiDollar balance and collateral positions. This dashboard will display:
This DigiDollar dashboard provides a one-stop view for stablecoin management, analogous to how a DeFi app would show your balances and loans, but built into the native wallet.
Transaction History Integration
The wallet’s transaction history will be updated to clearly label DigiDollar-related transactions:
Each DigiDollar transaction entry can display the amount in DigiDollar and possibly an approximate USD or DGB equivalent for context. For example, “Sent 50 DigiDollar (≈ 50 USD) to address D...abcd”. The wallet will detect transactions that have OP_DIGIDOLLAR outputs or similar markers to classify them accordingly in the UI.
Address Book and QR Codes
The wallet will support DigiDollar addresses similar to DGB addresses. If DigiDollar uses the same address format (which it might if we simply reuse pubkey hashes), there may not be a distinction. However, we might introduce a prefix or a notation to indicate an address is specifically for stablecoin. For instance, a user might have a single key that can control both DGB and DigiDollar, so the address is same. But to be safe, we might generate distinct receiving addresses for DigiDollar (with a tag in the wallet like “Stablecoin address” which could be the same string as a normal address but the wallet knows to use it in token outputs). The GUI will allow users to request DigiDollar payments, showing a QR code or URI that encodes an address and amount in DigiDollar terms (e.g.,
digibyte:DigiDollar:<address>?amount=50)
. This might be an extension of BIP21 URIs or a new scheme.Sending DigiDollar
The send screen will have an option or toggle to send DigiDollar instead of DGB. For example, a dropdown to choose currency: DGB or DigiDollar. When DigiDollar is selected:
Enhanced User Warnings and Safeguards
DigiDollar Network Status (optional)
Possibly a GUI element showing network-wide stats (like total DigiDollar supply, system collateral level, current price feed health). This might not be crucial for average users but is nice for transparency. It could be part of an “Advanced” section or the debug window.
By implementing these GUI enhancements, we ensure that users without technical knowledge can safely use DigiDollar:
The UI will heavily emphasize clarity, since dealing with locked funds and a new asset could be confusing. Labels, tooltips, and documentation (perhaps an integrated help explaining what DigiDollar is) will accompany these features. The formal, academic details (like script conditions or oracle details) are abstracted away in the GUI, but the wallet might provide power-user tools (like a console command to manually create a stablecoin script) for advanced experimentation.
In summary, the core wallet will treat DigiDollar as a first-class citizen alongside DGB, providing an intuitive interface for all operations (mint, send, receive, burn) and safeguarding the user with appropriate warnings when crossing the boundary between stablecoin-aware and unaware contexts.
8. New RPC Calls for Monitoring
To support developers, exchanges, and power users in monitoring the DigiDollar system, several new RPC (Remote Procedure Call) commands will be added to DigiByte Core. These RPC calls provide information about the stablecoin’s state and allow retrieval of relevant data for wallets or analytical tools. Below we describe each new RPC call and the details it returns:
getdigidollarstats
This RPC provides a summary of the DigiDollar stablecoin’s overall status on the network. It returns data such as:
total_locked_dgb: The total amount of DGB (in whole coins or satoshis) currently locked as collateral for DigiDollar. This gives an idea of how much DGB supply is tied up backing the stablecoin.
total_digidollar_supply: The total circulating supply of DigiDollar tokens. This would be equal (in USD units) to the value of DGB locked times collateral ratio (minus any system over-collateralization). Essentially, how many DigiDollar exist.
average_collateral_ratio: (optional) The average or minimum collateralization ratio across all positions, to gauge system health.
breakdown_by_lock_duration: A breakdown of the above figures categorized by lock duration or type of collateral contract. For example, it could be a JSON object like:
This example shows how much is locked in different time buckets. It helps to see, for instance, if most people lock short-term or long-term.
oracle_count: (optional) Number of active oracles or last known oracles providing price.
last_price: (maybe better provided by getoracleprice, see below).
This RPC basically gives a high-level dashboard programmatically. An exchange might use getdigidollarstats to see if the stablecoin is growing and collateralized, etc. All values are likely returned as strings or numeric values (the same way Bitcoin RPCs return supply stats).
Example usage:
This indicates 3.5 million DGB locked, 2.3 million DigiDollar out, etc.
getoracleprice
This RPC returns the most recent DGB/USD price that the DigiDollar system is using. It likely includes:
price: The current price in numeric form (e.g., 0.101234 USD per DGB). Could be given as a float or as an integer (like 101234 in units of 1e-6 USD).
last_update_height: The block height of when this price was updated from the oracles.
last_update_time: The timestamp of the price update.
status: If the price is fresh, stale, or using fallback. For example, "status": "active" if updated this block, or "stale for 3 blocks" if it’s been reused for a few blocks.
oracle_signers: Possibly the list of oracle identifiers that contributed.
This RPC is useful for wallets that want to display the current conversion rate or for anyone verifying the oracles. It could also be used to check if the oracles are functioning (if status shows stale for too long, something is wrong).
Example:
getdigidollartransactions
This RPC allows filtering and retrieving transactions related to DigiDollar in the wallet or in the blockchain:
If called without arguments, it could default to listing recent DigiDollar transactions in the user’s wallet (similar to how listtransactions works but filtered).
Possible parameters: count, skip for pagination, include_watchonly, etc., similar to listtransactions.
It might also accept a filter argument, e.g., type which could be “mint”, “burn”, “transfer”, or an address to filter by.
For each transaction, it would return details such as txid, type (Mint/Burn/Transfer), amount of DigiDollar involved, collateral amount (if applicable), time, confirmations, and maybe the involved addresses.
Alternatively, we might have specialized calls:
listlockeddgb to list the user’s collateral outputs and details.
liststablecoinbalances to list stablecoin UTXOs under wallet control.
However, the user specifically mentioned getdigidollartransactions for history filtering. So likely:
This example shows one mint, one transfer, one redeem. The fields include what was locked/unlocked. This RPC helps users or tools audit their DigiDollar activity. An explorer or monitoring tool could also use this to track network usage of stablecoin (though an explorer likely would parse the blockchain directly rather than RPC).
Integration with existing RPCs:
The existing getbalance or listunspent might be updated to reflect stablecoin balances. Possibly getbalance could have multiple accounts or entries like “DGB”: X, “DigiDollar”: Y. Alternatively, new RPCs like getdigidollarbalance for wallet's own stablecoin holdings might be introduced for clarity.
decoderawtransaction should be updated to decode new opcodes (like showing “OP_DIGIDOLLAR 100” etc.) so that when users decode a stablecoin transaction, they see the human-readable meaning.
validateaddress might indicate if an address is involved in stablecoin.
Security of RPC data:
The RPC calls do not reveal private info beyond what’s needed. For example, getdigidollarstats is likely only available in a full node (not something a lightweight client can get unless they trust an API) because it requires scanning the UTXO set or maintaining counters in memory. It might be a relatively heavy call unless we maintain running totals. But since nodes already track supply or could easily sum outputs with OP_DIGIDOLLAR (because each such output's amount is known), it should be fine. We might maintain these stats incrementally at block connect/disconnect for efficiency.
9. DigiDollar Transactions & Fee Structure
In designing DigiDollar transactions, we aim to make the stablecoin as easy and cost-effective to use as DGB itself, while also preserving network integrity through appropriate fees. Here we discuss how DigiDollar transactions are handled in terms of fees and what rules are set to prevent spam and ensure sustainability.
Free Transferability of DigiDollars:
DigiDollar tokens, once minted, are intended to be freely transferable between any DigiByte addresses. “Free” in this context means that the protocol itself does not impose any additional charge or toll on moving DigiDollars around (no built-in transfer tax or seigniorage). If Alice sends 10 DigiDollar to Bob, Bob receives exactly 10 DigiDollar, with no deduction. This is important for DigiDollar to function as a true currency – users can pass it around just like they do with any crypto or fiat, and it always retains its full value. The only cost in transferring comes from the standard network transaction fee that miners require to include the transaction in a block.
Requirement of DGB Fees for DigiDollar Transactions:
The DigiByte network uses DGB for transaction fees (miners are paid in DGB). That does not change with DigiDollar transactions. Any transaction that involves DigiDollar outputs or inputs must still include a sufficient amount of DGB as a fee to be relayed and mined. This is analogous to how token transactions on Ethereum still require ETH for gas. For example, if Alice is sending Bob 100 DigiDollar, her transaction might have:
This implies a usability consideration: users must have some DGB dust to move DigiDollars. If someone only holds DigiDollar and has zero DGB, they cannot directly pay the network fee to send a stablecoin transaction. This is the same scenario as an ERC-20 token holder needing ether gas. We will address this by:
Fee Structure and Amounts:
DigiByte’s fee structure (as noted in v8.22.0) is around 0.1 DGB per kB minimum. DigiDollar transactions might be slightly larger in size due to extra script data (e.g., the OP_DIGIDOLLAR marker and amount). However, they are not huge – likely similar to an extra output with some bytes of data. For instance, a transfer of stablecoin might be ~200 bytes. At 0.1 DGB/kB, that’s 0.02 DGB fee, which is a few cents (given DGB’s price usually low). This is negligible for typical transactions, ensuring DigiDollar is cheap to use.
We should however consider optimal fee structure in terms of:
We want to ensure that DigiDollar transactions are not abusing the network by being feeless or extremely low fee compared to the resources they consume:
Preventing DigiDollar Spam/Dust:
To explicitly address spam:
Fee Structure Summary:
Sustainability Considerations:
We want DigiDollar transactions to remain lightweight and not burden the network:
Example of Fee in Context:
If Alice mints stablecoin, that transaction might be around 250 bytes, incurring say 0.025 DGB fee (a few pennies). If she later sends stablecoin to 5 friends (5 outputs), maybe a 300-byte TX, maybe 0.03 DGB fee. These fees are minimal. Even if DigiDollar sees heavy usage, the fee costs remain a small fraction compared to the value transferred.
10. Security Considerations
Introducing a decentralized stablecoin at the protocol level raises several security issues that must be carefully considered. These include oracle price manipulation, blockchain reorganization handling, protection against malicious or accidental stablecoin usage patterns, and ensuring the stablecoin’s integrity even under adverse conditions. We address each of these below.
Oracle Price Manipulation and Trust:
The oracle system is arguably the most vulnerable point, as DigiDollar’s correctness depends on accurate price feeds. If an attacker could manipulate the reported DGB/USD price, they might profit by minting or redeeming DigiDollars at false rates. For instance, if they push the oracle price too high, they could lock relatively fewer DGB to mint a large amount of DigiDollar (effectively getting more USD value than the collateral is truly worth, then potentially defaulting if price corrects). Conversely, if they push the price too low, they could redeem DigiDollar for more DGB than they should receive (draining collateral). To mitigate this:
Handling Blockchain Reorganizations:
Blockchain reorgs (where a set of blocks get replaced by an alternate chain due to a longer chain found) can impact DigiDollar in a few ways:
We must ensure that the node software handles reorgs gracefully with respect to tracking stablecoin state. If nodes keep an internal map of collateral to stable supply, they must rollback those changes on reorg as part of usual block disconnect/undo processes.
Double-Spending and Script Validity:
DigiDollar introduces new script paths and output types. We need to ensure no unintended spending of stablecoin outputs:
Prevention of DigiDollar Spam or Dust Attacks:
To explicitly address spam:
Peg Stability Under Extreme Conditions:
If DGB’s price plummets quickly, collateral might become insufficient for some issued stablecoins. In such an event, undercollateralization might occur. Ideally, arbitrageurs will exploit the discount, or the system may trigger a liquidation process. For DigiDollar v1, we rely on high collateralization ratios and timely redemptions to mitigate this risk.
Other Vectors:
Conclusion of Security Section:
We discourage minimal collateral and enforce robust multi-oracle designs, rate limits, and transparency to secure DigiDollar. While no system is entirely without risk, the layered approach described here minimizes the possibility of exploitation via price manipulation, reorg-induced inconsistencies, double-spending, or spam attacks. Ongoing monitoring, third-party audits, and the potential for emergency governance interventions further reinforce the system's integrity.
11. Future Upgrades & Enhancements
The initial implementation of DigiDollar provides a fully functional stablecoin on DigiByte, but there are several areas of improvement and modernization that can be pursued in future upgrades. These enhancements aim to increase efficiency, security, and functionality, often by leveraging new features in Bitcoin/DigiByte’s evolution such as Taproot and Schnorr, or refining consensus to better accommodate the stablecoin.
Integrating Taproot for Simplified and Efficient Locking Scripts:
Taproot (and the associated upgrades like SegWit v1 and Schnorr signatures) was slated for activation in DigiByte. By embracing Taproot, we can significantly improve the DigiDollar script design:
Using Schnorr Signatures for More Efficient Oracle Price Verification:
Potential Improvements in Consensus Model for Stablecoin Efficiency:
Beyond Taproot and Schnorr, we consider other consensus improvements tailored to DigiDollar:
Taproot & Schnorr Activation Timeline:
Once Taproot and Schnorr are activated and stable, the improvements outlined above can be gradually integrated into DigiDollar via soft forks or backward-compatible upgrades. This forward-looking approach ensures that DigiDollar remains efficient, secure, and adaptable as the underlying technology evolves.
12. Conclusion
DigiDollar represents a significant innovation for the DigiByte ecosystem: a stable, USD-pegged asset achieved through on-chain mechanisms and without centralized backing. By leveraging DigiByte’s UTXO heritage and recent advancements, we have outlined a design that integrates a decentralized stablecoin into the core protocol in a secure and efficient manner.
In this whitepaper, we presented the full implementation details of DigiDollar:
Improvements to the DigiByte Ecosystem:
DigiDollar’s introduction is poised to have several positive impacts:
Next Steps (Implementation, Testing, Governance):
Implementing DigiDollar requires a coordinated effort:
By proceeding with careful development, testing, and community involvement, DigiDollar can be launched as a reliable component of the DigiByte blockchain. Its success will rely on both the soundness of the technical implementation and the support of the DigiByte community in utilizing and promoting it.
In conclusion, DigiDollar has the potential to significantly improve the DigiByte ecosystem by marrying DigiByte’s technical strengths with the stability of the US dollar. It demonstrates DigiByte’s flexibility and commitment to innovation, positioning DigiByte not just as a fast payments network but also as a platform for decentralized finance. With DigiDollar, DigiByte users gain a powerful new tool – the ability to seamlessly move between a volatile asset (for growth) and a stable asset (for safety) all within the same decentralized network. This enhances user autonomy and financial freedom, aligning with the broader vision of cryptocurrency as an empowering technology. The implementation details laid out in this whitepaper serve as a blueprint to realize this vision. As we move from design to deployment, rigorous validation and community governance will be key in ensuring DigiDollar’s success as the world’s first fully decentralized stablecoin on DigiByte. Together, these efforts will pave the way for a more versatile and resilient DigiByte blockchain for years to come.
Beta Was this translation helpful? Give feedback.
All reactions