How to make a Stablecoin | Foundry Full Course Excerpt
2023 ж. 2 Мау.
25 451 Рет қаралды
How to code a stablecoin.
Code: github.com/Cyfrin/foundry-def...
If you don't understand this video, wait for the course to come out!
Links found here:
• Video
Foundry full tutorial coming soon...
✅✅ Donate ✅✅
I use donated funds to spend money on making fun & informational videos.
ETH/Polygon/Avalanche/EVM Chains Wallet address:
0x9680201d9c93d65a3603d2088d125e955c73BD65
😸😸Follow Patrick!😸😸
Cyfrin: www.cyfrin.io/
KZhead: www.youtube.com/@PatrickAlpha...
Twitter: / patrickalphac
Medium: / patrickalphac
TikTok: / patrickalphac
Twitch Stream Uploads & Shorts: / @patrickalphac-alt
All thoughts and opinions are my own.
In a time when people prefer shorter content, I truly appreciate a 5-hour expert. I cannot wait to dive into the Foundry Monster course! Thank you, Patrick; you are a true legend! 🐐🔥🚀
Totally agree 😊
Man, the sheer work you put into your content is phenomenal. Thank god for Web3 creators like you Patrick, you inspire me!
Man... you nailed it again... Last year this time I started my journey in Smart Contract Dev by watching your mind-blowing 32 hour course. And, now you dropped another bombshell with this teaser. ❤ More power to you Patrick. Can't wait for the release of full course...
Oh just you wait
Hope you landed a job in the industry.
Unreal timing Patrick… I printed out your two minimal DSC (engine + ERC20) contracts from the “defi-minimal” repo a few days ago to study them… can’t wait to do this one. 🔥
Aaaaand there goes my Sunday lol thanks Patrick 🙏
Thanks for making this course and free, your courses are far more indepth than most paid courses.
You are maybe the greatest web3 hero out there. Definitely more heroic than Vitalik. The way you explain things is crazy good 👍 thank you!
I'll never be able to contribute half as much as Vitalik. But I'm very grateful for your compliment :) If I can give the world even a quarter of what Vitalik has given the world, I can die happy,.
Can't wait to see the full course!
Yes! Been following this Repo waiting for its sweet release. 🎉
Thanks a lot for wonderful tutorial :) I was good lesson all at once in one place, good work 👌👍
You are da MAN. One of the few pros worth following after and invest time in the materials they release.
Man, You are so good🤯 Keep going👏
let's gooo! thank you for this.
I just completed this project. Though I am 1 day late than the date I anticipated but I can't share HOW HAPPY I AM. I learned a TONNN
in case any of yall missed it, you can control click the inherited contract name to inspect it. can be very useful, when tracing logic within in a smart contract on the fly.
Great job Patrick
wow awesome content i learnt so much more watching bro! thank you!
THanks for creating this video and uploading it for free, it learned me a lot about the whole process and what to do before I get an audit of my contracts :)
Boom!!
always learn a lot from your videos. you are my champ !
Great video! Thanks for the amazing content. Your coding speed is really good, and the VSCode extensions seem to help out a lot. Would you mind introducing them? I am using many auditing extensions e.g. ETHover. But yours seem much better. Of course, the tools for developing and auditing are different in certain aspects.
Yes!! In my coming full course I will introduce them.
Thx for helping so many people in the world!
Came to drop a like, comment and let you know that you are amazing. Thank you for the content and so interested to build a vyper course with you.
Ty Fren :)
Finally it is out,,, thanks man,,
nope, just a teaser lol sorry
Yes yes & YES !
Thank you 🎉
Best teacher in the planet
Thanks for great content ❤
Ser Thank you very much!
love you from Pakistan ❤
Thank Patrick, Next Tutorial is on how to create Pricefeeds in Chainlink
Love the new lights
ty fren
Thanks!
Let's go 🔥🔥
top level content
you dropped this 👑
👑 You too ser
OMG Patrick you are the best
I am having really hard time with foundry not able to work with it still I am not giving up on it will definetly get ease in it when I will use it more thnks to you for giving a treasure to support
Amazing content, @Patrick. When is the full content going to come out?
Once my computer decides to cooperate... I was hoping Monday... but... tomorrow???
Can you share your engineer journey someday? Really want to know how you become such a great dev
This is it! kzhead.info/sun/mJWHZMWPgHyDgWg/bejne.html
Let's do it all 💪❤️🔥
I promptly did some research on Monica’s past. She can control herself well. Her credentials are solid, and it seems like she was the subject of a careful examination. Foreign investors from countries other than the United States can also use her services
hername is Monica Payne Tutorials, cant divulge much. Most likely, the internet should have her basic info, you can research if you like
Patrick Collins the legend
Hi Patrick. Some of the links that you said would be in the description seem to be missing. Like the RAI link for example.
Ah sorry! I’ll update. kzhead.info/sun/nqh8oc2Sm2aunoE/bejne.htmlsi=BmAWVFGX_kz_JoNo
Updated
A good stablecoin is a #1 priority
4+ hours is an excerpt ? The full course must be massive!
It’s 27 hours :)
will the course be on youtube or teachable?
Hey patrick how does the liquidator burn the dsc of another user i didnt get it? How he can transfer dsc from user's account to address(this) what if the user doesnt have dsc in the wallet he bought or he moved it to another wallet? plus he didnt approve the liquidator to do that..
Good q! The liquidator doesn't burn the DSC, they burn their OWN DSC and in return get the collateral of the person being liquidated.
yeh cool ... plus i have one more question would the liquidator manually check addresses' health factor if they are at risk of liquidation?Or how would he know which addresses are to liquidate , their could be thousand of borrowers on protocol @@PatrickAlphaC
Wait is over ❤
Not yet
Can we take Collateral from a centralized banking system(in USD) that is always the same, so we don't need to worry about Liquidation? 1. Is it possible? 2. If it is possible how can we do that?
1. Yes. But you'd still need to worry, banks fail, or they could rug you. 2. USDC, PayPal, Tether all already do this.
The best way to earn Stablecoins is to trade them to USD using a special software. This is a surprising, but scientific fact.
Thanks for the great content patrik, just wanted to ask if it is possible to make a stablecoin that inherently takes its own value as a gas fee?
What do you mean
Take example of TRC 20 USDT that runs on Tron chain, in order to make the transactions we would need trons as a gas fee, is there any possibility to make a stable coin that takes the gas fee from its own value and runs the chain while completing the transactions?@@PatrickAlphaC
🚀🚀
my fren if the excerpt is 5 hora , full course is how longa?
what is the best practice to use revert or require statements for transaction reverts
as of today, always use revert. Revert at the moment is more gas efficient.
Where did the foudary file and other folders in this repository come from? I can't understand please explain
This is a bit advanced. If you're looking for help, watch the most recent course deployed on my channel!
@@PatrickAlphaC ok thank you!
is DAI really premisionless? it's controlled by centralized entity what can mint and burn whenever they want
It has a DAO... but a a few people own the DAO tokens
Let’s get frogging
Can Solidity Provide an Alternative to JS and JSX for Developing Front-End UI Components in the Future?
Maybe!
Can we get any project that combines ai and BlockChain like decentralised ai
Awesome as usual pattrick. Can you again lead the python Devs in Web3. There's no eth-ape tutorials, And many pythonistas are forced to learn JS. We can do basic JS however python Devs should have their own ground to up levels field of Blockchain and actually python should too compete. I was so much into brownie but then it's not getting updated
Working on it fren
I liked brownie last year more than hardhat to be honest. I don't get why Hardhat is more popular than Brownie, except maybe that you could theoretically reuse JS code in the front end and writing tests in Mocha is amazing, nicer than Pytest. I am trying to be a full-stack dev by the end of the year and then Patrick Collins now wants to kill me with another mammoth course LOL :) Feburary Last year I did the brownie one, February this year the hardhat one:) Thanks to you me and my client have build smart contract for a decentralized 3commas, which will be a lot simpler use learn, and poeple will be able to use their metamask :) Started the project with a poc in Brownie last year, The build the backend, then this year built the proper smart contracts in Hardhat :) I am really greatefull for your courses and all the work you do for the community.
@@robertmazurowski5974 you are right. Python also has superb resuability but there aren't lot of materials for python Devs to start and publish modules or packages, most frameworks are quite different from each other. JS have good re-usability allowing Devs to create further variants of existing frameworks. Plus the ability to work on both frontend and back-end via node environment, there's just too many active JS Devs
much appreciate your content your amazing thanks a lot but here is an idea leave a LINK to your SLIDES it can help to recall much better afterwards 🤑😘
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🐸🐸🐸🐸🐸
I believe a good stablecoin should be algorithmic, not governed by any DAO or any human interference, but ideally not backed by anything no creditors and debtors needed to keep peg stability. No second token in the system only one token. The algorithm would automatically create more supply or burn supply if needed based on a chainlink oracle for instance to maintain a $1 dollar peg although yes I do agree perhaps eventually it could be pegged to something else perhaps a basket of a price of several basic key goods
Great! Please make it. How do you prevent it from doom spiraling?
What plugin are he using to autocomplete in Solidity?
the hardhat VSCode extension
Great video. Does anybody know how youre supposed to find positions to liquidate?
on this stablecoin? This is where you'd have to monitor health factors off chain
@@PatrickAlphaC Yes I mean when this is deployed and up and running in the world I was trying to figure out how a liquidator would find the addresses and debt To Cover so they could liquidate others. Off chain you could have a server that stores the addresses to show the unhealthy positions on a web app maybe?
@@timothynash4585 you'd use something called an "indexer". Every time someone deposits liquidity, we emit an event. A server would listen for these events, and upload a database with data from the events, and the a bot would trigger if they see someone in the DB has a bad health factor.
🐸!
Hello, thank you for your work, but when trying to load it into remix it doesn't work, it gives many errors, could you give us the complete code for remix? Thank you.
You’ll need to learn to move off remix :) Check out Cyfrin Updraft to learn all the prerequisites from this video
@@PatrickAlphaC Hello again, thank you for your response, I don't know what "Cyfrin Updraft" is, where could I find information to have everything giaul that you have it in the video and that it works? :)
@@Ernestuchokaos Boom updraft.cyfrin.io/
Can you make a stable coin pegged to the average of all world currencies?
Yes! You’d just need a data feed for those
@@PatrickAlphaC Awesome, thank you!
@@PatrickAlphaC Awesome, thank you!
Videos should be in parts so that we can easily navigate to specific parts while rewatching. Great content 👏🫡
Yes!! We will do this on updraft
What is the pragma solidity 0.8.18?
the solidity version
Hey patrick is this full foundry part of upcoming course or just one part where foundry is used? Or it is just one part of the course where foundry is used?
This is a small part of the 27 hour course :)
Can you create courses for building a real world decentralized Lending protocol from scratch and building decentralized Derivatives Exchange from scratch. Couldn’t find these anywhere
Perhaps, in the meantime this repo has some minimal examples of what you're looking for github.com/smartcontractkit/defi-minimal
This seems like a module of a bigger course, if i'm correct could anyone give me a link to this course, please, thank you.
Check my most recent videos :)
I love a good monstrosity 😂
When will you upload the full stack developer course...please upload it as soon as possible
The 32 hour javascript freeCodeCamp course is good for the time being. But we are working on the next one!
Did it work?
Please make tutorial for Etherscan clone💚🍋
I wish I could. That would be a massive undertaking
@@PatrickAlphaC when we built opensea CLONE we manually entering the contract address in the Opensea clone, and I thought that Opensea uses a method like Etherscan, which does not need to enter the NFT smart contract address to track it. When I made my NFT collection, I minted only 10 of them, but Opensea was able to detect their total supply and keep track of minting operations.
@@mehrdad1068 yep! Opensea does some clever stuff
@@PatrickAlphaC thank you my mentor 💚🌼 We will do one day🌾⛏️
creating a 4 hour content is not easy i belive
Serrr!! Timestamp pls
Why is foundry better than hardhat?
I would't say "better" just different. I like it over hardhat because it's faster though.
@@PatrickAlphaC so it is just different. But in reality I got a feeling by next year it will be the main thing.
@@robertmazurowski5974 I think it's good to keep in mind that both teams are building amazing tooling. But, my preference at the moment: 1. If I'm building a project that will do a lot of deployments and contract interactions -> I prefer brownie 2. For an immutable smart contract project that needs to be tested a lot and quickly in solidity -> foundry #2 is for my bigger projects. But #1 is for my smaller projects that I do more often.
Foundry is much faster.
where are lesson under 12 please?
soon
@@PatrickAlphaC Patrick the best omg thanks
😲😲😲😲😲😲
Can I send it directly to my trust wallet like real usdt
you sure can
@@PatrickAlphaC do I need to add custom contract to see it in wallet
@@monubhandva8509 I’m not sure, I haven’t used trust wallet
What a nice surprise, just about when I'm on the final rounds with your 32-FULL-EXTENDED-STACK BLOCKCHAIN COURSEPIC.. wuff man 😅. Well, another 4-5 hours without sleeping won't hurt, right? haha.. 🥱🙄😑😪🤤😫😨