Skip to main content

mQuark Smart Contracts Guide

Introduction

The mQuark smart contracts were developed to allow businesses and metaverse developers to integrate NFT projects for their specific needs easily. It is designed to ease the burden of the development process of NFTs and interoperability between different worlds.

Managing Smart Contracts

It is challenging to view and check the data on any smart contracts, as people need an additional layer to read the data in a readable way. We have developed the Developer Portal to ease this burden as an additional layer.

Key Architecture

Our current architecture consists of multiple smart contracts and a front-end application. These are Registry, Controller, Template, Subscriber,Imported Contracts, NFT 721 and 1155 Implementation, and Entity Contracts. This way, we aim to be as simple, efficient and secure as possible for our developers and end-users.

S.E.S
  • Simple, Efficient and Secure!
  • Registry is responsible for deploying new Entity contracts.
  • Controller is used to set some neccessary variables like template prices, royalties and contracts addresses.
  • Template is used to create new templates and categories
  • Subscriber is responsible for managing the subscriptions.
  • Entity contracts are used to create collections and manage funds.
  • NFT721 / V1 - V2 NFT1155 Implementations are used clone new collections.
  • Imported Contracts are used to store imported collections by entities.

Developement Considerations

The mQuark Developer Portal and the SDK are developed to help creators and developers to integrate their projects with mQuark. The SDK is a set of tools that can be used to interact with the mQuark smart contracts. The Developer Portal is a web application that can be used to manage the mQuark smart contracts.

Security

mQuark team has taken into consideration many aspects of the contract security, and implemented vetted patterns and best practices to ensure the healthiness of our smart contracts.

We followed a Factory and Clone pattern to create new contracts. This pattern is used to create new contracts from a template contract. This way, we can reduce the gas fees and the complexity of the contract creation process. Every mQuark registrant will have their contracts, and no one can control one another. However, everything is going to be readable to anyone.

Users who demand an update operation for a metadata must own the NFT, which means without a Valid Signature and without having the NFT in their wallet, the metadata slot can NOT be changed in any way. Furthermore, the main metadata of the NFT( i.e. Template Metadata) is immutable when minted. Therefore, anyone can read any metadata slot, but only the NFT owner can change it with valid signed data by the project.

It’s also important to note that only the mQuark Foundation can create templates to eliminate the potential for abuse. However, business and metaverse developers may request templates to be added by Soonami via the Developer Portal.

Gas

Individuals must pay gas fees in order to conduct a blockchain transaction. These fees cover the cost of the computational power blockchain miners need to validate transactions. Usually, they receive payment in the native cryptocurrency of the blockchain. While paying gas fees for creating a transaction is compulsory on the Ethereum network, the costs are influenced by various factors including existing demand for gas, computational resources for processing smart contracts, among other factors.

The reduced gas fees to be paid are a sought-after and positive feature for end-users. That's why we care about this in our Smart Contracts, and we carefully perform our tests and coding to keep the fees to a minimum.