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! 🐐🔥🚀

    @evmlionel@evmlionel11 ай бұрын
    • Totally agree 😊

      @YuriiLebid-op1xv@YuriiLebid-op1xv9 ай бұрын
  • Man, the sheer work you put into your content is phenomenal. Thank god for Web3 creators like you Patrick, you inspire me!

    @web3made@web3made10 ай бұрын
  • 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...

    @thecalgarians4597@thecalgarians459711 ай бұрын
    • Oh just you wait

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • Hope you landed a job in the industry.

      @arslanelahmer2729@arslanelahmer272910 ай бұрын
  • 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. 🔥

    @adamoc@adamoc11 ай бұрын
  • Aaaaand there goes my Sunday lol thanks Patrick 🙏

    @b3rhunter@b3rhunter11 ай бұрын
  • Thanks for making this course and free, your courses are far more indepth than most paid courses.

    @biellonuhu417@biellonuhu41710 ай бұрын
  • You are maybe the greatest web3 hero out there. Definitely more heroic than Vitalik. The way you explain things is crazy good 👍 thank you!

    @fabriziogianni7@fabriziogianni72 ай бұрын
    • 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,.

      @PatrickAlphaC@PatrickAlphaC2 ай бұрын
  • Can't wait to see the full course!

    @myan518@myan51811 ай бұрын
  • Yes! Been following this Repo waiting for its sweet release. 🎉

    @lawniczakjohn@lawniczakjohn11 ай бұрын
  • Thanks a lot for wonderful tutorial :) I was good lesson all at once in one place, good work 👌👍

    @babatumises.r.o.5568@babatumises.r.o.556811 ай бұрын
  • You are da MAN. One of the few pros worth following after and invest time in the materials they release.

    @avigdorkahalani9616@avigdorkahalani961611 ай бұрын
  • Man, You are so good🤯 Keep going👏

    @DelerRahmani@DelerRahmani11 ай бұрын
  • let's gooo! thank you for this.

    @eudaimonia137@eudaimonia13711 ай бұрын
  • 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

    @saadabbasi2063@saadabbasi20639 ай бұрын
  • 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.

    @mattjaf@mattjaf11 ай бұрын
  • Great job Patrick

    @aadityatiwari5159@aadityatiwari515911 ай бұрын
  • wow awesome content i learnt so much more watching bro! thank you!

    @cheynespc@cheynespc10 ай бұрын
  • 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 :)

    @ranama@ranama11 ай бұрын
    • Boom!!

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • always learn a lot from your videos. you are my champ !

    @marklin9308@marklin930811 ай бұрын
  • 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.

    @kianoosharshi8336@kianoosharshi833611 ай бұрын
    • Yes!! In my coming full course I will introduce them.

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Thx for helping so many people in the world!

    @jingli9232@jingli923211 ай бұрын
  • 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.

    @mknight3488@mknight34889 ай бұрын
    • Ty Fren :)

      @PatrickAlphaC@PatrickAlphaC9 ай бұрын
  • Finally it is out,,, thanks man,,

    @rivendanta2073@rivendanta207311 ай бұрын
    • nope, just a teaser lol sorry

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Yes yes & YES !

    @carlvk1893@carlvk189311 ай бұрын
  • Thank you 🎉

    @aboutikareda1565@aboutikareda156511 ай бұрын
  • Best teacher in the planet

    @mehrdad1068@mehrdad106811 ай бұрын
  • Thanks for great content ❤

    @YuriiLebid-op1xv@YuriiLebid-op1xv9 ай бұрын
  • Ser Thank you very much!

    @aaditpalande7478@aaditpalande747811 ай бұрын
  • love you from Pakistan ❤

    @hassanbutt8893@hassanbutt889311 ай бұрын
  • Thank Patrick, Next Tutorial is on how to create Pricefeeds in Chainlink

    @Xmasparol@Xmasparol11 ай бұрын
  • Love the new lights

    @DevRel1@DevRel111 ай бұрын
    • ty fren

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Thanks!

    @Grucha1998@Grucha199811 ай бұрын
  • Let's go 🔥🔥

    @farrukhodinaev2139@farrukhodinaev213911 ай бұрын
  • top level content

    @bhok5228@bhok522811 ай бұрын
  • you dropped this 👑

    @naderdabit@naderdabit11 ай бұрын
    • 👑 You too ser

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • OMG Patrick you are the best

    @thileepanilankumaran6840@thileepanilankumaran684011 ай бұрын
  • 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

    @intellectance9893@intellectance989310 ай бұрын
  • Amazing content, @Patrick. When is the full content going to come out?

    @pentestify_labs@pentestify_labs11 ай бұрын
    • Once my computer decides to cooperate... I was hoping Monday... but... tomorrow???

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Can you share your engineer journey someday? Really want to know how you become such a great dev

    @jingli9232@jingli923211 ай бұрын
    • This is it! kzhead.info/sun/mJWHZMWPgHyDgWg/bejne.html

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Let's do it all 💪❤️‍🔥

    @mohamedabuyounes3136@mohamedabuyounes313611 ай бұрын
  • 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

    @bruceclairelopschutz9938@bruceclairelopschutz993811 ай бұрын
    • hername is Monica Payne Tutorials, cant divulge much. Most likely, the internet should have her basic info, you can research if you like

      @bruceclairelopschutz9938@bruceclairelopschutz993811 ай бұрын
  • Patrick Collins the legend

    @22-Zar@22-Zar10 ай бұрын
  • Hi Patrick. Some of the links that you said would be in the description seem to be missing. Like the RAI link for example.

    @kanian77@kanian777 ай бұрын
    • Ah sorry! I’ll update. kzhead.info/sun/nqh8oc2Sm2aunoE/bejne.htmlsi=BmAWVFGX_kz_JoNo

      @PatrickAlphaC@PatrickAlphaC7 ай бұрын
    • Updated

      @PatrickAlphaC@PatrickAlphaC7 ай бұрын
  • A good stablecoin is a #1 priority

    @anthonysandovalsen@anthonysandovalsen10 ай бұрын
  • 4+ hours is an excerpt ? The full course must be massive!

    @mikeha@mikeha8 ай бұрын
    • It’s 27 hours :)

      @PatrickAlphaC@PatrickAlphaC8 ай бұрын
  • will the course be on youtube or teachable?

    @netronominom2850@netronominom285011 ай бұрын
  • 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..

    @mrshephu@mrshephu6 ай бұрын
    • 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.

      @PatrickAlphaC@PatrickAlphaC6 ай бұрын
    • 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

      @mrshephu@mrshephu6 ай бұрын
  • Wait is over ❤

    @katelibra@katelibra11 ай бұрын
    • Not yet

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • 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?

    @muhammadmubasher3912@muhammadmubasher39129 ай бұрын
    • 1. Yes. But you'd still need to worry, banks fail, or they could rug you. 2. USDC, PayPal, Tether all already do this.

      @PatrickAlphaC@PatrickAlphaC9 ай бұрын
  • The best way to earn Stablecoins is to trade them to USD using a special software. This is a surprising, but scientific fact.

    @MicrotradeAI@MicrotradeAI6 ай бұрын
  • 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?

    @MrCybiz@MrCybiz7 ай бұрын
    • What do you mean

      @PatrickAlphaC@PatrickAlphaC7 ай бұрын
    • 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

      @MrCybiz@MrCybiz7 ай бұрын
  • 🚀🚀

    @mehrdad1068@mehrdad106811 ай бұрын
  • my fren if the excerpt is 5 hora , full course is how longa?

    @razdingz@razdingz11 ай бұрын
  • what is the best practice to use revert or require statements for transaction reverts

    @crypto3938@crypto393811 ай бұрын
    • as of today, always use revert. Revert at the moment is more gas efficient.

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Where did the foudary file and other folders in this repository come from? I can't understand please explain

    @user-ov4wg4go9d@user-ov4wg4go9d9 ай бұрын
    • This is a bit advanced. If you're looking for help, watch the most recent course deployed on my channel!

      @PatrickAlphaC@PatrickAlphaC9 ай бұрын
    • @@PatrickAlphaC ok thank you!

      @user-ov4wg4go9d@user-ov4wg4go9d9 ай бұрын
  • is DAI really premisionless? it's controlled by centralized entity what can mint and burn whenever they want

    @andreas6508@andreas650811 ай бұрын
    • It has a DAO... but a a few people own the DAO tokens

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Let’s get frogging

    @Mee7696@Mee769611 ай бұрын
  • Can Solidity Provide an Alternative to JS and JSX for Developing Front-End UI Components in the Future?

    @codeWithBala@codeWithBala11 ай бұрын
    • Maybe!

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Can we get any project that combines ai and BlockChain like decentralised ai

    @codeWithBala@codeWithBala11 ай бұрын
  • 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

    @Viddrohh@Viddrohh11 ай бұрын
    • Working on it fren

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • 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@robertmazurowski597411 ай бұрын
    • @@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

      @Viddrohh@Viddrohh11 ай бұрын
  • 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 🤑😘

    @alborzazizi6023@alborzazizi602311 ай бұрын
  • 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🐸🐸🐸🐸🐸

    @Leuviah1337@Leuviah133711 ай бұрын
  • 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

    @anthonysandovalsen@anthonysandovalsen10 ай бұрын
    • Great! Please make it. How do you prevent it from doom spiraling?

      @PatrickAlphaC@PatrickAlphaC10 ай бұрын
  • What plugin are he using to autocomplete in Solidity?

    @dangelgeek@dangelgeek2 ай бұрын
    • the hardhat VSCode extension

      @PatrickAlphaC@PatrickAlphaC2 ай бұрын
  • Great video. Does anybody know how youre supposed to find positions to liquidate?

    @timothynash4585@timothynash45855 ай бұрын
    • on this stablecoin? This is where you'd have to monitor health factors off chain

      @PatrickAlphaC@PatrickAlphaC5 ай бұрын
    • @@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@timothynash45855 ай бұрын
    • @@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.

      @PatrickAlphaC@PatrickAlphaC5 ай бұрын
  • 🐸!

    @id104335409@id10433540911 ай бұрын
  • 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.

    @Ernestuchokaos@ErnestuchokaosАй бұрын
    • You’ll need to learn to move off remix :) Check out Cyfrin Updraft to learn all the prerequisites from this video

      @PatrickAlphaC@PatrickAlphaCАй бұрын
    • @@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@ErnestuchokaosАй бұрын
    • @@Ernestuchokaos Boom updraft.cyfrin.io/

      @PatrickAlphaC@PatrickAlphaCАй бұрын
  • Can you make a stable coin pegged to the average of all world currencies?

    @jessehahka@jessehahka10 ай бұрын
    • Yes! You’d just need a data feed for those

      @PatrickAlphaC@PatrickAlphaC10 ай бұрын
    • @@PatrickAlphaC Awesome, thank you!

      @jessehahka@jessehahka10 ай бұрын
    • @@PatrickAlphaC Awesome, thank you!

      @jessehahka@jessehahka10 ай бұрын
  • Videos should be in parts so that we can easily navigate to specific parts while rewatching. Great content 👏🫡

    @masum-hasan@masum-hasan5 ай бұрын
    • Yes!! We will do this on updraft

      @PatrickAlphaC@PatrickAlphaC5 ай бұрын
  • What is the pragma solidity 0.8.18?

    @user-ov4wg4go9d@user-ov4wg4go9d9 ай бұрын
    • the solidity version

      @PatrickAlphaC@PatrickAlphaC9 ай бұрын
  • 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?

    @jayendrabhagat3607@jayendrabhagat360711 ай бұрын
    • This is a small part of the 27 hour course :)

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • 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

    @victorylapp@victorylapp10 ай бұрын
    • Perhaps, in the meantime this repo has some minimal examples of what you're looking for github.com/smartcontractkit/defi-minimal

      @PatrickAlphaC@PatrickAlphaC10 ай бұрын
  • 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.

    @productivity3945@productivity394511 ай бұрын
    • Check my most recent videos :)

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • I love a good monstrosity 😂

    @comosaycomosah@comosaycomosah11 ай бұрын
  • When will you upload the full stack developer course...please upload it as soon as possible

    @codeWithBala@codeWithBala11 ай бұрын
    • The 32 hour javascript freeCodeCamp course is good for the time being. But we are working on the next one!

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
  • Did it work?

    @rickeyponder@rickeyponder8 ай бұрын
  • Please make tutorial for Etherscan clone💚🍋

    @mehrdad1068@mehrdad106811 ай бұрын
    • I wish I could. That would be a massive undertaking

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • @@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@mehrdad106811 ай бұрын
    • @@mehrdad1068 yep! Opensea does some clever stuff

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • @@PatrickAlphaC thank you my mentor 💚🌼 We will do one day🌾⛏️

      @mehrdad1068@mehrdad106811 ай бұрын
  • creating a 4 hour content is not easy i belive

    @prob_here@prob_here11 ай бұрын
  • Serrr!! Timestamp pls

    @keccak32@keccak3211 ай бұрын
  • Why is foundry better than hardhat?

    @robertmazurowski5974@robertmazurowski597411 ай бұрын
    • I would't say "better" just different. I like it over hardhat because it's faster though.

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • @@PatrickAlphaC so it is just different. But in reality I got a feeling by next year it will be the main thing.

      @robertmazurowski5974@robertmazurowski597411 ай бұрын
    • @@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.

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • Foundry is much faster.

      @dukelistudio4366@dukelistudio436611 ай бұрын
  • where are lesson under 12 please?

    @CanuSeeme-qj3ev@CanuSeeme-qj3ev11 ай бұрын
    • soon

      @PatrickAlphaC@PatrickAlphaC11 ай бұрын
    • @@PatrickAlphaC Patrick the best omg thanks

      @CanuSeeme-qj3ev@CanuSeeme-qj3ev11 ай бұрын
  • 😲😲😲😲😲😲

    @tommybhaiya598@tommybhaiya59811 ай бұрын
  • Can I send it directly to my trust wallet like real usdt

    @monubhandva8509@monubhandva85093 ай бұрын
    • you sure can

      @PatrickAlphaC@PatrickAlphaC3 ай бұрын
    • @@PatrickAlphaC do I need to add custom contract to see it in wallet

      @monubhandva8509@monubhandva85093 ай бұрын
    • @@monubhandva8509 I’m not sure, I haven’t used trust wallet

      @PatrickAlphaC@PatrickAlphaC2 ай бұрын
  • 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.. 🥱🙄😑😪🤤😫😨

    @fun_iqp@fun_iqp11 ай бұрын
KZhead