Byteball Bot Wars progress report #1 – Monetizing content with Byteball: Error Fare Alerts Bot

in #utopian-io6 years ago (edited)

Intro 

I really like Byteball and I think it is a gem in the crypto world. A small but very honest and active team and community, no ICO and a good attitude of the core dev team with a clear focus on building. Overall it is one of the rare project teams in crypto that are underpromising and overdelivering, which I really like. 

So far I used Byteball from time to time to play around and I have also built some stuff at hackathons and at work with some colleagues and friends (but not in the role of a developer – I rarely program unfortunately, so I am not a good developer). 

I always wanted to learn more and program my own stuff on Byteball, but time is quite limited. At the moment I am on a 3 week honeymoon vacation and I get some time of from my wife sometimes (I have the best wife in the world :))  that I use to learn something new – developing stuff on Byteball :)

It is a nice coincidence that also the Byteball Bot Wars are happening right now, so I decided to participate there and build my own bot. 

Here is the link to the repo for it. 


About the bot 

I needed some time to come up with a good usecase idea that solves a real world problem. When thinking about some of the problems and hurdles of past and ongoing projects, it came to my mind that we could solve something we had as an idea for a hobby project I am running with some friends in our spare time – www.ErrorFareAlerts.com

Error Fare Alerts basically curates content – we find very cheap travel deals and error fares (price errors) by scraping some websites and link to them or write blog posts on deals we find on our own. Also we filter and publish only the best ones. 

The idea we had some time ago was to monetize this project by creating a premium subscription (besides using affiliate deals) to cover the running cost of the business (it is a hobby project, so we don´t want to cover the cost of our time, but our target is to cover the running cost of the GmbH, the server cost and so on). 

So the idea for this bot is to create a paid subscription service, with the benefit, that subscribers of the premium service get deals earlier than subscribers from the free tier. And besides that they will also get some premium deals, free subscribers will not get.  


This is how the bot will work: 

  • A user can add the bot via the pairing code into the contacts of his Byteball wallet. 
  • The Bot has a deposit and withdrawal functionality, that means a user can deposit Bytes and withdraw them.  
  • Deposited Bytes are used to pay for every deal (0,03 Euro per deal). The subscriber will get the link to every deal via the Chat interface of the bot.  
  • If there is not enough money deposited, the user will get a notification in the wallet that he missed a deal, because he had not enough funds deposited. If there are enough funds the user gets a notification and the link to the deal is posted directly in the Chat window. 
  • ErrorFareAlerts is running on a Cloud Platform and every new deal is getting posted into a database. So we can subscribe to a notification service that gets every new entry that is made into this database.  

Outlook – similar usecases 

I think the bot can finally also serve as a template for similar content curation businesses and newsletters, that want to monetize their content. Also you could monetize API calls with the same structure.  


What has been done so far 

I mainly used the little time to read the developer resources, which are very well written!
Thanks to Tarmo and Evgenii! 

Then I got my first ping-pong bot running locally via the newcomer tutorial.  

I checked out the sourcecode of a lot of other bots in the byteball github.  

And as I played around with the dice-bot https://github.com/xJeneKx/dicebot in the past. It came to my mind, that it also has a deposit and withdraw functionality.  

The code I have so far is mainly consisting of the bot-example from the newcomer tutorial and the dice-bot. I deleted the parts that are not needed and already changed some text to represent the bot I am building. Also I changed the database structure a little bit. 

What the bot does so far: 

The bot is working locally and is sending a greeting message after pairing.  

It has some menu points:
About, How to buy Bytes, Deposit, Withdraw, Referral program and Terms of Use the user can click on.  
And it is showing the current balance of the user. 


  1. About  
    Gives again the text of the welcome message. Working functionality.


  2. How to buy Bytes
    Text instruction on how to get Bytes. Working functionality.   


  3. Deposit
    Here you can Deposit money that is consumed for new deals. Working functionality.   


    When clicking on "1mb":  


    Clicking on the Payment request opens the prefilled send window:  


    After clicking on „Send“ it confirms the payment and waits until it is stable.  
       

  4. Withdraw
    Here you can withdraw the money again, if you don´t want to use the premium subscription service anymore or pause it, as you, for example, already booked enough deals for the rest of the year :)
    Working functionality.

     
    When clicking Yes:  


    Transaction history proves that it worked:   


     
  5. Referral Program
    This is not yet implemented, but it will also mainly use the dice-bot functionality, which also has a referral program. If you refer new users to the premium subscription that spend money on it, you get 20% of that money.   

  6. Terms of use
    Legal stuff to exclude liabilities, borrowed from http://freebe.byte-ball.com/ :)


