<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rhiza</title>
    <description>The latest articles on DEV Community by rhiza (@rhizanthemum).</description>
    <link>https://dev.to/rhizanthemum</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1277797%2F567f84aa-5023-4c14-ac26-a9739ee8b7ff.gif</url>
      <title>DEV Community: rhiza</title>
      <link>https://dev.to/rhizanthemum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rhizanthemum"/>
    <language>en</language>
    <item>
      <title>Zero Knowledge to Solana Mainnet in 13 days</title>
      <dc:creator>rhiza</dc:creator>
      <pubDate>Wed, 21 Feb 2024 17:54:06 +0000</pubDate>
      <link>https://dev.to/rhizanthemum/zero-knowledge-to-solana-mainnet-in-13-days-1h72</link>
      <guid>https://dev.to/rhizanthemum/zero-knowledge-to-solana-mainnet-in-13-days-1h72</guid>
      <description>&lt;p&gt;&lt;em&gt;When I say "Zero Knowledge," I'm not talking about ZK Proofs or anything like that, I'm talking about my experience level with ANY of the tech used at the start of this project. 😂&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;This is the second post in a series on how I implemented Super Bowl Squares on Solana.&lt;/p&gt;

&lt;p&gt;In this post, I give a bit of context on the project and discuss the technology decisions I made.&lt;/p&gt;




&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;Every year, when the Super Bowl rolls around, my friends and I play a game called Super Bowl Squares, which I described in the previous post in this series.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/rhizanthemum" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4t4Ay0Gv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://media.dev.to/cdn-cgi/image/width%3D150%2Cheight%3D150%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto/https%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Fuser%252Fprofile_image%252F1277797%252F567f84aa-5023-4c14-ac26-a9739ee8b7ff.gif" alt="rhizanthemum"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/rhizanthemum/super-bowl-squares-on-solana-3hhe" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Super Bowl Squares on Solana&lt;/h2&gt;
      &lt;h3&gt;rhiza ・ Feb 10&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#solana&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#rust&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#nextjs&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;This year, right after the AFC and NFC championship games ended, exactly two weeks before the Super Bowl, I had an idea. I wanted to put the Super Bowl wager game called Squares on a blockchain. I floated the idea in the Discord. When I woke up to some encouragement that Monday morning, I made my mind up to actually do it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsoty3p5w8b1n0myeuv5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsoty3p5w8b1n0myeuv5s.png" alt="discord chatter from January 29th" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;
discord chatter from the morning after the conference championship games



&lt;p&gt;&lt;br&gt;&lt;br&gt;
Setting aside the insane 13 day deadline I just signed myself up for, there were a few obstacles I faced -- like, for one, I had absolutely zero experience with any of the tech necessary to pull this off.&lt;/p&gt;

&lt;p&gt;While I am tutorial-familiar with Solidity and web3 in general, I had never written and deployed a smart contract or dApp from start to finish.&lt;/p&gt;

&lt;p&gt;I knew this wouldn't work on Ethereum due to high gas fees. I am also not a huge fan of the L2/L3 approach to scalability (which I'll not get into) so even my very small amount of Solidity familiarity isn't going to help us here. &lt;/p&gt;

&lt;p&gt;I'd need to pick another blockchain to deploy on. &lt;/p&gt;



&lt;p&gt;I narrowed my choices to Solana and Sui, two of the fastest, cheapest, and most popular L1s. But they both have their pros and cons. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Solana is immensely popular right now; Sui not as much. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Yet Solana's smart contracts are written in daunting Rust, which looks like z̶̪͉̅͗a̷͚͛l̸͙̝̀g̷͈͆̉o̶̤͉͊ ̶͉̾̔t̵͉͛ḛ̶̢̓͝x̶͚͚́͠ť̷̑͜ to me; Sui uses &lt;a href="https://github.com/MystenLabs/awesome-move"&gt;the beautiful Move language&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Luckily, while I was doing research, I found this article by &lt;a href="https://x.com/kklas_"&gt;@kklas_&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdmhpowx2vkhhk1pnfhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdmhpowx2vkhhk1pnfhb.png" alt="solidity-rust-anchor-move" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/@kklas/smart-contract-development-move-vs-rust-4d8f84754a8f" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---cnvXvgY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fill:88:88/1%2AfaEh7fanf_zBzS2MvyeVOA.jpeg" alt="Krešimir Klas"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/@kklas/smart-contract-development-move-vs-rust-4d8f84754a8f" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Smart Contract Development — Move vs. Rust | by Krešimir Klas | Medium&lt;/h2&gt;
      &lt;h3&gt;Krešimir Klas ・ &lt;time&gt;Sep 12, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YjpYcCMa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;It was a godsend for me in the moment.&lt;/p&gt;

