Use OpenBZZ, a permissionless, censorship resistant dapp Hosted on Swarm to:
Buy / sell BZZ on Ethereum Mainnet using DAI, USDC, or USDT*.*
One-click funding of your node (buy BZZ and bridge to Gnosis Chain, receiving 0.01 XDAI in gas for your node automatically)!
Top up your postage stamp, or use a link to ask fans of your content to top it up for you!
☝️Save precious gas by doing any of the above in one transaction when utilising DAI or USDC (or two transactions if you insist on using USDT).
To see how, read on…👀
The Swarm Developers have been very busy implementing Phases 2 and 3 of the storage incentives roadmap. Broadly speaking, storage incentives seek to reward node operators for providing storage space to the swarm, and will establish a decentralised rent price oracle responsible for setting the price of that storage. With the current pace of development by the Swarm Developers, and release 1.10.0
nearing ever closer, now is the time to prepare your node, but first a quick overview on the token utility so we can understand how to fund our nodes.
Broadly speaking the Swarm token, BZZ, is used by the bee
node for the following use cases:
🧑💻 Swap protocol - for high bandwidth usage when uploading / downloading from the swarm. Minimum required: 1 BZZ for bee
version 1.9.0
, however reverting to 0 BZZ from the forthcoming version 1.10.0
.
📫 Postage stamps - rent paid by content publishers for storage on the network. Minimum required: depends on your storage needs.
🫰Storage incentives (new) - a stake for nodes that wish to receive rewards for providing storage to the swarm. Minimum required: 10 BZZ.
NOTE: The stake for storage incentives, and payments made for postage batches are non-refundable.
Initially when working with the above token utility, it is reasonable to start with ~12 BZZ. This would allow your node to participate in the storage incentives, download / upload at high speed (swap protocol), and have some spare BZZ left over to purchase postage stamps to publish your own data. So, with this being said, how do you fund your node?
In order to run your node, you will require xDAI to pay for gas (network transaction fees), and BZZ to stake / publish data. But wait, what is xDAI?! Swarm mainnet uses Gnosis Chain, a blockchain that closely follows the technological roadmap of Ethereum Mainnet, as the settlement layer for incentives / postage stamps. The native unit of account on Gnosis Chain is xDAI, which is pegged 1:1 to DAI. To get xDAI, you can use the native bridge (or one of the 3rd-party bridges) to send DAI from Ethereum Mainnet to Gnosis Chain. For non-native (ie. not DAI/xDAI) tokens, such as BZZ, you can use OmniBridge (or one of the 3rd-party bridges that support non-native tokens).
Sound simple? No! 🤯 This is why we created OpenBZZ, a simple dapp to help you get started! 👷🐝
OpenBZZ allows you to purchase BZZ with stablecoins DAI, USDC, or USDT. In a single, simple transaction, you can:
Buy BZZ to hold on Ethereum mainnet (speculation).
Buy BZZ with stablecoins to fund your node.
Buy BZZ with stablecoins and top up a stamp.
Sell BZZ for stablecoins on Ethereum mainnet.
If you purchase BZZ using DAI or USDC (ie. NOT USDT), you can do the swap without having to do a separate approve
transaction, saving you some precious gas. To save you gas in the future as well, you can choose an ‘Infinite Approval’, but you should be aware of the security risks in doing so.
After you have signed the Permit
for OpenBZZ to use your DAI or USDC, you will be able to execute your swap.
At this stage, you will be asked to confirm that you wish to execute the transaction, with an overview provided of the transaction, prior to then being confirmed with Metamask.
Well, let’s actually get to the point of funding your node! When you start your node, if you check the logs, you should see something along the lines of:
"time"="2022-09-19 12:23:38.789900" "level"="info" "logger"="node" "msg"="using ethereum address" "address"="d14fb4f6d526115991dd490d7abcc864845518f6"
A common misunderstanding for novices starting out - this is an ethereum address but more specifically it’s the node’s address on Gnosis Chain. With this new knowledge, we can now use OpenBZZ to directly fund our node:
Click ‘Advanced Options’.
Select ‘Bridge to Gnosis’.
Enter your node’s address in the ‘overlay or address field’.
Address and/or overlay input is verified against Swarm Scan. In the above screenshot, a green dot indicates that the address has been verified as a valid bee
node via the Swarm Scan API. The UI will still allow you to send to a node’s address that is not verified but will NOT allow you to send tokens to an overlay that cannot be translated to an address (which shall show as a red dot for unverified input).
Once the transaction has been confirmed, you can monitor the progress of your node’s funding by checking the bridge explorer link provided in the notification, or by visiting the Bridge Explorer and inputting the transaction hash of your swap. For example:
Once the bridge transaction shows ‘Executed by’, your node is now funded. As a bonus, OpenBZZ will tip your node 0.01 XDAI, so it will also have enough gas to start automatically.
When uploading data to swarm, you must attach a postage stamp as a means of telling the network “this is real data, and I’m prepared to put money to it, in order to have you store it”. Gradually over time, rent is extracted from the postage stamp and redistributed to node operators through the storage incentives mechanism.
Therefore, if you want your data to stay in the swarm, you may have to top up your stamp:
Click ‘Advanced Options’.
Select ‘Top up Batch’.
In the ‘Top up Batch’ box, type in your batch id
.
Vary the amount of BZZ you buy to adjust the stamp’s new ‘Time To Live’ (TTL).
The above shows how to top up the OpenStreetMap on swarm stamp (after requesting the batch ID from the data creator), adding an additional 4.4 years worth of storage time at the current rent of 4 PLUR (as seen in the top bar).
OpenBZZ supports query parameters to enable developers / content creators to create short-cut links that make interacting with OpenBZZ even easier for end users.
For node packaging software, you can create a short-cut to fund the bee
node. Using the previous example, we can create a shortcut to add 12 BZZ to 0xd14fb4f6d526115991dd490d7abcc864845518f6
:
https://openbzz.eth.limo/?amount=120000000000000000&bridgeAddress=0xd14fb4f6d526115991dd490d7abcc864845518f6
For content creators who want to create a “Top Up My Stamp”, you can similarly create a short-cut. Using the previous example to top up the OpenStreetMap postage stamp:
https://openbzz.eth.limo/?amount=120000000000000000&batchId=0x0e8366a6fdac185b6f0327dc89af99e67d9d3b3f2af22432542dc5971065c1df
CAUTION: When creating short-cut links, recall that BZZ uses 16 decimals.
OpenBZZ is open in the sense that it itself is Hosted on Swarm, so it accessible to everyone with access to swarm, making it censorship resistant!
You may access it through the following means:
A transaction fee of 1% is collected on the DAI equivalent rate of the transaction value. Minimum / maximum spends are shown including fees / slippage. The smart contracts that run OpenBZZ are NOT audited. Source code is published and verified, and may be reviewed at:
Exchange: View on Etherscan
BzzRouter: View on Blockscout
NOTE: Transaction fees are configurable by smart contract, however are enforced to never exceed 1%.