I just happened to come cross GSN and I wanted to know if it’ll be more expensive for the contract owner…?
Why is it a better idea?
Hi @asmeedhungana,
Adding logic to a contract to support Gas Station Network increases the size of the contract and hence the cost to deploy.
With regards running costs, someone needs to pay the gas for transactions. If that is the dapp developer, then this increases their costs.
The reason to do this is to minimize onboarding & UX friction for dapps.
Requiring users to use Ether to pay for transactions can be a huge hurdle and limit the number of users who even try your dapp.
There are two versions of the GSN:
- GSNv1 : Use in production now (though you may want to run your own relayer on mainnet to ensure availability).
- GSNv2 : In development at OpenGSN.org. See Doubling down on security for more details.
Assuming you are just getting started and depending on your development roadmap, you could look at the upcoming improvements in GSNv2. I suggest joining the OpenGSN telegram to get the latest news on GSNv2 development and timescales.
ohh… alright! will surely look upon 'em…
Would you prefer it for a casino or gambling or betting game?
do the existing one use GSN or make their users pay? What about most of the dApps developed in the mainnet at the moment?
Hi @asmeedhungana,
I think most dapps could benefit from providing gasless transactions to new users.
For a game, assuming a token was being used, then I would suggest providing gasless transactions to new users.
If Ether was being used for payments in the game, then users would already need to have Ether to play.
An example of the gas station network in use is:
Reddit is experimenting with community points using ERC20 tokens on Rinkeby
Though this is on Rinkeby rather than mainnet.
Hmm… that’s true! So all this is basically to get more people to start using our dApps although they’re unfamiliar with cryptocurrencies or aren’t already involved with trading them… they need to have a metamask account though, is it?
Hi @asmeedhungana,
Yes, it is to remove barriers for users to use dapps. It doesn’t have to just be for new users, especially if the system they are using uses tokens.
A user needs a private key to sign messages, though this doesn’t need to be stored in MetaMask.
why do you say that? why does a token system get more benefitted from this?
actually, I've only just gotten my hands onto a small token project using oz's ERC20... I'm just analyzing it... if its a thing that I could benefit from, I'd surely love to dive in deeper! It was just out of curiosity that I'd been asking you these questions till now!
Can you send me a link of a goof tutorial as well as some good example contracts to implement GSN... and i want to make it upgradeable... so...
Btw, I think the upgradeable smart contracts for ERC20 are from older versions and I wanted to implement it for some newer ones... What is the latest implementation in oz library?
Does oz cli's latest versions work with older solidity versions?
Hi @asmeedhungana,
Imagine you want to get a new user to try out your game.
If using tokens and the GSN you could give the user a small amount of tokens to start so they could immediately start playing. If they like it you could sell them tokens so that they could play more.
Without the GSN, if they don't have any Ether, they would need to purchase from an exchange, which likely has a KYC/AML process which results in them having to provide government ID and potentially photos of themselves holding up their ID. This process could take hours or days. The user would then need to come back to play your game. This is a huge hurdle for new users.
For GSNv2 you could look at the MetaCoin example: https://metacoin.opengsn.org/
For learning about upgrades see the Learn guide Upgrading Smart Contracts
The latest version of OpenZeppelin Contracts Ethereum Package is 3.0
OpenZeppelin CLI works with Solidity 0.5 and Solidity 0.6. I am not sure about Solidity 0.4.
If you want people to start playing your game, you need to make it appealing and attractive. Many people love gambling, so it's very easy to get them into such games. Suffice it to say that poker tournaments are held.
The ability to read the opponent is the main advantage of experienced poker players. And each player should be well aware that the information to read him himself. It is worth carefully watching the game of a particular player to understand some of his characteristic features. I play on the platform 1x bet login. Here you register and you can try your luck!