Learnings so far 

#1
First of all I have learned, that developing in Byteball is very easy thanks to the great ressources they provide e.g. at https://developer.byteball.org/ - it is very easy even if you are not a programming expert, like me. 

#2
Getting the bot-example running on the test-net was a little challenge, as I have to manually change some stuff when running on windows. This was not stated in the developer ressources but Evgenii helped me out very quickly on https://t.me/devbyteball. Here is the solution, if you run into the same issue:  


So in the node_modules/byteballcore/constants.js „Set version“ hast o be changed from „1.0“ to „1.0t“ and „alt“ from „1“ to „2“. In the conf.js „hub“ had to be changed from „byteball.org/bb“ to „byteball.org/bb-test“. Finally, the pairing code that is printed needs to be changed in an way, that you replace the „*“ by any number (pairing secret). 

#3
I got the bot-example https://developer.byteball.org/tutorials-for-newcomers/ping-pong-paymets running, but after that I decided to switch to the live net for development. Confirmations are faster there and the fees for a transaction are ~0,00002 EUR only, so it is easier and cost you next to nothing when you develop on the live net. 

#4
Combining the bot-example with the dice-bot code I faced some challenges with finding the database. I wasted quite some hours to find where the database is located. I googled a lot and searched in the project folder. The solution at the end was very simple, as the database location is getting printed in the cmd after you start with „node start.js“.  


Having never worked with sqlite I also learned how to make changes in the database like inserting new tables. There are plenty of guides you can easily find on the internet like this one. Working with sqlite seems to be quite easy. 

#5
Finally when I had everything running I decided to publish it on github. Learning here: I should have done that from the beginning, so that all changes and commit messages and forks are tracked. On github I created a new project and connected it with sourcetree for management. It would have been easier and would have cost me less time when I directly would have worked on a fork of the bot-example and dice-bot with git.  


What´s next

  1. Create dummy DB and setup a stream and push functionality so that I get a notification for every new Error Fare into the Bot for testing. 
  2. Change the code of the bot so it pushes the notification to the chat every time a new error fare comes. 
  3. Change the code of the bot so that it only pushes deals into the chat if the balance of the user is enough and reduces the balance after each sent link. 
  4. Change from local environment to hosting the bot on a VM. 
  5. Add referral program. 
  6. Dynamic pricing (at the moment price is hard coded, maybe I will change that, so that it is stable in EUR and dynamically generates the needed Bytes). 
  7. Publish in Byteball Bot Store :)

If I want to survive my honeymoon vacation I don´t think I get it all done during the timeframe of the Great Byteball Bot Wars, but I hope to get point 1 to point 2 done until the Bot wars are over at least. If you don´t hear back from me I spent too much time on building this bot and my wife killed me :D   


Ressources 

 Git of this bot:
https://github.com/AnGrYxx/efa-bot   


Thanks to

  • Evgenii from BIOT https://biot.ws/ 
  • The Byteball Community and team
  • Rui Lun Tran  
Sort:  

Thank you for your contribution. A great contribution in terms of explanation and what you have done. Few things, it's better not to add the node_modules inside the GitHub because any way you can get when you run npm install. Your most of the code is written on the first commit, it's better to divide those into smaller commits. great start, would love to see more contributions from you.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for the review @codingdefined!

Totally agree, that I did too much into the first commit, as I tested around locally with it, already included that in the lessons learned!

As of the node_modules I will see how I can exclude it in sourcetree :)

Thank you for your review, @codingdefined! Keep up the good work!

very nice write up! definitely bonus points for the honey moon factor

its basically the use of micropayments, which might be where byteball gets traction as visa, paypal etc cannot be used in this manner

I like the model of topping up too, its basically like a recurring subscription that you control.

Thx, Paul ;)

Yes, I think this is a sweet spot for Byteball.
There is so much content, newsletters and APIs out there to monetize.

Also for the user it is like zero risk, as they can stop subscription at any time and withdraw funds in this model. There is no minimum 1 year usage or whatsoever like in other subscription models.

I didnt realize you could withdraw funds in this model. So when the person buys credit, where are these bytes located so that error alerts can take them?

Hi @angr!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @angr! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @angr! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post
You received more than 10 upvotes. Your next target is to reach 50 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Hey, @angr!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.22
TRX 0.20
JST 0.035
BTC 91285.68
ETH 3152.90
USDT 1.00
SBD 3.09