Posted on Leave a comment

How Much Does It Cost to Build a Dating Chatbot Like Zodier?

In 2013, Tinder broke into the online dating industry with its simple innovation — swipe right if you like the person and left if you don’t. The app made browsing through profiles and decision-making simpler. Thanks to such changes, the global dating app revenue continues to grow today, making the market attractive for startups.

If you think that you are now ready to enter the dating app market, we’re here to convince you otherwise. Did you know that you no longer need to develop a dating app to be a leader in the industry? Chatbots for dating like Zodier make this possible because all users need for it to work is a messenger. There is no need to download a separate mobile app; it’s enough to start a dialogue.

In this article, we will tell you how much it costs to build such a dating bot.

Cost to Build a Bot Like Zodier

Our business analysts calculated how much it costs to develop a chatbot like Zodier. Below you can see what they came up with.

Effort (man-hours)
Task

Optimistic

Most likelyPessimistic
Local web server setup245
Database setup456
Source code repository setup234
Configuring frameworks456
Designing of application architecture:
Designing architecture, sequence diagrams8910
Database layer:
Designing, creation of UML model678
Creation of entity tables, indexes, constraints468
Registration / Authorization:
Sign up162024
Persistence & Domain logic layer:
Writing entity classes, object-relational mapping
using Hibernate annotations, adding server validation for entities’ fields
162024
Sorting, filtering81216
Service layer development406080
Geolocation / Localization162432
Payments system integration324864
Telegram integration243240
Bugfixing273849
Total Development Efforts209293376
Predicted Development Efforts (man/hours)209293376
Project Management294153
Quality Assurance (optional)263747
Predicted Total Efforts (man/hours)265371476
Predicted Project Cost$9,275$12,985$16,660
Posted on Leave a comment

How to Develop a Blockchain Wallet App

Blockchain has brought a financial revolution to the world of digital payments. In 2017, Hackspace Capital, a venture fund, launched its own ICO,  and it had an idea to create the Hackspace Capital Mobile Application to make communication between HAC members and its platform more convenient and safe.Hackspace Capital entrusted us with developing a cryptocurrency wallet in Ethereum blockchain to manage HAC tokens.

What does the Hackspace Application do?

The Hackspace cryptocurrency wallet in Ethereum blockchain is an iOS native application for managing HAC tokens. This is the best way to be part of HAC Token Sale Sessions and to manage HAC tokens safely and securely.

The app contains the following features:

  • Balance and transaction history
  • Exchange rates of HAC and ETH relative to BTC and USD
  • A QR code to receive incoming transactions
  • Ability to send tokens to another address either manually or through a QR scanning operation.

1.Login with pincode; 2. Main screen; 3. Receive screen; 4.- 6. Registration and adding pincode; 7. Send screen

Cryptocurrency Wallet Architecture in a Nutshell

This section assumes a basic understanding of Ethereum blockchain wallet architecture. If you are starting from scratch and don’t know what Ethereum is, how it works, or what an ICO is, you will be best served reading the following articles first:

If you already know about Ethereum, we recommend you follow along.

First, let’s look at the following diagram because it illustrates a general architecture of a cryptocurrency wallet in an Ethereum blockchain. The creation of the wallet includes the generation of 12-word mnemonic and derivation private key and address from it. A four-digit code is used for quick access to the account.

A general architecture of a cryptocurrency wallet

To implement this challenge, we used the following technologies:

  • Swift
  • RxSwift
  • Realm
  • Blockchain

Registration and login

To register, we generated a mnemonic code, which is better for human interaction than raw binary or hexadecimal representations of a wallet seed. The sentence can be written on paper or spoken over the telephone.

To generate a 12-word mnemonic we used BIP39, which describes the implementation of a mnemonic code or mnemonic sentence to generate deterministic wallets. We also used BIP32, which allows us to create Ethereum accounts, namely, private and public keys and addresses. For quick access to the account, we utilized a four-digit code.

NOTE: Instead of BIP39, you can use iOS technologies. This reduces the JavaScript code and, therefore, increases your application speed.

Code Example

[code language="javascript"]
// Returns randomly generated mnemonic

