Creativity and Solidity Development by Ann Kilzer
Devcon·Fri, Oct 9, 2020, 12:00 AM
Can the challenges of Solidity development — gas limitations, storage scarcity, and decentralized computation — create conditions for creative DApp development? Are the parts of Solidity that often confound developers actually starting points for creative thinking? This lightning talk will showcase a few novel applications of Solidity, from DApp layering and ERC721 art generation, to some of my personal projects, including a fruit-backed cryptocurrency, a blockchain treasure hunt, and an ERC721 Curry Generator. This talk will also provide insight into how Curvegrid builds DApps.
Transcript
this is creativity and solidity development my name is ann kilzer a little bit about me i'm a software engineer and visual artist i grew up in montana in the united states and moved to tokyo two years ago and i'm now the lead software engineer at curb grid and that's me with a real yak curve grid we are nine engineers in tokyo we're trying to make blockchain easier to use by build building a middleware platform for ethereum and other blockchains so first i'd like to talk about creative constraints now when i was in college i studied fine art and computer science and math and i found that they often related so here's an example of a wood block i was working on in japan and i'm trying to make a picture of a train but in order to make this visual picture i have to think about color separations and i have to think about technical issues so i always found the two that like science and art really went well together and here's the finished image there's several different layers but again you know there's this problem solving that goes into making the end result so sometimes in coding and in life we encounter different obstacles maybe our hero here can't get through this door but sometimes if we take a step back and get some perspective we might find another way through so how does this have to do with solidity well salinity is one of the more unique languages i've worked with and i'm not no expert in the language but i find it really fun that well i found it challenging at first but then i thought hey you know these challenges are actually jumping off points for creative thinking so i wanted to highlight some things that i think are interesting about solidity from language features to things people have built on top of salinity and these are just inspiration points so very popular lately is erc 721 tokens or nft's non-fungible tokens which are great for collectibles a real world analogy would be the vinyl figurines that you can see in japan in stores like mandarake and these can be very valuable some of these are go for 500 u.s so people have built all sorts of creative things using erc 721 from axi infiniti's little creatures to block cities to even real world mashups like this austrian postal service stamp that's issued on ethereum and crypto kaiju which combines nfc and vinyl figurines with with blockchain collectibles one of my favorite projects is by larva labs it's called autoglyphs and these are unique artworks that are erc's 721 tokens each artwork is generated there's an edition of 512 peaches pieces and unfortunately they're they're all sold out but you can still check out the code and one of the really novel things about this project is all the code to make the image is written in solidity so i've got a little snippet of some of the code here you can see um that we're drawing um yeah and placing different characters to make these kind of neat symmetric images one of the first personal daps that i wrote it was kind of well it was completely a joke but i wanted to do something to make my coworkers laugh and i took something common in japan which is overpriced fruit yes they can go up to 27 000 us dollars but it's more likely at a grocery store you'd see melons from twenty to a hundred dollars and i thought it would be funny to make a token backed by fruit and in order to do that i used the time stamp feature of solidity language and um yeah as far as i knew when i did this in 2008 i hadn't seen any other projects that were doing expiring erc 720 or erc20 tokens but yeah so basically there's a date when you plant your fruit and the contract records that and then there's a certain window which the fruit should be ready so now keyword is useful in solidity but is you know word of caution miners can make small manipulations so it's good to have the window not too small in case there's cheating and i have the source code for this on my github page if you're curious here's an example of the internal transfer function for the erc20 token notice that we um require that it's not expired that the internal check is expired is checking against the time stamp and so basically when the melon rots we can't transfer it hash functions or you know one-way functions can be used to kind of mask information or condense it another game and dap that i built was a blockchain stamp rally what's a stamp rally it's a treasure hunt that's popular in japan often they're connected with train stations people will travel on a rail network to different train stations and get different physical stamps and you know you can kind of collect these in a book and get a prize i thought it would be fun to do this virtual uh as a virtual thing and it's even more relevant today when many of us are trying to stay at home uh you know instead of going to a place maybe you could enter a passphrase or enter the lat lawn in some sort of virtual world like decentraland so here's an example of the web 3 frontend that i built it has the circle where the stamp would go and then if you enter the correct passphrase you get you know a cute little image uh the next feature i want to show an example i was playing axi infinity's blood moon rising the other day and noticing you know that they've updated their dap a lot it's pretty cute uh but one thing the depth is really interactive and it's fast-paced which is great for games so for a user experience for a game you wouldn't want to constantly be signing transactions can you imagine if you just had pop-up pop-up and you have to spend gas that would kind of interrupt with the flow of the game so some developers use summary transactions where you know you have periodically will sync things to the ethereum blockchain but you don't have to always be doing that because it might interrupt with the flow now it's it's a little tricky to tell what's going on under the hood with axi infinity because their source not all of their source is public but from what i've read it's uh they're using a side chain uh built on the luma sdk and they're um i believe the side chain is called um a zombie net or zombie chain and then they sync it to the ethereum network so i was able to like look at this on either scan and you can decompile the bytecode but it's a bit well there's a little more slew thing to be done anyway there's clearly these points where you're checking into and syncing um syncing with the ethereum blockchain but the actual desktop app is really snappy and unless you really knew you wouldn't necessarily notice that it's a blockchain game it just feels like a game and here's another picture of it we may be familiar with burning and solidity as far as sending a lot of erc20 contracts will have a burn function that you can send your tokens to the zero address and relinquish control of them and that could certainly be done with any other crypto asset for example some of the older maxi infinity code on their github page is calling a burn function inside of when they're retiring maxie i guess taking it out of gameplay they're burning it now here's the feature where i'm going to use the catch phrase that this is going to change gaming forever so yeah here it is i think this is one of the most exciting things is layering and interoperability because blockchain is public and because it's you know shared we can interact with it and it's kind of out there for anyone to use and this can really result in some wonderful mashups for example crypto zombies is this solidity tutorial from the loom network i'm sure most of you have heard of they actually feed on crypto kitty dna and that's just kind of fun and whimsical another example using crypto kitties is a project called kitty hats unfortunately the google chrome extension no longer works but you can still see the source code and some fun pictures and this is an erc20 token that's layered on the erc 721 collectibles and you spend the token to apply the hat bow tie apple watch or monocle to your kitty and then interoperability is the idea that an item can be used in more than one context so a lot of nfts work in different realms so here's a crypto kitty that is combined with my ethereum playing card and then over on the right hand side i'm showing a scene from decentraland and it's featuring um it's featuring actually infinity characters and i believe they plug in with a lot of nfts so yeah basically your smart contracts can work together it's super cool the final part of my talk is uh a brief exercise we did a longer form of this talk at devcon 5 and osaka last year and we you know had 20 minutes and we did this breakout session with cards and people got to brainstorm ideas and that was really fun now this is a virtual conference so the next best thing i can do is show you a like a software version of the game so i wrote it quickly in solidity the brainstorming activity and i'd like to show it to you but first let me explain how it works there's three characteristics of games this is um in making this up but the type of game is it a board game is it a role-playing game is it a god game where there's some you know personality controlling the universe uh what are the themes of the game like what is the world it's set in or the time period and who are the characters and then what's the novel feature of solidity that's our starting point for creativity so here's an example let's say the game is a racing game the themes are post-apocalyptic and our characters are ducks and the feature of solidity we're going to use is burning so if the duck loses the race maybe it gets burned and you know cool name for that might be mad quacks 2 the pond warrior where ducks are just fighting in some gritty desert future another game could be a role-playing game where we use baking and japanese mascots and then we use layering or interoperability let's say it's a like a nintendo switch type japanese mascot bake off and then the underlying tokens each cookie is a different nft that can be traded in another game why not so i'm going to use um the front end i'm going to show a demo of this this is the product that we built at curve grid it's called multi-bass basically it's a api and ui over your smart contract so i i wrote this smart contract the dap idea generator and we're going to interact with it so here we have you know the name the address here i've deployed it on rinkeby we've got some of the read-only um functions of our solidity code we've got events that have been emitted and then we can interact with this contract uh let's see i'm gonna just click send method and okay great so metamask is gonna ask me to sign the transaction and we'll let it go for a moment and see what our new idea is okay uh apparently it would be a role-playing game with snake people fashion and burning so that's the idea uh i can generate another one and see what we get and give it a moment wait for it to be mined you can see some of the earlier ideas i generated today which include a addictive click to win scheme using romance pizza and multisig wallets so i think you win if you and your your um lover buy a bunch of pizzas uh science fiction wild west using voting and a role playing game yeah so that's that's a very short version the lightning talk version of my game if you'd like to try it out the contract is uploaded on rinkerby and i'll upload i'll share a link to these slides in the getter chat you can try multibath our project for free it's free to use on ricobee and robston networks and that's at www.curbgrid.com and the source code is on my personal github page for the dap idea generator thanks for listening to my talk and let me know if you have any questions thanks so much ann that was a fun talk and introduction and i learned so many new cool projects that i didn't know before especially autoglyphs i don't know how i couldn't know this before so beautiful um all right if you have a question for anne we still have a couple of minutes left before the next talk so either shoot it in the github chat or um raise your hand here yeah today i didn't mention yet there's a raise your hand feature in jitsi if you are in the video conference you can raise your hand and then i see that you would like to speak no question so far in the rule and nothing here um yeah then i have a question what is your favorite uh creativity ex solidity project of all of those um i mean i like lava labs a lot just because it was completely unchained and with all of them there's always a risk of the ones that are sort of hybrids of like oh well what if they lose you know how do we make the artwork for this cool collectible like what if that server gets lost so i like that it was like completely blockchain i'm a little sad that they're sold out and i didn't get one but you know that's i guess what makes it special um and then i think second favorite i like the axis because i think they're really cute so yeah yeah yeah
Automatic transcript — names and jargon may be misspelled.