How to create tokens in ethereum without using cyrptocurrency? - ethereum

I am new to blockchain. I have read that tokens are created using smart contracts in Ethereum. Smart contracts need ether to be created. Is there anyway that I can create tokens without using ether or any other cryptocurrency?

No there is no way to do this. This is an essential component of the Ethereum Blockchain as it prevents a DDOS like attack on the network. Think of it like this: if there was no cost involved in deploying a smart contract someone could just spam the network and create billions of smart contract. Very quickly the entire network would collapse.
However there are ways to get a little bit of free Ethereum. For example you could use a faucet which will distribute a little bit of Ethereum. Usually these faucets distribute Ethereum for testnet versions of the Ethereum network.
For example take a look at the Rinkeby testnet. They have their own faucet which will allow you to get a little bit of Ethereum for testing purposes.
There may be faucets which work on mainnet. However keep in mind there is no such thing as a free lunch. Someone somewhere will eventually have to pay the bill.

Related

What is difference between Binance Smart Chain and Ethereum network?

I want to create a bsc( binance smart chain) but strangely, In official documentation, they create a network by geth only. then I was really confused. What is difference between bsc and ethereum network? Thanks.
I want to create a bsc( binance smart chain) but strangely, In official documentation, they create a network by geth only. then I was really confused. What is difference between bsc and ethereum network?
Binance Smart Chain forked GoEthereum (geth) software developed by Ethereum Foundation and many volunteers. This can be considered a hostile fork, as Binance does not seem to contribute back to the original geth, does not support geth maintenance or does not support any of the development communities (web3.js, web3.py, etc.)
Binance changed some geth parameters from the Ethereum mainnet, like block size. Also the transaction fees are artificially kept low, causing the network being unstable and hard to use for developers. Thus, BSC does not achieve any of decentralised qualities of blockchains.
Binance and Ethereum Foundation do not co-operate.
Most of the Ethereum software develop tools are compatible with Binance Smart Chain, as the EVM virtual machine is pretty much same (Binance has not done none of innovation or enhancements, the official statement of "significant changes" is questionable.) However, support for Binance Smart Chain is way worse, as Binance do not have active developer community and most of the Binance Smart Chain developers leech their information out from Ethereum support forums.
According to Binance's official faq:
Binance Smart Chain (BSC) is a hard fork of the Go Ethereum (Geth)
protocol, and as such, shares many similarities with the Ethereum
blockchain. However, BSC developers have made significant changes in
some key areas. The largest change is BSC's consensus mechanism, which
allows for cheaper and faster transactions.
Source: https://academy.binance.com/en/articles/binance-smart-chain-vs-ethereum-what-s-the-difference

Can I use an existing (deployed) contract on ethereum mainnet instead of deploying myself? (NFT)

I'm trying to learn how to mint NFT's in an economic way. I have some experience with smart contracts but it's a while ago. I have looked for an answer to this question but could not find it.
I have deployed this contract on testnet: https://github.com/0xcert/ethereum-erc721 and created an NFT by interacting with the contract.
Deploying the contract is very expensive on main-net, much more so than interacting with it.
Now I was wondering: isn't there any deployed contract on mainnet already? That I can use to mint an NFT?

What exactly (technically speaking) is Ethereum blockchain enabled website?

