Let us have a short recap about what blockchain is. It is a decentralized public transaction ledger so that peers can reach consensus on a growing list of transaction records for something, which is Bitcoin when it is first invented.
In this platform, each peer serves as both peer in the DHT network (for BT) and node in the blockchain network. The DHT network and BT handle the data delivery, as we discussed in the last article. Blockchain keeps the transaction records of the currency inside this platform, or stamp, as well as the data delivery records in terms of multi-party-signed smart contract. It will be based on Ethereum, using proof of work.
When Alice would like to send out a data, she need to ask 3 peers inside blockchain to sign a delivery contract with her as a mailer. Smart contract indicates when a data is delivered using a torrent file, and a delivery record is signed and sent out on blockchain, Alice will pay a certain number of stamps to each mailer. The torrent file and magnet link are attached with the smart contract. There is an expire time on the smart contract, 50% of the deposit will be paid to mailers and 50% will be returned to Alice when contract is expired.
During the data delivery, mailers can ask for other peers to keep some pieces of the data to increase the download rate of the downloader. After the delivery, data recipient sign a delivery record, in which the source of each data piece is indicated. Mailers put the signed delivery record into the smart contract. Miners confirm the delivery record and execute the coin distribution of the smart contract, i.e. giving stamps to the mailers. According to the number of data pieces a peer has given to the recipient, new stamps are created to reward the corresponding peers.
Miners, unlike normal peers, only joins the blockchain. They do not care about anything inside the DHT network and data transferring between peers. They are equivalent to a miner in blockchain network. However, mining in Authpaper delivery platform is different from the mining in Ethereum or any smart contract supporting cryptocurrency. In Authpaper delivery platform, each smart contract has more than program codes, it also has attachments (torrent file / magnet link) and peers involved in the contract can add attachments to it (mailer adding delivery record). Whenever new attachment is added to a smart contract, the smart contract will be evaluated again and see if the delivery is completed and the stamps should be distributed. The consensus process is PoW at the first stage.
Therefore, one may expect that the gas limit, the limit of both processing and storage/bandwidth for running a transaction or function in a smart contract, will be much much higher in this platform than any other blockchain platform. There is no block reward for miners, they only receive transaction gases.
In the design of Authpaper Delivery platform, rewards are provided so that peers are always better to act legitimately from the economical perspective. This is also the main new supply of the stamp of the system.
In the delivery process, data sender will pay stamp to enjoy the service. Even the delivery failed, half of the fee will also be paid to make sure mailers are guaranteed to get paid. They will be always online to upload data pieces to the recipient for extra rewards and wait for the delivery record for full mailing fee from sender. Peers are willing to join the swarm as they can get rewards by uploading data to the recipient. The recipient is not known until the signed delivery record is sent out. Peers and mailers will share their data pieces to others as much as possible to increase the chance of getting rewards. This increases the download rate and data availability of the recipient, shorten the delivery time.
Rewards of uploading data to the recipient is the only source of the new stamp supply. Hence the inflation of the stamp supply is directly proportional to the data transferred inside Authpaper delivery platform. It is better than setting a hard value because supply of a coin is adjusted automatically according to the coin usage.
This is how blockchain works in our platform. It keeps the records, and provides incentive for peers to work in favor of the data delivery, even the data is encrypted and they cannot read. Combining the blockchain and BT forms the basic operation framework of Authpaper Delivery.
http://Authpaper.io