&lt;p&gt;While the article clearly puts Move on a pedestal over Rust/Anchor, it did an amazing job of explaining the programming model and limitations of Rust/Anchor-based smart contract development. I was thinking, "damn, if only Solana supported Move!" &lt;sup id="fnref1"&gt;1&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;With my new-found baseline understanding of Solana's account-based programming model, I bit the bullet. Everyone I know has &lt;a href="https://phantom.app"&gt;Phantom&lt;/a&gt; installed. No one I know has a Sui wallet installed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Initial approaches
&lt;/h2&gt;

&lt;p&gt;After making my mind up to go with Solana, I figured I'd get the contract deployed and tested first, then try to figure out the front-end situation.&lt;/p&gt;

&lt;p&gt;While looking around at resources on the net, I noticed a project called Seahorse. Seahorse is a compiler that lets you write Solana programs in Python.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I was really trying to avoid writing any Rust.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Look, I'm a Ruby fan boy. I've been in love with Ruby's expressiveness and readability for almost two decades now. It's the most beautiful language ever created and second place is not even close.&lt;/p&gt;

&lt;p&gt;So my first thought was to use Seahorse.&lt;/p&gt;

&lt;p&gt;Python in general is very, very similar to Ruby, it's just not quite as good as Ruby.&lt;/p&gt;
haha, I'm trolling. I do prefer the syntax of Ruby but Python's community and libraries (especially in the field of ML) are unmatched.



&lt;p&gt;I thought that since I'm familiar with Python, writing the contract in Python would be way easier than trying to learn both Rust and Solana.&lt;/p&gt;

&lt;p&gt;However, I quickly ran into roadblocks and lots of questions. The docs aren't as fleshed out, there are not many code examples, and my inexperienced eyes couldn't distinguish whether I had Seahorse or Anchor/Solana problems.&lt;/p&gt;

&lt;p&gt;I also poked around with Solang and experienced similar issues.&lt;/p&gt;

&lt;p&gt;I decided to go with Rust and started the &lt;a href="https://beta.solpg.io/tutorials/hello-anchor"&gt;Hello, Anchor tutorial&lt;/a&gt; on Solana Playground.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solana Playground
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fre059lu5ds8y97yc2f5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fre059lu5ds8y97yc2f5o.png" alt="Image description" width="800" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solana Playground is really neat. I didn't have to worry about setting up my local environment until I was more comfortable with what I was doing.&lt;/p&gt;

&lt;p&gt;Every time you &lt;code&gt;build - deploy - update IDL&lt;/code&gt;, your Typescript types are updated and automatically imported in your client and test files.&lt;/p&gt;

&lt;p&gt;There's even a graphical method invocation tab for testing your program's instructions without writing any code.&lt;/p&gt;

&lt;p&gt;I highly recommend using the Playground to familiarize yourself with the development process if you're just getting started with Solana development.&lt;/p&gt;

&lt;p&gt;The Playground also has built in tutorials. The code is loaded directly in the IDE and you can build and deploy as you would your own project.&lt;/p&gt;

&lt;p&gt;I did some tutorials on Solana Playground and learned about program-derived addresses (PDAs). Once I started to grasp the concept of PDAs, I was able to start mentally building a data model and visualize the state transitions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rust, Anchor, and what front-end?
&lt;/h2&gt;

&lt;p&gt;After I had written a rough draft of a contract with a workable data model, I decided to start researching how I was going to build the front-end.&lt;/p&gt;

&lt;p&gt;I went to GitHub and tried to find some example Solana projects with a frontend. Pretty much every single app that I could find was built with React.&lt;/p&gt;

&lt;p&gt;Guess what? I also had zero React experience, but without any other option&lt;sup id="fnref2"&gt;2&lt;/sup&gt;, I didn't have much of a choice here.&lt;/p&gt;

&lt;p&gt;I found this scaffold project called &lt;a href="https://github.com/solana-developers/create-solana-dapp"&gt;&lt;code&gt;create-solana-dapp&lt;/code&gt;&lt;/a&gt; and generated a Next.js project styled with Tailwind and DaisyUI components. &lt;/p&gt;

&lt;p&gt;I have some strong opinions about Next.js and React. I really, really wanted to abandon the front-end and but I decided to stick with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Experience with chosen stack
&lt;/h2&gt;

