Wario
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    #### Written by Grok-4, prompt by [@atrasdoarwario](https://x.com/atrasdoarwario/status/1996812714036154427). # Enhancing Bitcoin's Scalability: A PID-Inspired Approach to Managing UTXO Set Growth ## Abstract Bitcoin’s UTXO set is currently an unbounded accumulator that risks long-term centralization as node RAM requirements grow without limit. Existing fee incentives have proven insufficient against sustained low-value output creation (e.g., inscriptions, tokenized assets, dust-heavy protocols). This article proposes a soft-fork mechanism that treats UTXO set size as a controlled variable: a slowly rising target size is defined, and a PID-style feedback controller, updated every difficulty epoch, dynamically raises a minimum-value floor beneath which old UTXOs become unspendable. The result is bounded, predictable growth of the UTXO set with ample warning periods, no hard caps on monetary use, and strong resistance to bloat attacks—all while remaining fully compatible with a soft-fork deployment. ## Introduction Bitcoin, the pioneering decentralized digital currency, operates as a complex dynamic system governed by consensus rules that ensure security, immutability, and permissionless participation. At its core, Bitcoin maintains a distributed ledger known as the blockchain, which records all transactions in a sequence of blocks. Each transaction involves inputs and outputs: inputs reference previously unspent outputs from prior transactions, while outputs create new spendable units called Unspent Transaction Outputs (UTXOs). The UTXO set represents the aggregate state of all currently spendable coins in the network, serving as a critical component for transaction validation and wallet management. As Bitcoin has evolved, the UTXO set has grown significantly, influenced by increasing adoption and diverse usage patterns. This growth, while indicative of the network's vitality, poses challenges to its long-term scalability and decentralization. Nodes—computers that validate and relay transactions—must store and process the entire UTXO set in memory for efficient operation, which can strain resources such as random access memory (RAM). Unchecked expansion could lead to higher barriers for running full nodes, potentially centralizing control among fewer, well-resourced participants. This article explores a proposed mechanism to address these concerns: an adaptive control system inspired by Proportional-Integral-Derivative (PID) feedback principles, designed to impose bounded growth on the UTXO set while preserving Bitcoin's foundational properties. ## Motivations for UTXO Set Management To appreciate the need for enhanced UTXO management, it is essential to understand the current status quo and its vulnerabilities. Bitcoin's design prioritizes efficiency and security through mechanisms like block size limits, which cap the amount of data added per block (approximately 1 MB base size, expandable to about 4 MB with Segregated Witness). These limits help control the overall blockchain size, ensuring predictable hardware requirements for storage on hard disk drives (HDDs). Similarly, the difficulty adjustment algorithm maintains a consistent block production rate of roughly one every 10 minutes by dynamically scaling the computational challenge for miners based on network hashrate. However, the UTXO set lacks comparable built-in constraints. It accumulates as users create new outputs—often in small denominations—without a mandatory mechanism to consolidate or prune them. This can result from various activities, including high-frequency microtransactions, the embedding of non-monetary data (such as through protocols like Ordinals, which inscribe arbitrary information onto satoshis, Bitcoin's smallest unit), or the anchoring of sidechain or tokenized assets that leverage Bitcoin's security but operate externally. While these innovations expand Bitcoin's utility, they can inadvertently increase the UTXO count disproportionately to their economic value, elevating transaction fees during congestion and raising operational costs for nodes. Existing incentives, such as transaction fees, partially mitigate this by encouraging users to consolidate low-value UTXOs to avoid higher costs. Yet, these market-driven forces are insufficient against sustained patterns of low-value output creation, particularly when driven by external systems that do not bear the full cost of network maintenance. Over time, this leads to bloat: as of recent estimates, the UTXO set exceeds several gigabytes when loaded into memory, complicating node synchronization and validation. Without intervention, projected growth could undermine decentralization, as fewer individuals or entities might afford to participate fully in the network. The motivation for reform, therefore, stems from a desire to balance innovation with sustainability. An ideal solution would allow gradual UTXO expansion to accommodate genuine monetary usage while introducing feedback to curb excessive accumulation, all without compromising Bitcoin's permissionless nature or requiring a hard fork that could fragment the community. ## A PID-Inspired Feedback Controller for UTXO Control Drawing from control theory, which studies how systems maintain desired behaviors through feedback, this proposal introduces a dynamic mechanism to regulate UTXO set size. PID controllers, widely used in engineering for processes like temperature regulation or autopilot systems, combine three terms: Proportional \(P\) for immediate response to errors, Integral (I) for correcting persistent deviations, and Derivative (D) for anticipating changes based on trends. In Bitcoin's context, we adapt this framework to compute a minimum value threshold—or "floor"—below which UTXOs become ineligible for spending, effectively deprecating them over time. Importantly, this deprecation rule constitutes a soft fork: it restricts the set of valid transactions to a subset of those previously allowed, without introducing new capabilities. Upgraded nodes enforce the rule, rejecting deprecated UTXOs as invalid inputs, ensuring backward compatibility and minimizing disruption. ### Mechanism Overview The controller activates at each difficulty adjustment epoch, approximately every two weeks (2016 blocks), aligning with Bitcoin's existing periodic recalibrations for predictability. 1. **Define a Target UTXO Size Trajectory**: Establish an increasing maximum target for the UTXO set size, denoted as $T(t)$, where $t$ represents the epoch number. This could grow sublinearly with time or blockchain height to reflect organic adoption— for instance, $T(t) = U_0 \cdot (1 + r)^t$, with $U_0$ as the initial size and $r$ a small annual growth rate (e.g., less than 1%). This permits expansion while preventing unbounded divergence. 2. **Measure the Error**: At each epoch, compute the error $e(t) = S(t) - T(t)$, where $S(t)$ is the current UTXO set size (measured by count or aggregate data footprint). 3. **Compute the Floor Adjustment**: Apply the PID formula to adjust the value floor $F(t)$: $$ \Delta F(t) = K_p \cdot e(t) + K_i \cdot \sum_{k=0}^{t} e(k) + K_d \cdot \frac{e(t) - e(t-1)}{\Delta t} $$ Here, $K_p, K_i, K_d$ are tunable gains, selected conservatively through simulations to ensure stability (e.g., using root locus analysis to avoid oscillatory or unstable roots in the system's characteristic equation). The floor $F(t)$ increases only if $e(t) > 0$, applying to UTXOs below this threshold. 4. **Deprecation Process**: UTXOs with values below $F(t)$ are marked as unspendable in future transactions. To provide fairness and predictability, implement a grace period (e.g., 4-12 months) during which owners can consolidate affected UTXOs. 5. **Safeguards and Tuning**: Incorporate clamps on $\Delta F(t)$ (similar to Bitcoin's difficulty adjustment limits) to prevent abrupt changes that might cause network congestion from mass consolidations. Periodic reviews of gains and targets via community governance would adapt the system to evolving conditions. ### Stability and Dynamics Considerations In dynamic systems terms, the UTXO set can be modeled as an integrator accumulating outputs minus expenditures. The PID controller introduces negative feedback to dampen this accumulation, driving $S(t)$ toward $T(t)$ with minimal overshoot. Simulations would verify robustness against adversarial scenarios, such as deliberate UTXO spam, ensuring the system's poles remain in the stable region of the complex plane. Potential benefits include reduced node resource demands, lower fees during normal operation, and enhanced decentralization. Risks, such as over-deprecation affecting small holders, can be mitigated through careful gain selection. ## Conclusion This PID-inspired approach offers a principled path to managing Bitcoin's UTXO set, fostering sustainable growth while upholding core principles. By integrating feedback control, Bitcoin can evolve as a resilient dynamic system, better equipped for widespread adoption. Further research, including detailed modeling and community discourse, is essential to refine and potentially implement such enhancements.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully