Tutorial on basic bundlers for child chain transactions

From ArdorDocs
Jump to: navigation, search
This page contains changes which are not marked for translation.
Other languages:

This guide provides details on how to set up basic transaction “bundlers” for child chain transactions. “Bundlers” help to tackle two of the most critical issues facing blockchain platforms at the moment: customizing end user fees for dApps so that they can be as low as 0, and hedging to provide predictable day-to-day business transaction expenses on the blockchain. The information presented here represents a modified version of the information in the following Demo of Custom Bundlers, 0 Transaction Fees for App Users, and Hedging”

If you would like to set-up a bundler, you must hold a minimum of 1000 Ardor in your wallet and you must download the Full Ardor Client Wallet from the Jelurida website. The dowonload process is explained in the guide how to download the ardor client.


Background Context on Transaction Fees

For large scale adoption of blockchain technology to occur, users of blockchain based business services need to experience predictable fee structures. If you are playing a game or have a membership of some kind, you probably expect free transactions as part of the experience. Businesses set their fees based on regular reviews of cashflow projections, but the current market leaders like Ethereum do not offer any means of controlling end user fees and day-to-day business transaction expenses. The Ardor ecosystem has a process known as “Bundling” that solves these issues — allowing businesses to provide end users with customized fees as low as 0 while hedging their day-to-day business transaction expenses. By the end of this article, developers and businesses working at exchanges, investment platforms, retail stores or any other membership or subscription-based platform might start to have some exciting ideas on how to replicate their offerings on the blockchain. You can then proceed to learning about more advanced custom bundling options in the bundling features section.


Introduction to “Bundlers”

Let’s take a moment to understand the basics. Child chains do not have a means of verifying their own transactions because they have no way of performing their own consensus. These transactions must be packaged and sent to the Ardor parent chain for validation. This packaging process is called “bundling” and anyone can participate as long as you have 1000 Ardor and your node is online. “Bundlers” receive the transaction fees from child chain transactions in the native child chain token, while paying Ardor from their own account to send these transactions for validation on the Ardor chain. For example, if you bundle Ignis, you will be spending Ardor while receiving fees paid in Ignis.


Hedging

Given the fact Bundlers are the ones paying to include transactions on the parent chain, this means the option exists for Bundlers to provide child chain or dApp users with customized, or even free transaction fees. The owner of the Bundler can then calculate expected monthly transaction volumes, and purchase batches of Ardor ahead of time to cover the costs of bundling those child chain transactions to the Ardor parent chain — it’s essentially hedging on the blockchain.


Flexibility of the “Bundler” Functionality

The basic option for controlling end user fees is to set up a Bundler for all transactions occurring on a given child chain, like Ignis. However, if your business launches an asset on a child chain, you can create a custom Bundler that only packages transactions involving your asset so that you only spend Ardor to support relevant transactions. Perhaps you want to offer reduced or free transaction fees only for transactions involving your asset or monetary supply. You can do that too by learning to set up a Custom Bundler.


How To Set Up A Basic Bundler

Let’s get started with a demonstration of how to set up a basic child chain bundler. Then, we can continue the journey with a demo of a custom bundler option in a follow up guide. Note that you can only run one bundler per account (so if your account is bundling Ignis, it can’t simultaneously bundle GPS or BITS).

Open the Client Wallet and log in to your desired child chain. For this video, I will be going to the Ignis chain but the process is the same for each child chain.

1 jApFgbgnrOQQAD6qn3oD5g.png


Once you are on the Ignis chain, click the gear symbol and select the “Bundler” option.

1 J5Wb5Vq KsNpghgeTBlFOg.png


We land on a page that shows all of the current bundlers and the rates they are charging. You will be competing against these bundlers.

1 STTHeVOU235h S2zA GxcA.png


Click the “start” button in the upper right corner (red in the image above) and a pop up box will appear.

1 qL5ZBma6O0KoQEneUMQdHQ.png


Here you must set the fees you will charge for bundling Ignis transactions. This is an important step — make sure to do your calculations properly. The first box, “Minimum Rate,” is the exchange rate. As of August 2nd, 2018 in the Ardor coin exchange, you could buy 2.41 Ignis for every 1 Ardor. This means you should set your “Minimum Rate” to approximately 2.41 Ignis. Please do your own research before you set this rate — cryptocurrency markets are volatile so you need to do your own research when you are making these decisions. The next box is the “Fee Limit” — this is the maximum amount of Ardor that you are willing to spend to bundle transactions at this minimum rate. Consider the formula below:

Ardor You Pay = Fee Limit + (Fee Limit * Overpay)

The total “Ardor You Pay” has no minimum, but the maximum is your Ardor balance. Again, the market is volatile, so it is a good idea to set small windows of “Fee Limits” bundling at specific rates so that you don’t get caught off-guard by unanticipated market changes. The next option, “Overpay amount” represents the extra Ardor you are willing to pay per child chain transaction to outcompete other bundlers. At the moment, this is unnecessary so just enter 0. But let’s take a moment to consider when this would make sense: bundlers receive the fees paid in native child chain tokens while spending Ardor — so if the value of a particular child chain token exceeds Ardor, it may become economically in the best interest of bundlers to “overpay” with Ardor in order to be the one that receives the fees paid out in that child chain token. This truly creates a competitive free market around the bundling process.

Anyways, we’re just about done here.

1 gqjMOxrF6Bl3auK3mqcJg.png


Take a moment to double check your rates are all correct. Remember to check your math:

Ardor You Pay = Fee Limit + (Fee Limit * Overpay)

As an example, if I change the “Overpay” to 0.1 while maintaining a “Fee Limit” of 100, I will spend up to 110 Ardor. Once you are satisfied with the rates, enter your passphrase, and click “Start.”

1 YR IxM3yy5sB1uLNDWcJ2w.png


Stopping or Updating a Bundler

That’s it. Keep your bundler online and you should be good to go. If you would like to stop your Bundler, you can do so by navigating to the Bundlers section, clicking on “My Bundlers,” and then clicking “Stop.”

1 1sqnMazthV6-vFAn6lgGGw.png


Business Implications of Bundlers

Consider the business implications of this process. Users of dApps and services literally never need to interact directly with the Ardor parent chain. They may not even realize they are dealing with the blockchain at all since fees can be eliminated and customized by the business running the dedicated Bundler. For businesses running a dedicated Bundler, you can track exchange rates and purchase large orders of Ardor when it is most favorable for your financial projections, effectively hedging against day to day market volatility while providing consistent customer experiences.

There are still some issues here though. What if your business launches an asset on Ignis and wants to provide reduced fees for transactions involving only your asset, but you don’t want to waste your Ardor bundling transactions that don’t involve your asset? Or, what if your business has tiered fee structures for different levels of membership? With this basic bundler, you are stuck bundling all transactions of a given child chain.

The Ardor ecosystem allows businesses to build their own custom bundlers to address each of these scenarios. To make the process more accessible to businesses, Jelurida released 5 custom bundler templates in August 2018 that can be interwoven to create complex customized fee structures version 2.1.0e. For a demonstration of how powerful these custom bundlers can be, continue your learning with custom bundlers. The Account Property Bundler allows you to create “whitelists” of accounts so that your bundler only packages transactions from those accounts.