|
1 | | -# Project Newm Contracts |
| 1 | +# Project NEWM |
2 | 2 |
|
3 | | -A collection of contracts used my Project Newm. |
| 3 | +A collection of smart contracts for Project NEWM. |
4 | 4 |
|
5 | | -# E2E Testing |
| 5 | +# v0.2.x |
6 | 6 |
|
7 | | -The initial testing will assume Newm holds a special wallet that will regulate all token minting. In the future, this will be expanded into more decentralized solutions. |
| 7 | +The v0.2.x contract versions assume NEWM holds a special wallet that will regulate token minting and burning. In the future, this centralized signing mechanism will be replaced with a decentralized solution. |
8 | 8 |
|
9 | | -The example in the repo is with test wallets. A recompile with proper wallets will need to occur during the initial production phase. |
| 9 | +### useful-funcs |
10 | 10 |
|
11 | | -## Flow |
12 | | - |
13 | | -An artist comes to Newm wishing to tokenize an piece of art then fractionalize the tokenization. First, Newm will create the initial tokenized version of the art by minting a token on the official Newm catalog policy id. An artist may keep the original tokenized version of their art or they may fractionalize the original token. |
14 | | - |
15 | | -The fractionalization of a token is the splitting of the ownership rights of the original tokenized art into 100 million pieces. The original tokenized art is locked into a smart contract and the resulting fractions are given to the artist. From here the artist my do what they wish with the fractions. |
| 11 | +A library for useful functions for inside the contracts. |
16 | 12 |
|
17 | | -This entire process is reversible. At any point, an artist my obtain the original tokenized by burning the 100 million fractional tokens. |
| 13 | +https://github.com/logicalmechanism/useful-funcs |
18 | 14 |
|
19 | | -## Tokenization |
20 | | - |
21 | | -Each UTxO inside the tokenization contract is a unique Newm catalog, completely determined by the token prefix name like "Newm_", "paintings_", or "songs_". The contract behaves as a sequential NFT generator, minting tokens using the concatentation of the prefix with the current token counter. The sequence of NFTs will continue forever or at least until the size of the token name exceeds 32 characters. |
| 15 | +## Flow |
22 | 16 |
|
23 | | -### Process |
| 17 | +An artist comes to NEWM wishing to tokenize a piece of art, digitalizing a real-world object onto the blockchain. The artist may decide to split the ownership rights of the tokenized object by fractionalization, splitting a tokeninzed object into 100,000,000 fractions. First, NEWM will create the initial tokenized object by minting an NFT on the official NEWM catalog policy id. At this point, the artist may keep the original tokenized version of their art or they may fractionalize the original NFT into a fungible token. |
24 | 18 |
|
25 | | -- Create catalog UTxO inside the tokenization contract. |
26 | | -- Mint sequential NFT for artist. |
27 | | -- (Optional) If required, any catalog NFT may be burned. |
28 | | -- (Optional) If required, any catalog may be removed. |
| 19 | +The fractionalization of a token is the splitting of the ownership rights of the original tokenized art into 100 million pieces. The original tokenized art is locked into a smart contract and the resulting fractions are given to the artist. From here the artist may do as they wish with their fractions. |
29 | 20 |
|
30 | | -** Each prefix and thus each UTxO must be unique. |
| 21 | +This entire process is reversible. At any point, an artist may obtain the original tokenized object by burning the 100 million fractional tokens. |
31 | 22 |
|
32 | | -### Example |
| 23 | +## Tokenization |
33 | 24 |
|
34 | | -```bash |
35 | | -./createCatalogUTxO.sh |
36 | | -./MintNFT.sh |
| 25 | +Each UTxO inside the tokenization contract is a unique NEWM catalog, holding a unique datum with a token prefix like "NEWM_", "paintings_", or "songs_" and the current NFT counter. The contract behaves as a sequential NFT generator, minting tokens using the concatenation of the prefix with the current token counter. The sequence of NFTs will continue forever or at least until the size of the token name exceeds 32 characters. The resulting NFTs will have a token name like "NEWM_0" or "NEWM_414". |
37 | 26 |
|
38 | | -# if required |
39 | | -./burnNFT.sh |
40 | | -./removedCatalogUTxO.sh |
41 | | -``` |
42 | 27 | ## Fractionalization |
43 | 28 |
|
44 | | -Each fractionalization of a token must be prepped by Newm or the artist. This ensures that only one token may be added onto an existing UTxO for fractionalization. There is no way to do entry validation for smart contracts on Cardano. Validation only occurs during a spending event thus forcing the artist or Newm to update an already existing UTxO means forcing on-chain validation. The fractionalized tokens will have the fractional Newm policy id but will share the same name as the original token. The token to be fractionalize may only be unlocked if and only if all 100 million fractions are burned together at once. |
45 | | - |
46 | | -### Process |
47 | | - |
48 | | -- Create fractional UTxO. |
49 | | -- Lock and mint token fractions. |
50 | | -- (Optional) If required, fractional tokens may be burned to unlock the original token. |
51 | | -- (Optional) If required, the left over fractional UTxO may be removed after successful burning. |
52 | | - |
53 | | -** Fractionalization of tokens if the same names will result in two sets of fractions. |
54 | | - |
55 | | -### Example |
| 29 | +Each UTxO inside the fractionalization contract is a unique fractionalization of a NEWM NFT. The fractionalized tokens will have the fractional NEWM policy id but will share the same name as the original tokenized object. The minting of the fractions will only occur if the original NEWM NFT is sent into the fractional contract to be locked. This means the fractionalized UTxO may only be unlocked if all 100 million fractions are burned together in a single transaction. |
56 | 30 |
|
57 | | -```bash |
58 | | -./createFractionalUTxO.sh |
59 | | -./lockAndFractionalize.sh |
60 | 31 |
|
61 | | -# if required |
62 | | -./unlockAndSolidify.sh |
63 | | -./removeFractionalUTxO.sh |
64 | | -``` |
0 commit comments