Much of the rationale for choosing the EVM protocols for PUFFScoin are the native base layer services built into the puffscoin web3 stack. The two most innovative applications with current support are Swarm and Whisper. Swarm provides an incentivized and distributed storage platform and content delivery service. Whisper provides a blockchain based messaging system. The positive implications for application development making use of these services, geared towards the cannabis economy and community groups, are endless.
The primary intent of the Swarm protocol is to provide a disseminated and naturally redundant content storage and distribution service across the Puffscoin blockchain, acting in part as a “decentralized web” with zero-downtime, and is antagonistic to censorship, DDOS-resistant and fault-tolerant. Participants can host Swarm nodes, pooling storage and bandwidth resources, in a directly incentivized manner. Swarm is directly integrated into the PUFFScoin network through the devp2p multiprotocol network layer and will assist in administering core-built applications for PUFFScoin domain name resolution, content availability insurance, serverless web hosting, and more.
One can think of the Swarm as akin to BitTorrent delivering webpages to users with no delay. And can provide this data to you, or allow you to publish data of your choosing, with resistance to censorship or DDOS attacks.
In practical terms, banks and news sources online are vulnerable. Consider the attack against Dyn DNS in 2016 which saw amateur hackers close traffic to major services such as Twitter, PayPal, Netflix, The Wall Street Journal and a host of others. Had this content been provided in a distributed fashion as the Swarm subprotocol on PUFFScoin allows for, such attacks would have been nearly impossible.
Furthermore, for modern cannabis businesses, even in today’s more legislatively permissive atmosphere, censorship regarding cannabis culture remains very active. Facebook has deleted pages related to medical marijuana and continues to do so, preventing cannabis ventures from utilizing even targeted advertising on the social media platform. Google is another major advertising medium which prohibits cannabis content in advertising, classifying it a “dangerous product” specifically alongside heroin and cocaine. Twitter has since reversed its policy to blacklist any searches for the term “marijuana”. Instagram has also been party to blatant censorship, at one point purging accounts related to cannabis completely from its system.
Providing a service for a censorship-free cannabis social media, providing the opportunity for decentralized advertising mediums, and allowing for the dissemination of scientific studies on cannabis, or assisting in the collaborative database of cannabis documentation to prevent corporate giants from trademarking entire strains of the cannabis genome, this is why we chose to build PUFFScoin on the EVM.
Swarm refers to the collection of dedicated nodes on the devp2p network layer which runs the “bzz protocols” on the PUFFScoin network. Further evolution of the system, which the Puffscoin Development Group will parallel to other Ethash blockchains, will allow for insurance on content uptime and encryption.
Data is broken into 4KB “chunks”, each employing a cryptographic “hash” as its unique address identifier, and a “manifest” data structure or “chunk tree” allows for standard browser-based access to content. This content will be uniformly distributed across the network, with an absolute and immutable consistency of data and no chance of super-imposed data mapping. Data uploaded to the Swarm is immutable and cannot be deleted. When a change in state is necessary for content delivery, a new swarm hash is created, building a new chunk tree.
Incentivization is provided by the SPLIFF token (Swarm Protocol Instance Framework Format) allowing for participants to “rent out” disk space to those willing to pay for it, without consideration to their content; and reciprocally, for content publishers to easily deploy interactive and dynamic content to be stored on the blockchain by implementing suites of smart contracts, administered by the PUFFScoin development team. An incentive is also provided to the Swarm node hosts which facilitate the retrieval and assembly of the chunks requested by users.
The incentives for bandwidth use are designed to achieve speedy and reliable data provision while the storage incentives are designed to ensure long-term data preservation.The Swarm is designed to auto-scale, and build a strong reputation system for data providers and hosts to cooperatively deliver a truly distributed information superhighway.
Smart contracts, however, make it easy to implement a more secure payment process. Instead of a simple account, the sender address holds a chequebook contract. This chequebook contract is similar to a wallet holding an ether balance for the owner and allows signed cheques to be cashed by the recipient (or anyone), who simply send a transaction with the cheque as data to the contract’s cash method
The Receiver may keep only the last cheque, as the cheque value accrues, received from each peer and periodically cash it by sending it to the chequebook contract: a scheme that allows trusted peers to save on transaction costs. Peers watch their receiving address and account all payments from the peer’s chequebook and when they are considered confirmed, the tally is adjusted. The long-term use of a chequebook provides a credit history, use without failure (bounced cheques) constitutes proof of compliance. Using the cumulative volume on the chequebook to quantify reliability renders chequebooks a proper reputation system. SPLIFF can also use a fully featured payment channel as a mode of payment.
By default, nodes will store all chunks forwarded as the response to a retrieve request. These lookup results are worth storing because repeated requests for the same chunk can be served from the node’s local storage without the need to “purchase” the chunk again from others. This strategy implicitly takes care of auto-scaling the network.
Storage incentives present a stronger ability within the ecosystem to encourage and enforce the preservation of content. Rather than just simple metadata regarding the digital whereabouts of the addressed content, the participatory nodes actually store the data itself. When a new chunk is encoded within the swarm storage network, it is proliferated from node to node through syncing. The intention is for chunks to end up at nodes whose IP-address is closest to the chunk hash. This way chunks can be located later for retrieval using “kademlia key-based routing“, which produces a virtual or overlay network formed by the participant nodes.
Those retrieving data may set their “highest accepted chunk price” and those acting as data storage providers can set their own “offered chunk price”. The use of smart contracts to implement the payment process allows the sender address to maintain a “chequebook contract”, similar to a wallet, allowing signed cheques to be cashed by the recipient (or forwarded on by them to be cashed by anyone else). These cheques are sent out with cumulative balances until they are cashed, and will establish an eventual “reputation system” where trusted nodes with constant uptime and reliable chunk storage will allow for an inclusive system of incentivization for users of the Puffscoin ecosystem beyond simply mining for PUFFS using their computer GPUs.
Private Swarms can be deployed as well.
A full user guide to interacting with Swarm on PUFFScoin will be available here as we approach our public launch.