Senior design project

decentralized marketplaceumer akhtar.

sd

High Level View

Project Description: Building a marketplace where users can buy and sell items all done through the blockchain.

What Are Decentralized Applications (dApps)?

Decentralized applications (dApps) are digital applications or programs that exist and run on a blockchain or peer-to-peer (P2P) network of computers instead of a single computer. DApps (also called "dapps") are outside the purview and control of a single authority. DApps—which are often built on the Ethereum platform—can be developed for a variety of purposes including gaming, finance, and social media.

Technologies stack: Polygon, IPFS, Node.js, Ethers.js, Hardhat, solidity, smart contracts, MetaMask (Wallet browser extension), Node.js, yarn, TypeScript, OpenZeppelin (Solidity library), Etherscan block explorer

The Ethereum blockchain is home to a vast range of economic activity — from NFT markets and games to the growing DeFi ecosystem. Ethereum is well suited to this activity because it’s compatible with smart contracts, which can be used to build a vast range of applications. What is polygon? Enter Polygon, which is a “Layer 2” scaling solution (or “sidechain”) that’s emerged to provide faster transactions and lower costs for users. It acts as a speedy parallel blockchain running alongside the main Ethereum blockchain. To use it, you can “bridge” some of your crypto over to Polygon, and then interact with a wide range of popular crypto apps that were once exclusive to the main Ethereum blockchain.

What is MATIC?

Polygon has its own cryptocurrency, called MATIC, which is used to pay fees on the Polygon network, for staking, and for governance (which means that MATIC holders get to vote on changes to Polygon). You can also buy and sell MATIC via Coinbase and other exchanges. Connect to wallet metamask as login and to manage posts and listings.

Key Features of Polygon Speed The Polygon Network uses a high-throughput blockchain with consensus provided by a group of Block Producers selected by stakeholders at each checkpoint. A Proof of Stake layer is used to validate blocks and periodically post proofs of Block Producers to the Ethereum mainnet. This enables rapid block confirmation rates of about 2 seconds while preserving a high amount of decentralization, resulting in excellent throughput for the network. Scalability Polygon Network achieves a hypothetical transaction speed of fewer than 2 seconds on a single sidechain. Using multiple sidechains helps the network to handle millions of transactions per second. This mechanism (already demonstrated in the first Matic sidechain) allows the Polygon network to scale easily. Security Polygon's smart contracts rely on Ethereum’s security. To safeguard the network, it employs three critical security models. It uses Ethereum's staking management contracts and a group of incentivized validators running Heimdall and Bor nodes. Developers can also implement both models (Hybrid) into their dApp.

Deploying to the Polygon Network Wallets To interact with the Polygon Network, you need to have an Ethereum-based wallet because Polygon runs on Ethereum Virtual Machine (EVM). We will be using Metamask : MetaMask is a crypto wallet that allows users to use it as a login, hold various currencies, and interact with smart contracts. using HardHat which is a popular framework used for smart contract development.

Get Test Tokens

This faucet transfers TestToken on Matic testnets and parent chain. Confirm details before submitting.

Connect Metamask to Polygon Testnet using Chainlist

Navigate to Chainlist and search for Polygon, ensure that the Testnets button is turned on, then you can see mumbai test net propagate, allow the connection within metamask. Then we can see that we are connected to mumbai testnet which will allow us to run tests on the marketplace by depositing test funds into metamask. Deposit test funds into the wallet from now we have test funds to make transactions and sign contracts. faucet sd

Connect Metamask to Polygon Testnet using Chainlist

sd

Listing

sd

sd


There were many road blocks along the way...

 listing interaction

We can see how a listing will appear once it has been added to site. Users sign in via metamask to add listings.

Connect Metamask to Polygon Testnet using Chainlist

single listing

 listing interaction

Here we can see a successfull first Listing

Contract Deployed

 Deployed contract on testnet

Welcome to Dlist

Dlist marketplace

🦁⚡