Inspiration

We wanted to provide users with an alternative to paying micro-transaction fees every time they interact with a dapp.

Our solution applies research done by Sweetbridge and BlockScience 1 on "Discount Tokens" in the context of a public POA sidechain. With a Discount Token we are able to offer users the ability to hold a token instead of paying transaction fees--while also providing a means for users to benefit from increased adoption and network utilization.

What it does

We have implemented a POA Ethereum network using Parity and Aura consensus. The sidechain is public and uses gas to moderate transaction inclusion.

A discount validator service is deployed and granted authority to manage an on-chain certifier contract registered in the chain as the service_transaction_checker used by Parity's built-in transaction permission system. The discount validator monitors transactions and gas usage, and authorizes and de-authorizes accounts as their gas usage exceeds their discount allowance.

To determine discount allowances the discount validator defines a discount period (e.g. 7 days) and aggregate discount value. For each discount period, the aggregate gas used in the previous period is used as an estimate for the gas that will be used in the forthcoming period, the aggregate discount value is multiplied by this amount and split among discount holders. For a given user and period, the user's discount allowance can be described by the formula aggregate_gas_usage * aggregate_discount * (honey_balance / honey_supply) * min_gas_price .

At the end of a discount period, all discount allowances are recalculated and reset. Users may not accumulate or roll-over their unused discounts to future periods.

The discount validator provides an api which can be accessed by signing providers like Frame in order to show the user their current discount balance, and allow the signer to automatically utilize discounts when they are available. We have provided a patch to Frame to provide this functionality and illustrate how it could be implemented in other signing providers.

What we learned

We like the approach of using a sidechain in order to provide a bit more control of the overall user experience, and we think that using a discount token model may help us reduce the under-utilization of applications by minimizing the mental overhead of performing micro-transactions on every button click and instead encouraging users to maximize the utility of their discounts by being more regularly engaged in decentralized applications.

We also think that application of the of discount token model to transaction fees may also be attractive for option for developers seeking to onboard users using meta-transactions, as the model minimizes the risk associated with paying for transactions on behalf of users during the on-boarding process.

What's next for Flora

We would like to explore additional infrastructure options that are or will be available for EVM side-chains in the the near future. We are interested in exploring if we could use a similar model on a service like Skale, but benefit from the increased security of a random set of staked validators rather than simply a curated set of authorized validators. We would also consider how such a model might be leveraged in an application specific chain like Cosmos.

Additionally we would like to set up some supporting infrastructure like Bridges to Ethereum mainnet, provision a block explorer, and update the certifier contract so that the discount validator can be controlled by discount token holders through an Aragon app.

Built With

Share this project:
×

Updates