&lt;p&gt;If you're keeping track at home, I had 13 days to build an app with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero smart contracts ever deployed&lt;/li&gt;
&lt;li&gt;Zero understanding of Solana's programming model&lt;/li&gt;
&lt;li&gt;Zero experience with Rust&lt;/li&gt;
&lt;li&gt;Zero experience with Anchor&lt;/li&gt;
&lt;li&gt;Minimal experience with Typescript&lt;/li&gt;
&lt;li&gt;Zero experience with React&lt;/li&gt;
&lt;li&gt;Zero experience with Next.js&lt;/li&gt;
&lt;li&gt;Zero experience with DaisyUI&lt;/li&gt;
&lt;li&gt;Minimal Tailwind experience&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ChatGPT as a learning tool
&lt;/h2&gt;

&lt;p&gt;Before I dive into implementation details in the next post, I just wanted to say this absolutely would not have been possible without ChatGPT. I'd still be on page 52 of &lt;a href="https://nostarch.com/rust-programming-language-2nd-edition"&gt;&lt;em&gt;The Book&lt;/em&gt;&lt;/a&gt;. ChatGPT as a learning tool is still &lt;strong&gt;severely&lt;/strong&gt; underrated and undervalued and I will think that until every single person on Earth agrees with me.&lt;/p&gt;

&lt;p&gt;Does it make mistakes? Yes. Does it provide less-than-optimal solutions sometimes? Yes. Does it sometimes lead you down a trail of inexplicable red herrings? Again, yes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BUT SO DO HUMANS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about it, when you are pairing with a coworker, that person does not know every single thing there is to know without ever making a mistake. They could possibly lead you astray and you know it. So, what do you do? You stay vigilant and keep an open mind for mistakes. &lt;/p&gt;

&lt;p&gt;It's a learning journey together.&lt;/p&gt;

&lt;p&gt;Treat ChatGPT as you would your co-worker and good things will happen, I promise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The next post in this series will be a technical post about the implementation that I came up with.&lt;/p&gt;

&lt;p&gt;I honestly have no idea if it was a good approach or bad approach. I'm looking forward to more folks getting some eyes on the code and hopefully hearing some feedback!&lt;/p&gt;







&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;I'm not really sure what happened with the project, but there [exists an announcement] from like 4 years ago (&lt;a href="https://medium.com/solana-labs/solana-now-supports-libras-move-vm-f5fabaf3033c"&gt;https://medium.com/solana-labs/solana-now-supports-libras-move-vm-f5fabaf3033c&lt;/a&gt;) from Toly that says Solana now supports Move. However, the &lt;a href="https://github.com/solana-labs/example-move"&gt;GitHub project has since been archived&lt;/a&gt; and I couldn't find any code examples. ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;I later found the &lt;a href="https://dev.to/0xmuse/accelerated-guide-to-fullstack-web3-with-ass-anchor-solana-and-svelte-1mg"&gt;Anchor/Solana/Svelte (ASS)&lt;/a&gt; stack. Also had no experience with Svelte, but Lord, it looks so much better. I will probably try Svelte next time. ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>web3</category>
      <category>solana</category>
      <category>rust</category>
      <category>react</category>
    </item>
    <item>
      <title>Super Bowl Squares on Solana</title>
      <dc:creator>rhiza</dc:creator>
      <pubDate>Sat, 10 Feb 2024 22:15:16 +0000</pubDate>
      <link>https://dev.to/rhizanthemum/super-bowl-squares-on-solana-3hhe</link>
      <guid>https://dev.to/rhizanthemum/super-bowl-squares-on-solana-3hhe</guid>
      <description>&lt;p&gt;&lt;a href="https://squares.gg"&gt;Super Bowl Squares on Solana&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For as long as I can remember, every time the Super Bowl came around, me and the boys would play this game called Super Bowl Squares.&lt;/p&gt;

&lt;p&gt;It's a wager game. You buy real estate on a 10x10 grid that represents every possible score. If you own the square that represents the score when each quarter ends, you get a payout. &lt;/p&gt;

&lt;p&gt;Hell, ChatGPT can explain it better than me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There's a 10x10 grid, 100 squares up for grabs. Each square is gonna end up with a pair of digits – one for each team playing. These numbers reflect the last digit of each team's score at the end of a quarter. Nail the matching score at quarter's end, and boom – you score some cash.&lt;/p&gt;

&lt;p&gt;Example: If the score's 21-17 when the quarter ends, and you've got the square with 1 for Team A and 7 for Team B, you're the winner for that quarter.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So even if your team isn't playing in the Super Bowl, you're super invested in the score of each quarter of the game.&lt;/p&gt;

