# Substrate Builder Program Milestone 1 ### Deliverable 1 #### Metaverse Level Token Economy A Metaverse can issue a community token. The community token will be used inside that Metaverse, permissionlessly and create an open economy for the individual Metaverse. Community token can be traded and be used in that Metaverse's local marketplace. Also, introducing native currency backing and vesting mechanism to boostrap the economy of that Metaverse. Community tokens should have option to perform cross-chain functionality. e.g. Community token X can be redeemed on Ethereum or other parachain. * Design multi-currency pallet to support each Metaverse on the network having its own community token, ticker, and backing mechanism. The community token can be used within the community for trading and other activities. * Native token backing & related unlocking mechanism for community token issuance to avoid spamming. * Implement vesting mechanism on community token for Metaverse owner to show commitment to that Metaverse. * Wrapped token ability to allow existing token on other blockchains (Polkadot eco-system to start with) to wrap their token as a community token. [Link to tokenization](https://github.com/bit-country/Metaverse-Network/tree/master/pallets/tokenization?target=_blank) [Link to unit test](https://github.com/bit-country/Metaverse-Network/blob/master/pallets/tokenization/src/tests.rs?target=_blank) [Link to community token ETH bridge](https://github.com/bit-country/Metaverse-Network/blob/master/modules/chainsafe/src/lib.rs?target=_blank) Note: - We started the cross-chain transfer with Ethereum through trusted bridge using chainsafe. - Our team will start the Cumulus implementation and test through parachain cross-chain transfer. Review by Parity team: ### Deliverable 2 #### Metaverse Level Governance The Metaverse level council. Each Metaverse can have its own council governed by community token holders and land owners. * A specialized pallet similar to existing collective and democracy pallets, designed to support sub-governances. * Metaverse level proposal, can be voted and executed within that Metaverse. * Each Metaverse can have their own parameters. * Implement filter to ensure only certain calls can be executed within that Metaverse's scope. * Each of these compartmentalized governances have their own independent council and reach for their policies. e.g. a Metaverse council can only affect their own Metaverse. [Link to governance](https://github.com/bit-country/Metaverse-Network/tree/master/pallets/governance?target=_blank) [Link to unit test](https://github.com/bit-country/Metaverse-Network/blob/master/pallets/governance/src/tests.rs?target=_blank) Review by Parity team: ### Deliverable 3 #### Metaverse Local and Global Marketplace Local and Global Marketplace, Decentralised Auction Management, and Support Community Token in each Metaverse. * Multi-level/store marketplace, this is to enable each Metaverse to have their own local marketplace. There'll be integrations to support subsidies and similar incentive systems to encourage local market growth. * Global marketplace independent of any local Metaverse marketplace, containing different items for sale and allowed for sale. (Some are only sold on a Metaverse's local marketplace). * Developing our extensions to ORML, we will be adding extra metadata that will enable our unique features (smart contract, renting and more). [Link to local/global marketplace](https://github.com/bit-country/Metaverse-Network/tree/master/pallets/auction?target=_blank) [Link to unit test](https://github.com/bit-country/Metaverse-Network/blob/master/pallets/auction/src/tests.rs?target=_blank) Review by Parity team: ### Environment Setup Clone the repo, setup rustc and toolchain Please note: we use substrate version with branch = "polkadot-v0.9.9" and wasm `make init` Build wasm `make build` Run development chain `make run-dev` Run unit tests `make test` ### SBP Milestone 1 Restrospective #### 1) What went well? * Received great support from Builder Program, learn from other people question in Element. * Development process went smoothly, even though there are some changes in business logic, we could managed to get development up to designed road map. * Managed to get all key deliverables to the point that ready for public testing. #### 2) What could have gone better? * We should update dependencies more often to keep update with latest substrate. It tooks us about 3 days to bump all dependencies from substrate 3.0 to use polkadot-0.9.9 branch. #### 3) What will we try next? * Extend more improvements on existing pallets. * Benchmarking all pallets. * Connecting to Westend for testing our parachain. * Deep dive more into XCM and implementation. * Deep dive more into the EVM compatibility, pros and cons of different approaches, e.g Account Syncing, implementing complete Frontier. * Start approaching security audit. #### 4) What question do we have? * How to determine we are ready for Parachain? Security audit done? #### 5) Execution Velocity. * The overall executation went well and within our idea goal. In fact, the team spent a bit of time to learn more code structure of FRAME and Substrate. #### 6) General Considerations. * Security, Backups, Testing, Alerts Monitoring, or any other general consideration. * Discuss during meeting #### 7) Performance Considerations. * The general current testnet went well, there are no issue with performance at this stage, but we would love to learn more the consideration after review. #### 8) Crypto-Economics. * Discuss during meeting #### 9) Community Building. * Discuss during meeting ### Test workflow Metaverse Network metadata type [Custom Type](https://github.com/bit-country/Metaverse-Network/blob/master/metadataType.json) #### Step 1: Create a first metaverse with sudo key (council proposal in the future) ![](https://i.imgur.com/9jvZLkT.png) #### Step 2: Mint social token for newly created metaverse ![](https://i.imgur.com/tMAsw5B.png) Minting Social Token mechanism: - 50% Intial ratio of Total Supply will be added to AMM Swap as LP with Intial Social Token Supply : Native Currency Staking - The remaining token will be vested linear for 12 months (12 days in dev) ![](https://i.imgur.com/iSFUCPj.png) Initial Swap LP ![](https://i.imgur.com/l3lfIMS.png) #### Step 3: Create NFT Group, NFT Class and mint NFT NFT Group represent for individual ecosystem which will be bridged in Metaverse Network, e.g Ethereum NFT, RMRK NFT, Flow, Enjin etc. Create NFT Group ![](https://i.imgur.com/np7hkkH.png) Create NFT Class ![](https://i.imgur.com/rzgpfZN.png) Mint NFT ![](https://i.imgur.com/6f5ilbO.png) View NFT ![](https://i.imgur.com/D0adNab.png) #### Step 4: Sell Asset on Global/Local Marketplace Sell on Global Marketplace ![](https://i.imgur.com/39btXTQ.png) Verify Global Auction ![](https://i.imgur.com/uRoSW4b.png) Sell on Local Metaverse Marketplace ![](https://i.imgur.com/Qocl7Zq.png) Verify Local Auction ![](https://i.imgur.com/4xkA2D0.png) Feel free to try out bidding and buy now extrinsics. #### Step 5: Local Metaverse Governance Before creating proposal, only metaverse member can interact with Local Metaverse Governance. To become a member, user need to own land of that metaverse. The process below will show how to set intial max bounds of estate and mint estate as sudo. Set max bound ![](https://i.imgur.com/ixUdXDn.png) Mint new estate ![](https://i.imgur.com/CgCcfmr.png) Store a encoded proposal Encode proposal hash for freeze_metaverse: 0x0f020000000000000000 ![](https://i.imgur.com/UVGtl7y.png) You can find preimage hash in the event as we haven't integrated UI with Polkadot UI ![](https://i.imgur.com/x2aw7ZT.png) Propose a proposal with preimage hash ![](https://i.imgur.com/8T7ZZrL.png) Proposal will become referendum after 15 blocks - these parameters can be changed by metaverse owner. You can try to vote or cancel proposal. Otherwise, proposal will be enacted. ![](https://i.imgur.com/i3PXHxU.png)