Code Monkey home page Code Monkey logo

jmariadlcs / racks-items-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 29.9 MB

Tokenized Decentralized Commerce and MarketPlace for items using ERC1155 standard to represent them where users that owns a specific ERC721 can win items by opening a random case and can generate tickets to sell to normal users to be able to open the mentioned case.

JavaScript 20.05% Solidity 79.95%
erc-1155 javascript markeplace matic polygon solidity openzeppelin erc-20

racks-items-backend's Introduction

RACKS ITEMS ๐Ÿ‘•๐Ÿ‘–

This is an implementation of a 'Tokenized Decentralized Commerce' where users are able to win items that are represented by ERC-1155 tokens on the Polygon Network. Only users that owns a MrCrypto (ERC721) are able to win theses clothers. Normal users that do not own the ERC721 token can buy "tickets" from users that do owns the ERC721 token in order to win items. Normal users can also buy items on the Marketplace.

The way users are able to win different clothes is by opening a FULLY DENCENTRALIZED RANDOM CASE by paying Racks Tokens.

A second hand MarketPlace of items is also being implemented.

This repo contains 6 implemented Smart Contracts and its interfaces:

๐Ÿšจ Every detail is going to be described in this report.

Table of Contents

  1. Who can participate?
    1. VIP users
    2. Normal users
  2. Features
    1. Users point of view
    2. Racks point of view
  3. Randomness

Eligible users for participating in the above mentioned 'case openning' are the ones that meet 2 requirements:

  • VIP USERS:
  1. Users that OWNS AL LEAST 1 MrCrypto TOKEN โœ….
  • NORMAL USERS: Users that does not own a MrCrypto will also be able to open cases by:
  1. Buying a 'Case Ticket' from a VIP USER.

VIP users:

  • [Open cases by using RacksTokens].
  • [Lend 'Case Ticket' to not VIP users]: each user can assign the duration of the lending ticket, the number of tries that the ticket allows to open the case and the ticket price. By giving the user the power of decide the values for these 3 variables we are avoiding the tickets floor price to go down. If all tickets were dessgined with a fixed duration and number of tries every user will assign a lower price just to sell his ticket.

Notice: Each user can only lend 1 ticket at the same time and VIP users will not be able to open cases at the same time they are lending his ticket to a normal user.

Normal users:

  • [Open cases without being vip]: no VIP users will also have the chance of winning clothes by openning cases withouth having a MrCrypto. In order to do so, a normal user will need to buy a ticket on the RacksItems MarketPlace. Normal users can also directly buy an item on the Marketplace.

๐Ÿ‘‰๐Ÿผ At this point you may be thinking... what is the intention of winning tokenized clothes/items?

The intentions of the project could be various:

  • The clothes/items that a user is winning could be used in the future upcoming metaverse. To dress up your character on the metaverse.
  • Clothes could be also combined with your MrCrypto to generate a new MrCrypto NFT by joining your already existing MrCrypto and your ERC1155 item token.
  • Users are also able to 'exchange' the items they got in the case. What does that means? This means that the user is changing the token for a physical item that will recive at home. If a user exchanges one of his items, the associated token to the item is going to be burned.

Appart from the funny user experience that RacksItems proporcionates to the user it also have some befenits/functionalities for the owner/admins.

  1. MrCrypto gains utility.
  2. MrCrypto users can earn funds by generating tickets and lending them.
  3. Owner token (RacksToken) is used to open cases -> Token demand grows
  4. Structure of the project is designed in a way that the owner/admins can include new items each time they want.
  5. Owner/admins can regulate the supply of the items -> can introduce new items more "rare" if supply is lower compare with the rest of the items.
  6. Owner/admins are the ones wo also set up the uris metadata for the items.

One of the most important features for a project that includes a "random factor'" to be valuable is to be actually random. This could sound a little weird but in fact almost anything in live is random. Many projects that are live out there and consider themselves as "random" are trully not random.

Achieving randomness in computer science is not an easy task and even less easy when we are talking in a blockchain environment.

The most valuable part of this project is that trully randomness is achieved. The way this randomness is achieved is by implementing Chainlink VRF.

Chainlink VRF (Verifiable Random Function) is a provably fair and verifiable random number generator (RNG) that enables smart contracts to access random values without compromising security or usability.

For each request, Chainlink VRF generates one or more random values and cryptographic proof of how those values were determined. The proof is published and verified on-chain before any consuming applications can use it. This process ensures that results cannot be tampered with or manipulated by any single entity including oracle operators, miners, users, or smart contract developers.

If you are more curious about Chainlink VRF and how randomness is achieved take a look to this video.

racks-items-backend's People

Contributors

jmariadlcs avatar

Watchers

 avatar  avatar

Forkers

racks-community

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.