&lt;p&gt;I promise, if you play this game, you won't just be watching for the commercials. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why put this on the blockchain?
&lt;/h2&gt;

&lt;p&gt;Over time, we built the below Google sheet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzttbqhrcpv1he2mk83d2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzttbqhrcpv1he2mk83d2.png" alt="This year's spreadsheet" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you notice on the right, we've got a centralized treasurer (read: escrow) who we cash app our $5 per square to.&lt;/p&gt;

&lt;p&gt;Since Google sheets has the ability for collaboration, we can go in and add our names to the squares we want to purchase. &lt;/p&gt;

&lt;p&gt;Sure, this works fine. This is a big improvement on our system from a few years prior, where the spreadsheet was entirely controlled by the treasurer. But it's still a very manual process.&lt;/p&gt;

&lt;p&gt;This is a &lt;a href="https://www.superbowlsquares.org/how-to-play"&gt;fairly popular game&lt;/a&gt;, and I imagine a lot of people do not have a cracked-out Google sheet like we do. A very popular sports site &lt;a href="https://www.sportingnews.com/us/nfl/news/printable-super-bowl-squares-grid-2024/eeb51d69301dcb1617d36a53"&gt;published a printable sheet&lt;/a&gt; where you and your crew would have to write everything down on paper!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr4m1sj6cw31mjgufjk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr4m1sj6cw31mjgufjk2.png" alt="Image description" width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By putting this on-chain, we remove the treasurer, all actions are automated, and there's near zero overhead of creating new games.&lt;/p&gt;

&lt;p&gt;Imagine if our treasurer had a few different groups of friends that they wanted to play with. Even with our Google sheet, that is a lot of overhead.&lt;/p&gt;

&lt;p&gt;By bringing this on-chain, you create a game at a click of a button, and share the link with your friends. That's it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Board setup
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrxzpplldnrd0j43eign.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrxzpplldnrd0j43eign.png" alt="Image description" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You start with an empty 10x10 grid with unlabeled x and y-axis headers.&lt;/p&gt;

&lt;p&gt;Each square has a set cost. IRL, we usually do $5 a square, which amounts to a $500 pot with 5 $100 payouts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12cd3nprdvi3eqc6afl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12cd3nprdvi3eqc6afl7.png" alt="Image description" width="800" height="1100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each player selects the squares they want to purchase, which are denoted by a sticky note colored background and the total cost is shown on the purchase button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flylnvsc550uag28xu6o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flylnvsc550uag28xu6o2.png" alt="Image description" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the squares are purchased, they'll turn a new color and contain the first two letters of the buyer's wallet address. The players legend to the left of the board is also updated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96v3is351osi7p3y1kmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96v3is351osi7p3y1kmt.png" alt="Image description" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once all 100 squares are purchased, the &lt;code&gt;Purchase Squares&lt;/code&gt; button turns into a &lt;code&gt;Finalize Board&lt;/code&gt; button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqnbtrn3sz4qhx45dfl3i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqnbtrn3sz4qhx45dfl3i.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tells the contract to generate the x and y-axis headers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmisrr8bum8x7v0yew7z1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmisrr8bum8x7v0yew7z1.png" alt="Image description" width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the actual Super Bowl has started, let's say the first quarter has ended, and the score is &lt;code&gt;49ers 21 - 10 Chiefs&lt;/code&gt;. The square that aligns with the headers 1 on the y-axis and 0 on the x-axis will be the winner.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;8Df1..vd6y&lt;/code&gt; is the winner, and will have a &lt;code&gt;Claim&lt;/code&gt; button in the Payouts section. The amount is for 1/5th of the total pot minus a 6.9% fee. &lt;/p&gt;

&lt;p&gt;This repeats for each quarter of the game.&lt;/p&gt;

&lt;p&gt;If the game doesn't go into overtime, the player who won the fourth quarter gets a doubled up payout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;That's pretty much it! It's a super fun game to play with friends and a great way to financially incentivize yourself to be invested in the big game (lol).&lt;/p&gt;

&lt;p&gt;Always more fun watching sports when something is on the line, right?&lt;/p&gt;

&lt;p&gt;P.S. I'll be back with a technical post about how I implemented this in a future post.&lt;/p&gt;

&lt;p&gt;I also plan on keeping this alive for March Madness, NBA Playoffs, and more. Stay tuned!&lt;/p&gt;

</description>
      <category>solana</category>
      <category>rust</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
