--- title: NFT Discord Bot description: Lowering the barrier to entry for crypto by minting and trading of ERC20 and ERC721 tokens over Discord. image: https://i.imgur.com/LfNhsbC.jpg robots: index, follow lang: en dir: ltr breaks: true disqus: xrdevlog --- # NFT Discord Bot ###### tags: `devlog` Minting and trading of ERC20 and ERC721 tokens over Discord. ![](https://i.imgur.com/sqIkdW7.png) - Website: https://app.webaverse.com/ethereum.html - Demo: https://discord.com/channels/757848010846896139/770515252465893377/770516726702014484 - Invite: https://discord.com/oauth2/authorize?client_id=758956702669209611&permissions=0&scope=bot (WARNING: EARLY ACCESS) ### Team - [Avaer Kazmer](https://twitter.com/webmixedreality) - `Avaer (Adrian)#9812` - Coding and integrations - [Jin](https://dankvr) - `jin#6455` - QA testing and documentation --- ## Video <iframe width="560" height="400" src="https://www.youtube.com/embed/7OjEWsDeqd4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Video link: https://www.youtube.com/watch?v=7OjEWsDeqd4 - Minting a NFT (single / multiple) - 1:13 - Previewing the NFT - Sending that NFT to another person - 1:49 - Move NFT to main Ethereum network - 5:00 - View NFT on Opensea - 5:50 - Trading NFTs P2P (Runescape style) - 6:58 --- ## Explainer It's widely acknowledged that onboarding is the biggest friction to mass crypto adoption. Our friends in the VR community are not sure where to get started and Metamask is where they end their journey because it does a poor job of explaining how crypto or NFTs work. Since many of the NFT curious folks are on Discord, we've created a bot that handles crypto for easy minting plus trading of ERC20 and ERC721 tokens. Here's a few examples of its functionality: **Drag and Drop Minting** Drag and drop a file into discord with the message `.mint` to create a 1/1 or `.mint [quantity]` to create multiple editions of a NFT. ![](https://i.imgur.com/VMt3gCw.gif) **Transferring NFTs** To transver a NFT to another player, first get the number ID of the NFT you want to send using `.inventory` command. Then type `.transfer @user [item number] [quantity]`. ![](https://i.imgur.com/9AaATBU.png) To verify that the NFT is in your wallet, you can type `.inventory` again or login the [web client](https://app.webaverse.com/ethereum.html). **Trading** Users can trade nonfungible and fungible tokens with each other over discord. Simply type `.trade @user` to initiate a trade. ![](https://i.imgur.com/ta6Lz48.png) Every trade is given a number since there can be simultaneous trades happening at the same time. Users add tokens with the following commands: `.addft [trade number] [number of tokens]` `.addnft [trade number] [token number ID]` After both parties put up their offer, they click the green check mark. After both click the green check, there's a second verification that happens with the double hearts. After both traders click the double hearts emoji, the bot will initiate the trade. --- ## Tech ![](https://i.imgur.com/RtBCPNp.png =100%x) The NFT Discord bot runs on an Ethereum side chain and allows you to interact with the blockchain by running discord commands like `.inventory`. There's no setup required, anybody who is in the Discord will already have an Ethereum address. Full list of commands below (view by typing `.help`): ``` .status - show your account details .balance - show your FT balance, or that of a user/address .inventory [@user|0xaddr]? - show your NFTs, or those of a user/address .address [@user]? - print your address, or that of a user .key - get your private key in a DM - can be used to log into the app Tokens .send [@user|0xaddr|treasury] [amount] - send [amount] FT to user/address .transfer [@user|0xaddr|treasury] [id] [quantity]? - send [quantity] [id] NFTs to user/addr/treasury .preview [id] - show preview of NFT [id] in channel .gif [id] - show animated gif of NFT [id] in channel .get [id] [key] - get metadata key [key] for NFT [id] .set [id] [key] [value] - set metadata key [key] to [value] for NFT [id] Account .name [newname] - set your name to [name] on the chain .avatar [id] - set your avatar to [id] on the chain Minting .mint [count]? (in the file upload comment) - mint [count] NFTs from file upload Packing .peek [nftid] - check packed ft balance of [nftid] .pack [nftid] [amount] - pack [amount] ft from yourself into [nftid] .unpack [nftid] [amount] - unpack [amount] ft from [nftid] to yourself Trade .trade [@user|0xaddr] - start a trade with user/address .addnft [tradeid] [nftid] - add nonfungible token to trade [tradeid] .removenft [tradeid] [index] - remove nonfungible token at [index] from trade [tradeid] .addft [tradeid] [amount] - add fungible tokens to trade [tradeid] Store .store [@user]? - show the treasury store, or that of a user .sell [nftid] [price] - list [nftid] for sale at [price] .unsell [saleid] - unlist [saleid] from the store .buy [saleid] - buy the [saleid] from [@user] Worlds .createworld - create a world and print its details .destroyworld [worldID] - destroy world with id [worldId] Key Management (DM to bot) .key [new mnemonic key] - set your Discord private key .key reset - generate and set a new Discord private key Help .help - show this info ``` --- ## Treasury Anyone can send NFTs and FTs to the treasury but only certain Discord roles can actually sell from the treasury. View server store `.store` Will display the store, which may look like this: ```treasury's store: #1: NFT 101 (capture3.PNG) for 1000 FT #2: NFT 102 (capture3.PNG) for 1000 FT #3: NFT 25 (thisisepic.mp4) for 42069 FT ``` Buy something from server store `.buy 3` View treasury balance `.balance treasury` Send NFT to the treasury `.transfer treasury [NFTid]` Sell NFT from the treasury (NFTid must belong in the treasury already) `.sell [NFTid] [Price]` The treasury plays an important role in the community. Privileged access via Discord roles, stakeholders will be able to view the treasury and make decisions based around how to best manage their resources. --- ## Packs Pack and unpack fungible tokens from NFTs. Can be tradeable then on Opensea. To-do: - [ ] Design booster pack for $GREASE - [ ] Pack booster packs for giveaway ``` .packs [@user|nftid] - check packed ft balances of [@user] or [nftid] .pack [nftid] [amount] - pack [amount] ft from yourself into [nftid] .unpack [nftid] [amount] - unpack [amount] ft from [nftid] to yourself ``` #### Packing Example Below is an example for how you can mint and send NFT gift cards to other users in the server. ``` # Mint 10 copies (drag and drop file first) .mint 10 # View inventory to verify mint and NFTids .inventory # Pack 50 grease per pack (manual atm) .pack [nftid] 50 .pack [nftid] 50 .pack [nftid] 50 # Send a gift card to a friend .transfer @user [nftid] # Friend can unpack any amount .unpack [nftid] 20 ``` --- ## Web The bot also has a web interface (https://app.webaverse.com/ethereum.html) that supports login via: - key - email - discord After logging in, you'll be greeted by the UI that lets you preview whats in your sidechain and mainnet Ethereum wallet as well as your balance of fungible tokens. ![](https://i.imgur.com/HqjKjDj.png) --- ## Roadmap The NFT Discord bot can end up as being the most scalable and frictionless on-ramp into the world of crypto and NFTs. This bot can be useful in many other ways. For education, communities can play with NFT concepts on discord without needing to go through setting up Metamask beforehand. Transactions happen quickly on the sidechain. For virtual events, it can be as easy to create tickets and merch as it is to setup [calendar reminders](https://sesh.fyi), helping make the behind the scenes work better and sustainable. In order to make the bot better and maintanence sustainable, our plan is to monetize by only creating a token that's used for minting NFTs. This fee extends only to the server admin that invites the bot, while a discord role for minting/crafting of NFTs can be appointed to other people on the server. This ensures that the treasury can't be spent by day 1 people on the server and by only those that the admin and community trusts. It also creates an incentive for reduced spam and more quality supply. There is an explorer for discovering NFTs minted by the bot via the Opensea link on the website. There can be Opensea storefronts that accept tokens as well, giving servers more options for how they want to spend and accumulate more tokens for minting. Discord is the factory, Opensea is the bazaar. --- ## Tokenomics ![](https://i.imgur.com/BWQqZDL.png) Two types of fees: paid by minter, paid from treasury (if you have crafter role) - 10B token supply - 1 million grease minted - 10 grease / 25 cents per mint transaction (can batch mint) - Packs of grease: - 1000 grease = $25 - 2000 grease = $50 - 4000 grease = $100 - Opensea fee 7.5% Start with 10k liquidity, plan giveaways, and spent grease goes back to main wallet. --- ## Future Ideas - Fungible tokens to mint NFTs - [x] NFTs that hold or can be redeemed for FTs for minting NFTs (it's like a gift card) - [x] `.store` for the server store that certain Discord roles can list to - [x] `.store @user` for a user's personal store - 7.5% percentage seller fee on Opensea - Another way to preview the inventory besides a detailed list view, perhaps a link to a thumbnail preview? - Shows users NFT inventory as card collection on a simple website - Easy to embed as a widget for other websites - .preview the entire inventory with screenshot + numbers overlay - `montage *.png -tile 12x5 outdir/out.png` - https://github.com/KnicKnic/WASM-ImageMagick - Some want to buy a mesh export of their parcel - 15, 30, 60 minute time slots (initiate sablier.finance smart contract) - Book meetings ahead of time (mint calendar slot) ### Other ideas Create a recipe book for digital goods with short list of commands, perhaps providing some templates. Fungible tokens can be packed one way into any NFT. This could turn any NFT into a piggy bank of sorts, perhaps useful for fundraising? Vprod: While in VR inside VRchat with xsoverlay / ovrtoolkit, we can do a trade on Discord. Sponsorship NFTs for the webaverse server store such as: banners, swag, and booths. Make an NFT for a feature and list it for sale, once it's bought the feature is released. Can be useful for buying extra features for the bot? Emoji to represent grease token: `:oil:` ![](https://i.imgur.com/Mc7It4a.png) --- #### Secret Santa Gift someone that comes with a private message from the bot, which can have an optional from who. This can also serve same purpose as the unlock when purchased feature on Rarible, especially if the message had spoiler tags on as well for added effect. #### Cards To-do: - [ ] Find web designer to create card templates Cards can serve as an awesome metaphor for collectible and composable (think power-ups) asset. One's NFT wallet in VR could literally be a card deck container. Here are some cool designs we could explore: Hacking the CSS on Opensea to display all NFTs to look like trading cards: https://twitter.com/dankvr/status/1318470791877390337 ![](https://i.imgur.com/rzu4gSE.png) Awesome 3D rendered card art (represents cool use of portals for preview): https://twitter.com/robbietilton/status/1318018269299625984 ![](https://i.imgur.com/Z8cQcun.png) These cards are from the game Cross Universe, a VR card game in NeosVR: https://twitter.com/cross_english ![](https://i.imgur.com/KvPq3dN.jpg) We need a web designer to help create a beautiful inventory UI ![](https://i.imgur.com/G3buxpt.png) Should be able to drop the cards into the world or drag them to other people in the UI to trade. --- ## Unlock when Purchased `.wget [id] - get NFT [id] delivered in DM` Certain Discords would want confidentiality of the tokens they are trading, which is especially true with avatar trading servers. Unlock when purchased is also useful when the actual file size of the content is bigger than the allowed file size that can be uploaded on the platform. The actual file ![](https://i.imgur.com/WY8zFPp.png) Currently files are hosted on S3. Once the bot hits mainnet, the bot will DM the pinned IPFS link to the file. --- ## Matrix Twitter Matrix is an open standard for decentralizated communication that can be used to connect Discord communities together together. It does this through bridges: https://matrix.org/bridges/#discord We've tested bridges using bots to connect Matrix together with IRC, Discord, and Mozilla Hubs. When its working they all tune into the same group chat, with messages and media transferring between them no matter which end point it was sent on. However, one can imagine that when connecting chat platforms together the information stream could become noisy and confusing. To prevent spam, the idea of having a matrix style twitter came up so Discords can post succient messages to other Discords. In fact, Discord already has a feature like this: https://support.discord.com/hc/en-us/articles/360032008192. This feature allows for following published messages from other servers via announcements channels. The rate limit is 10 publishes per hour, and if you hit it, you'll see an error message. Another way to prevent spam when combining Discords is an idea inspired by High Fidelity and Gather Town. Imagine various Discords that are linked together visualized like a venn diagram. Now imagine your Discord avatar as a 2D character on this map. Using this map you could type, hear, and talk to people in the servers you are currently standing around. --- ## Demo Interact with the bot on the Untitled NFT Hackathon [discord](discord.gg/WuH3CEK) here: https://discord.com/channels/757848010846896139/770515252465893377/770516726702014484 --- ## Files - https://github.com/webaverse/contracts/blob/master/ethereum/WebaverseERC20.sol - https://github.com/webaverse/contracts/blob/master/ethereum/WebaverseERC20Proxy.sol - https://github.com/webaverse/contracts/blob/master/ethereum/WebaverseERC721.sol - https://github.com/webaverse/contracts/blob/master/ethereum/WebaverseERC721Proxy.sol --- ## Untitled NFT Hack - Twitter: https://twitter.com/NFT_hack - Ideas: https://medium.com/nfthack/nft-hack-ideas-prizes-bounties-343c0c7c26a5 - Submissions: https://medium.com/nfthack/untitled-nft-hackathon-submissions-71bb7d686dcc The theme of the hackathon was composability. NFT Discord Bot made 5th place out of 30 teams during the Untitled NFT Hack! :trophy: We also hosted a couple of virtual events in the Internet Archive reconstruction during the hackathon. In the VRChat version we gathered WebXR and Web3 developers onto the stage to discuss composability. <iframe width="560" height="315" src="https://www.youtube.com/embed/t4IQwq47LuY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Questions that we discussed include... ![](https://i.imgur.com/qvpOnFS.png) The day after we had a virtual meetup in the same world using Mozilla Hubs with a few lightning talks. ![](https://i.imgur.com/v3vSFKR.jpg) One of the goals of the hackathon is to build a builder community of Metaverse + web3 NFT DeFi hackers. We're seeing if the NFT bot plays well with the Hubs discord bot and sesh.fyi calendar bot for building an awesome online communities together. This hackathon has been a blast and the Discord bot is proving super useful. Join the Webaverse community and come check it out: discord.gg/9M8awV8 --- ## Launch Ribbon cut - Studio with boomboxhead + Joe Rogan set - Discuss discord bot - Philosophy - WIP announcement - Blog post - cent.co - Stream date - Friday - Giveaway / token distribution - Open trading on uniswap - Sell packs on opensea - Info on first WebXR NFT drops (1-2 a week) - Asset gathering (community) - Description - Video clips ## One liners **Mighty Minting Machine** ![](https://i.imgur.com/dxHVwlW.png) ![](https://i.imgur.com/WjeXLEE.png) - Crypto for communities. - "build a meme economy right in discord" - it's the easiest way to participate in a virtual economy with the community - **Turn Discord into a MUD: M3bot is a CLI for the Ethereum world computer that your community can all use to earn cryptocurrency with.** - "this bot is the easiest way to publish and trade digital goods" - Grease helps launch your community into the global virtual economy: mint and trade tokens, permissioned access to channels and events. - Grease is the easiest onramp into crypto. Mint and trade tokens with your community in realtime. - Make real crypto tokens, trade them, run quests, and participate in the global crypto economy from the comfort of Discord. - Grease is the easiest way to create and exchange real value over Discord. - Grease is a token that reduces friction for the multiverse economy