Can we provide liquidity to the Uniswap pool from an address other than the admin address - ethereum

I've created a pool (https://app.uniswap.org/#/pool/8286) on mumbai testnet of polygon mainnet. Our functionality include adding liquidity to the pool from the user's account so the users' might come and provide the liquidity to the pool, after which supposedly they should get some lptokens depicting their holdings in the pool. And the user would be able to stake those lptokens.
So for the run down I was testing with my second account on metamask.
Question: 1. Earlier there used to be an option on the top right of the pool that allowed us to directly add liquidity to the pool from the uniswap's interface itself. That option seems to be available only to the owner of the pool now. Does any one know why?
Question: 2. Since the add/remove liquidity option was missing from the uniswaps interface I created my own interface integrating the uniswaps SDK to add/remove liquidity. So when I provided liquidity from my second account. I didn't got any lp tokens? Do you know why? Liquidity in the pool has increased though.
I've provided the link of the pool for your refrence, remember the pool is on mumbai testnet. If possible please help!!
Thanks In Advance!

Related

get all ERC-721 transfer event happening in real time using alchemy api

I am trying to get all the ERC-721 transfer events happening on Ethereum block chain.
what will be the from and to address in this case
can some one please clarify,
Thanks.

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 to create tokens in ethereum without using cyrptocurrency?

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.

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.