window.generateMnemonic = function() {

return bip39.generateMnemonic();

}

// Checks if mnemonic valid, if yes - creates wallet with specified index (default = "0")

window.createWallet = function(mnemonic, index) {

if (!bip39.validateMnemonic(mnemonic)) {

return;

}

 

if (typeof index === 'undefined') {

index = "0";

}

var seed = bip39.mnemonicToSeed(mnemonic);

var hdWallet = hdKey.fromMasterSeed(seed);

var wallet_hdpath = "m/44'/60'/0'/0/";

 

var wallet = hdWallet.derivePath(wallet_hdpath + index).getWallet();

return wallet;

}
[/code]

Main screen

The main screen allows users to check their balance, transaction list, and the exchange rates of HAC and ETH relative to BTC and USD.

To create a transaction list and get the Ethereum balance, we used the Etherscan API, which supports both GET/POST requests and a rate limit of 5 requests/sec.

To get information about our main account balance and tokens, we used Ethplorer API.

The exchange rates of HAC and ETH relative to BTC and USD are carried out using HitBTC API, which is extremely stable and provides an easy back office integration. It is compatible with HFT set-ups and algorithmic trading systems.

Code Example

[code language="javascript"]
// Returns address from account generated from mnemonic

window.getAddress = function(mnemonic, index) {

var wallet = createWallet(mnemonic, index);

return wallet.getChecksumAddressString();

}
[/code]

Transaction acceptance

To receive incoming transactions, a QR code is created. Share the receive address or the QR code with the person sending the digital currency and receive ETH in your Ethereum wallet.

Creating and sending a transaction

We created contracts on Ethereum using JavaScript API web3.js. Under the hood, it communicates to a local node via RPC calls. To work without a local node, we used the Infura service, which provides Ethereum clients running in the cloud, so users don’t have to run one yourself to work with Ethereum.

At this point, we have to create an Infura account and receive tokens to use in the web3js constructor.

NOTE: At this stage you must specify const tokenAddress and const contractAbi.

Code Example

[code language="javascript"]
// Sends token transaction from address getted from mnemonic to specified address

window.sendToken = function(mnemonic, amount, toAddress, gasPriceGwei, gasLimit) {

// initialization (provide our Infura node with token)

var web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io/INFURA_TOKEN_HERE"));

// current wallet

var wallet = createWallet(mnemonic);

// address

var fromAddress = add0x(wallet.getAddress().toString("hex"));

 

// private key

var privateKey = Buffer.from(wallet.getPrivateKey().toString("hex"), 'hex');

 

// nonce

var transactionsCount = web3.eth.getTransactionCount(fromAddress);

var nonce = web3.toHex(transactionsCount);

 

// gas price

var gasPrice = web3.toHex(web3.toWei(gasPriceGwei, 'gwei'));

 

// gas limit

var gasLimit = web3.toHex(gasLimit);

 

// token contract

var tokenContract = web3.eth.contract(contractAbi).at(tokenAddress);

var data = tokenContract.transfer.getData(add0x(toAddress), amount, {from: add0x(fromAddress)});

 

var rawTransaction = {

from: fromAddress,

nonce: nonce,

gasPrice: gasPrice,

gasLimit: gasLimit,

to: tokenAddress,

value: "0x0",

data: data,

chainId: 0x01

}

 

const tx = new EthereumTx(rawTransaction);

tx.sign(privateKey);

const serializedTx = tx.serialize();

 

web3.eth.sendRawTransaction(add0x(serializedTx.toString('hex')), function(err, hash) {

// Asynchronous callback to iOS native environment

if (!err) {

window.webkit.messageHandlers.callback.postMessage([1, hash.toString()]);

} else {

window.webkit.messageHandlers.callback.postMessage([0, err.toString()]);

}

})

}

 

// Service function for adding "0x" to hex values

function add0x (input) {

if (typeof(input) !== 'string') {

return input;

}

else if (input.length < 2 || input.slice(0,2) !== '0x') {

return '0x' + input;

}

else {

return input;

}

}
[/code]

The Result

Working with Hackspace Capital helped us expand and improve our expertise in blockchain-based mobile apps. View the following video to see the results: