You are on page 1of 10

1.

AUGUST 2022

S7NS STATION

ERC721-S7
DYNAMIC MINT
S7NS STATION

ERC 721
In order to comprehend ERC721-S7, we will first explore ERC721,
which will provide you with a better understanding of the smart
contract's essence and the issues it faces. ERC721 is a standard
for representing ownership of non-fungible tokens, i.e., tokens
that are not interchangeable.

ERC721 is a more sophisticated standard than ERC20, featuring a


variety of potential extensions and numerous contracts. It
specifies the minimum interface a smart contract must implement to
enable the management, ownership, and exchange of unique tokens. It
neither mandates a standard for token metadata nor restricts the
addition of additional functions.

1
S7NS STATION

ERC721MetadataMintable
The functions of ERC721MetadataMintable:

The following standard allows for the implementation of a standard


API for NFTs within smart contracts. This standard provides basic
functionality to track and transfer NFTs.

• ownerOf(tokenId)

• approve(to, tokenId)

• getApproved(tokenId)

• setApprovalForAll(to, approved)

• isApprovedForAll(owner, operator)

• transferFrom(from, to, tokenId)

• safeTransferFrom(from, to, tokenId)

• safeTransferFrom(from, to, tokenId, _data)

• _safeTransferFrom(from, to, tokenId, _data)

• _exists(tokenId)

• _isApprovedOrOwner(spender, tokenId)

• _safeMint(to, tokenId)

• _safeMint(to, tokenId, _data)

• _mint(to, tokenId)

• _burn(tokenId)

• _transferFrom(from, to, tokenId)

• _checkOnERC721Received(from, to, tokenId, _data)

• constructor()

2
S7NS STATION

• isMinter(account)

• addMinter(account)

• renounceMinter()

• _addMinter(account)

• _removeMinter(account)

Pain points of ERC721MetadataMintable

If we iterate over the functions, we will discover that these


factions are predefined and to date, the smart contract is not
smart because it cannot respond in a timely manner to events
occurring in the outside world (so-called External events). For
example, the smart contract cannot detect if it has been
compromised, and it cannot react to the current floor price or
transaction volume when minting NFTs, which has resulted in a large
number of failed minting NFT cases.

To evaluate data from Etherscan, for instance, you must first store
large amount of data in the smart contract, which will cost a large
number of funds. This is due to the fact that individuals wish to
store data in smart contracts or produce data from smart contracts,
both of which require gas fees. This makes data analytics for smart
contracts practically impossible.

The entire Ethereum blockchain is approximately 6 TB. Even a pruned


version is over 400 GB. There is no specific cost for storage, only
gas for execution. For dynamic storage the STORE operation stores a
word (256 bit). It costs 20,000 gas when the value is set from zero
to non-zero, 5,000 gas when the value is set from non-zero to non-
zero, and it provides a refund of 15,000 when the value is set from
non-zero to zero. This is the only way to make data readable by
contracts and thus light clients. There is also the option of
storing as code, which cannot be updated. There's the 32,000 gas
paid for the CREATE and then 200 gas per byte for the code. This is
much cheaper at 6,400 gas per 32 bytes. So deploying a 128 byte
string assuming a gas price of 100 GWEI and $1700 ETH:

32,000 + (6,400 * 4) = 57,600 gas

3
S7NS STATION

57,600 gas * 0.000000001 ETH (1 gwei) * 100 gwei * $1700 = $9.79

Normal data analysis will take 1GB to 10GB of storage space, which
will cost $80199 to $801998.

In short, the smart contract is basically not designed for data


analyzation.

4
S7NS STATION

ERC721-S7
To address this issue, we used the Oracle Database and coupled it
with a smart contract gate so that the Oracle Database will monitor
external events and do data analysis and calculations prior to
returning a result to the smart contract. And only the output must
be transmitted to the smart contract. A useful feature for the
ERC721-S7 will be the

Oracle Database

The concept of oracles, including decentralized oracles, has been


around for years and continues to generate debate regarding their
implementation and reliability.

Oracles retrieve and validate external data for blockchains and


smart contracts using APIs and market data feeds. The type of data
required by smart contracts can include price feeds, weather
information, and even the generation of random numbers for
gambling. Utilizing oracles involves querying the data source for
specific information and then connecting to that source in order to
interface the blockchain with the data feed. Consequently, smart
contracts can execute based on the specific data flowing from the
data feed.

Unlike blockchains and smart contracts, data feeds in actual


markets and web APIs are not typically deterministic. Oracles serve
as a bridge that can convert external, nondeterministic data into a
format that a blockchain can comprehend and use to execute specific
conditions. In relevant scenarios, Oracles can even be used for N-
of-M multi-signature transactions to reach consensus on which
transaction to sign.

Oracles' potential capacity to connect off-chain and on-chain data


as an interface between traditional networks and blockchain
networks has significant long-term implications.

5
S7NS STATION

Overcontrol
Overcontrol

Inputs and outputs of the Oracle Database

In order to analyze the minting process, some data will be looped


through and observed from Etherscan, and we will get information
such as

- current floor price

- transaction activity

- number of listings

- number of offers

- number of listings around the mint price

- number of Token minted

- the mint-value of each transaction

6
S7NS STATION

- …

These data will be analyzed and calculated with an algorithm


predefined on the Oracle database such as

- trigger_mint_for_time: int(256)

- trigger_mint_for_spots: int(256)

- pause_mint_for_time: int(256)

- mint_safety: bool

- …

The outputs to the smart contract will be:

- pause_mint: bool

- begin_mint: bool

- …

7
S7NS STATION

The ERC721-S7’s auto-spotting-mint

This is the one of the most interesting use cases of this ERC721-
S7, the smart contract is able to spot NFTs depends on the market
condition, here is how it works:

Devs

- pause_mint: bool Smart contract


Data un iltered - begin_mint: bool

Etherscan
- trigger_mint_for_time: int(256)
or other
Data iltered - trigger_mint_for_spots: int(256)
- pause_mint_for_time: int(256)
- mint_safety: bool
-…

- current loor price


- transaction activity Analysation 2
Analysation 1 - number of listings
- number of o ers
- number of listings
around the mint price
- number of Token
minted

8
f
f
f
ff
S7NS STATION

First, the Oracle Database will continuously capture and loop


through Etherscan data and react to the current market. we divide
the minting process into several phases, with the first phase's
quantity being determined by the market reaction and predefined
pause conditions, the condition is the “acceptable floor price”, if
the current collection floor price is lower than the “acceptable
floor price” for a certain time, the Oracle will give the smart
contract the output: [pause_mint].

The transaction amount, mint amount per minute, floor price, and
mint price all factor towards the determination of the following
mint phase's triggering condition. The Oracle will analyse base on
the information and data, and get the value of
[trigger_mint_for_time: int(256)], [trigger_mint_for_spots:
int(256)], [pause_mint_for_time: int(256)]

based on the values, the Oracle will output the information of


[begin_mint] to the smart contract again.

Owners of smart contracts can override the auto-function, allowing


them to halt or initiate minting at any time. Specifically, they
can manually mint instead of using auto-mint. In addition, we are
going to attempt a mint strategy:

Each Token generated by the ERC721-S7 carries a Whitelistspot for


the NFT in the subsequent phase, meaning that the number of NFTs in
the previous phase must be equal to or fewer than the number of
NFTs in the subsequent phase.

Future possibilities and potential

ERC721-S7 is the first dynamic minting smart contract in the NFT


space. This smart contract's potential is limitless due to its
inherent adaptability and intelligence. With the advancement of
web3, there will be an increasing number of mint approaches,
therefore, there may be numerous areas that involve data analysis
to support the success of mint. And these smart contracts can also
prevent contracts from being hacked, as the machine will react far
faster than a human would in the event of a hacking attempt.

You might also like