How to create an ERC20 staking app

preview_player
Показать описание
In this video, we'll go over how to create an ERC20 staking application. This app will allow users to stake a token and earn a reward token in return. We will cover deploying the necessary contracts for the ERC20 tokens and an ERC20 staking contract. We will then build our own staking application to allow a user to stake, unstake, and claim their reward tokens.

**Mumbai testnet support has been officially deprecated. Transition to the Amoy testnet for improved scalability and reduced gas fees.**

Smart contracts:

Timestamps:
00:00 Introduction
00:55 Demo of app
03:00 Create Stake token contract
05:15 Create Reward token contract
06:07 Create ERC20 staking contract
08:21 Set approval and deposit reward tokens to stake contract
10:35 Setup staking app
13:45 Navbar
15:22 Check if wallet is connected
16:46 Stake token info
20:30 Reward token info
22:25 Staking. unstaking, and claiming rewards
33:05 Conclusion
Рекомендации по теме
Комментарии
Автор

Thank you for watching! Be sure to leave a comment with what you'd like to see us build next. 👇

If you haven't already, hit the subscribe button to be notified every time we drop a web3 development tutorial. 💫

thirdweb_
Автор

My friend I did everything you taught me and it worked, you are a great teacher and web3 master. Thank you

sinicvukaj
Автор

this looks amazing! what I have been searching forever. Will rewatch tutorial at home and start a test this weekend!

aviationjunkie
Автор

Is there any possible negative outcome from removing the require that enforces the rewardToken != staking token?

whitehh
Автор

why cant the reward token be the same as the token im staking

benhub
Автор

Is there a way to use the staking contract to set a set APY insted of token per unit of time ?

VoiceHole
Автор

if you guys built an embed for this app it would be so helpful

benhub
Автор

Hello and thank you for this tutorial. Is there any way I could contact the dev team

dvrk
Автор

Hello, good afternoon, the videos are excellent, is there a video or guide on how to do it, for example, charge users in usdt (erc20 token) and give them their earnings in token (erc20) I have a custom contract for a lottery but the ticket price values ​​are always considered with the main currency of the network where I display the contract. how can i tell you The contract that I want to charge in usdt and the prizes in usdt, any guide or light on this?

jozmat
Автор

very nice and usefull, can i display the staking pool?

lux
Автор

Why staking is not working in live server? it shows error "getActiveClaimConditionId" function is not found in your contract

mohameddhanish
Автор

Great video. Do you know if it's possible to add any additional configurations, such as a time multiplier? I also want to create epochs with a fixed reward pool for each epoch. Is this possible with ThirdWeb ERC20 staking app?

TokenizationInternational
Автор

is it possible to set up staking contract but give out weth as rewards? also the weth would have to be distributed proportionally to stakers

gijigivia
Автор

hello, what is the name of beautiful terminal you used at 11:28?

peterpham
Автор

Can this dapp be deployed/hosted on IPFS and if so how can I do it

sinicvukaj
Автор

Can you show how to implement a logic so stakers can withdraw their tokens 30 days after their initial stake please!?

tzaff
Автор

yarn dev command not working in 13:41
please solve this

nuremon
Автор

can we use a lp address for the staking token?

ricardofeliciano
Автор

I tried this on Pulsechain blockchain and though the app works but after connecting wallet i am not able to fetch staking or reward info and also wallet cant show PLS balance. VS threw and error on fetchstakeinfo and react during deploy

uyiedos
Автор

How do you know what the value of the tokens is, as in USD?

andresborges