Data storage on Autonomi is paid for using the transfers described above.
As a recap, before data is stored on the Network, it is broken into chunks and encrypted. Each chunk has a unique hash value from which its XOR Network address is derived.
Nodes also have a unique Network address. Data is stored on the nodes which have the closest Network address to the data itself. This is why we say data is content-addressable.
A client can get the nodes that are closest to a chunk’s address by querying the network. Once it knows the closest nodes, it performs a ‘store cost’ query to ask the price for holding data at that location. The price depends on the storage capacity of the nodes, which ultimately depends on demand.
Once the client knows the store costs offered by the closest nodes, it picks one and sends the data along with the transfer paying for it. Upon receiving the data, the chosen node verifies the transfer, take the payment, verifies the data itself and stores it. It is then replicated to the other close nodes.
There is no charge for downloading data, but uploaders must pay a one-time fee to pay for storage. Once data is paid for it remains stored and accessible to it's owner for the lifetime of the Network.
Data payments are split in two parts:
85% is paid to node operators as a Resource Supply Reward
15% is remitted as Network Royalties
When receiving data payments, nodes make sure that both their payment and Network royalties are valid before storing the data.
All of this is done automatically when the user uploads data using the CLI, or an app.
Sometimes the store cost accepted by the client changes between receiving a quote and uploading the chunk, in which case the client pays the difference.
Nodes cannot manipulate the store cost themselves. The price is purely a function of their fullness. To receive payment a node needs to store new data and already have all the existing data in its range.