There is some hype about DeFi and it goes basically to Ethereum
(I have not seen yet other non-Ethereum blockchain that prmote DeFi term usage).
Then there is MetaMask that is essential a wallet distributed as Chrome browser plugin.
But some blockchain site specifically require MetaMask and establish some communication between.
I know Ethereum, but it is blockchain and basically backend technology.
I think is has nothing to do with browsers and websites.
What exactly (technically speaking) is Ethereum blockchain enabled website?
Or other way round, how exactly MetaMask is to interact with website visited?
How websites interact with the MetaMask extension
Metamask extension injects the ethereum property into the JS window object. This property links to the JS API of the Metamask extension, allowing the website some level of control - such as "open a window requesting the user to submit this transaction" (but not "get the private key" for example).
This example JS code opens the Metamask window and asks the user for permission to share their (public) addresses with the website, when the myBtn is clicked. The shared addresses are then saved into the accounts variable.
$('#myBtn').click(async (e) => {
let accounts = await window.ethereum.request({
'method': 'eth_requestAccounts'
});
}
You can find more info at https://docs.metamask.io/guide/getting-started.html#getting-started
Basically in a decentralised application (DApp) the HTML frontend directly interacts with the blockchain without going through a web server. This is done with a wallet, existing independently from the DApp, confirms all the transactions. Any sent transaction goes directly from the frontend to the Ethereum blockchain through a JSON-RPC API node (see link for the request round trip description).
The main differences to the centralised web applications using server-side backend
The backend developer cannot break the terms of the (smart) contract, e.g. steal users money into his own pocket. This is called non-custodial model and it mitigates counterparty risk.
Backend cannot pull money or make user to do something they cannot accept, because wallet confirms all the transaction. Users, or their sophisticated representatives, can double check all smart contracts the wallet is going to interact on a blockchain.
Blockchain never goes down, unlike centralised services, because it is highly distributed (10,000 nodes)
User pays for all the transaction themselves using ETH as the currency for the transaction fees.
Note that the model is not exclusive to Ethereum, but also used by many other blockchains. Live DeFi applications can be found e.g. on EOS, Solana and NEAR blockchains and many Ethereum Virtual Machine compatible chains like Polygon, Avalanche and Binance Smart Chain.
Note that currently most users still need to trust the HTML code downloaded from some centralised web server. We have seen e.g. DNS takeover attacks in the past. However, this still greatly reduces the risk, as any "sign-in" to a web application does not automatically put the user in risk, as wallets still need to confirm any transaction.
Also note that blockchain makes little sense for applications that do not involve financial assets or other assets with value, like NFTs, because the main use case of a blockchain is to solve financial sovereignty and eliminate counterparty risk. This tradeoff comes with high transaction costs and the need of some sort of cryptocurrency.

How does Ethereum Smart Contract work on Mobile Client

I want to deploy a smart contract on server and interact with it using mobile client. I'm not familiar with how does that work but after some research, I found something like below:
If we compare communication through web services in mobile client, then pretty much everything is same expect in Smart contract, is no database or deployment service as the result of decentralized nature of the system. Is that right? We can connect mobile client to smart contract using some library like web3 which would essentially work with Json RPC or websockets.
But what if I don't want to connect each mobile client to smart contract using library like web3? Instead, what if I want to have a HTTP server and then it would connect to smart contract like below?
Is that possible? If yes, then how can I do that?
My second question is regarding deployment. In the centralized server scenario, I would have database deployed on some service like AWS etc. I could estimate the deployment cost. I understood that we have to deploy smart contract on Ethereum mainnet which will cost some x amount of Ether. But then I found out that my users will have to pay for each computation. What if I want to bear all the costs? How can we estimate such costs?
Instead, what if I want to have a HTTP server and then it would connect to smart contract like below?
You certainly can do this, some might argue a layer of centralization is added by placing a web server between the DApp and blockchain, but I would disagree. If you want to do this, your DApp would simply call a REST API on your web server which in return would utilize web3.js (node.js), web3j (Java), Nethereum (C#/.NET) or any other flavor of Web3 to interact directly with the blockchain.
What if I want to bear all the costs?
You will only be able to bear the costs of deploying smart contracts which are deployed on your behalf and not on behalf of any potential end-users.
How can we estimate such costs?
You can estimate the gas cost of a contract deployment or contract interaction via web3's estimateGas method. Understand, this cost can be largely effected by how well structured your Solidity smart contract code is written. Note, this is of course also only an estimate as users could always expend more Ether to have their transaction confirmed quicker or the state of the data within the smart contract could change over time requiring higher gas costs (i.e. iterating a growing array). For more information on gas costs within the Ethereum mainnet, you can take a look at ETH Gas Station.
As a side note, since I do not know your particular use case for blockchain technology, it could be helpful to weigh out whether or not it makes sense to utilize the Ethereum mainnet or to spin up your own private Ethereum blockchain. With the latter you would completely avoid having to spend any Ether to interact with blockchain network, but you would likely have additional overhead.

working of Ethereum based chat Applications

I am new to Ethereum, Blockchain Technology.I have been going through Tutorials on Ethereum and Smart Cotracts.
As per my Understanding, If we want to make any change to data members of the smart contact, it ll cost us some Ether right ? so , i am wondering how Free chat DApps work?. I mean, it should cost ether for storing the data of chats and transaction of data right ? or are they using any test networks such as kovan,rinkeby ?
Thanks in Advance
In addition to other answer, I don't think so your referenced Apps are using Ethereum blockchain to save chat messages as it always requires Gas to add anything in a public Ethereum blockchain network. To integrate chatting in your App you can use XMPP Framework.
Obviously you require to have a centralized server (Against the blockchain basic terminology) But chat history is not required to save on the server. It can only be saved on Users Device and can use end-to-end encryption. Server will only be required to implement socket-based communication by using XMPP framework. Or you can also use Firebase Realtime Database for a chat. But I totally agree it's against the basic blockchain rule of decentralization.
If you are using the public Ethereum blockchain it costs Ether to change data. It costs money to get these Ether so a Free chat on this network seems unlikely.
If you are using someone's private Ethereum blockchain it costs Ether to change data, but Ether has no value and can be given more or less easily (like Rinkeby).
If you are using your private Ethereum blockchain it costs Ether to change data, but you can get Ether easily at genesis block or mining Ether.
If you are using a private Ethereum blockchain like Quorum with GasPrice=0, you don't need Ether.