Incentives Overview
A key challenge in decentralized data networks is incentivizing users to store and transmit data. Swarm addresses this with two incentive mechanisms: storage incentives, which reward nodes for storing data, and bandwidth incentives, which reward nodes for relaying data. Together, these mechanisms establish a self-sustaining economic system where nodes are compensated for contributing resources honestly.
Swarm's storage incentives are detailed in the Future Proof Storage paper and The Book of Swarm.
Storage Incentives
Storage incentives reward node operators for providing disk space and reliably storing data. The system is governed by three interconnected smart contracts:
- Postage Stamp Contract – Handles payments for uploading data by way of purchasing "postage stamp batches".
- Redistribution Contract – Distributes payments for postage stamps to nodes that store data.
- Price Oracle Contract – Uses network redundancy data to determine postage stamp prices.
If you want to dig into the code, check out the incentives contracts repo You can find the on-chain address for each contract within the docs here, however since the contracts there are updated manually, they may at times fall slightly behind the most recent changes. For the most up to date address for each storage incentives contract refer to the storage incentives ABI repo, and you can also find past addresses of older versions of the incentives contracts by reviewing previous commits.
Postage Stamps
Postage stamps are required to upload data to Swarm, similar to how real-world postage stamps prepay for mail delivery. Instead of being purchased individually, they are bought in batches using xBZZ through the postage stamp smart contract.
The xBZZ used to buy postage stamps is later redistributed as storage incentives. The price oracle contract adjusts postage stamp pricing based on network redundancy to ensure a sustainable level of storage. You can find more details about postage stamps here.
Redistribution Game
The redistribution game determines how xBZZ from postage stamp purchases is distributed among full staking nodes that store data. The system is designed so that honestly storing assigned data is the most profitable strategy. Rules for this process are encoded in the redistribution smart contract.
Additionally, the game generates a utilization signal, which the price oracle uses to regulate postage stamp prices. Read more here.
Price Oracle
The price oracle contract dynamically adjusts postage stamp prices based on network utilization data from the redistribution contract. This mechanism ensures optimal redundancy by increasing or decreasing the price of storage as needed. Read more.
Bandwidth Incentives
Nodes in Swarm not only store data but relay data across the network. Bandwidth incentives compensate nodes for these services.
The Swarm Accounting Protocol (SWAP) facilitates bandwidth payments between nodes, which can be settled either in-kind (data exchange) or via cheques processed through a chequebook contract on Gnosis Chain. Only full nodes can participate in SWAP.
Read more here.