Skip to content

illegalcall/Collateralized-Stablecoin-dApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Collateralized Stablecoin dApp πŸͺ™

✨ Welcome to the Future of Programmable Money! ✨

This project is a Collateralized Stablecoin Decentralized Application (dApp) built on the blazing-fast Solana blockchain! πŸš€ It allows users to:

  • πŸ”’ Deposit SOL as collateral.
  • mint πŸ’° USDS stablecoins against their collateral.
  • πŸ”„ Redeem SOL by burning USDS.
  • πŸ”₯ Participate in liquidation of undercollateralized positions (if you dare!).
  • πŸ“Š Monitor their risk level in real-time! πŸ“ˆπŸ“‰

It's a simplified example to demonstrate the power of programmable money and decentralized finance (DeFi). Think of it as a mini-MakerDAO, but on Solana! 😎

🌐 Frontend - Dive into the UI!

This beautiful UI, built with Next.js and Tailwind CSS, lets you interact with the smart contract and manage your stablecoin positions. 🎨 Connect your wallet and start experimenting! πŸš€

βš“οΈ Anchor Program - The Smart Contract Magic! πŸ§™β€β™‚οΈ

This project is powered by a robust Anchor program (smart contract) written in Rust. Let's get it running locally!

πŸ› οΈ 1. Build the Program - Compile the Rust Sorcery!

cd program
anchor build

This command will compile your Rust code and prepare the program for deployment. ✨ Watch the magic happen! ✨

πŸƒ 2. Run Local Validator - Your Personal Solana Playground! πŸ–οΈ

solana-test-validator

Fire up the Solana Test Validator! This creates a local blockchain environment perfect for development and testing. πŸ§ͺ Keep this running in a separate terminal window.

πŸš€ 3. Deploy the Program Locally - Launch to Localnet! πŸ›°οΈ

anchor deploy --provider.cluster localnet

Deploy your compiled program to your local Solana validator! πŸš€ This makes your smart contract live and ready to interact with on your local network. πŸ“‘

Important: After deployment, make sure to: * βœ… Update idl.json in frontend/anchor/: Copy the new idl.json from program/target/idl/ to frontend/anchor/ to ensure your frontend knows about the latest contract. * πŸ”„ Restart Frontend: Restart your frontend (npm run dev in frontend directory) to pick up the updated idl.json.

βœ… 4. Test - Put it to the Test! πŸ§ͺ

anchor test

Run the automated tests! πŸ§ͺ These tests in program/tests/stablecoin.ts verify the core functionality of your smart contract. Make sure all tests pass! πŸŽ‰


Enjoy exploring the world of programmable money with this Collateralized Stablecoin dApp! πŸŽ‰ Remember, this is just the beginning – the possibilities are endless! 🌌

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published