Theme Week 4 Recap: Smart Contracts and Angry Dynomites Lab

Angry Dynomites Lab 🦖
3 min readNov 27, 2022

--

Quick Intro: We learn about smart contracts, the building blocks of the extensive web3 and metaverse economy. Smart contracts are programs on the blockchain following predetermined terms and conditions IF/WHEN…THEN statements. We tweaked our smart contracts for lower gas fees and higher security.

What Smart Contracts are Angry Dynomites Lab using?

We are using components of smart contracts from OpenZeppelin. OpenZeppelin is a company that creates and audits smart contracts to ensure the highest quality possible. From their smart contracts we use the parts that are useful to us.

Dynos Collection Smart Contracts

The contracts for the collections are on Ethereum. Fire and Water Dyno Collection contracts are similiar with different components for both collections.

Game Assets Smart Contracts

The game assets smart contract for the $Fire currency exists on the Polygon blockchain and complies with the ERC-20 standards. Why did we choose Polygon?

  • Lower gas fees: Polygon offers lower gas fees than other chains like Ethereum. We want to offer you the cheapest way possible to claim the tokens your Dyno created.
  • Community: More and more projects are launching on Polygon (e.g. the Reddit NFT Avatar Marketplace). More projects mean more people and community is our most important aspect.
  • Ethereum Virtual Machine (EVM) compatible: Ethereum contracts also work on Polygon. This allows us to combine the collection smart contracts with the currency ones.

We looked at other chains during the evaluation, including projects like Immutable X, but many game-specific chains require a less compatible programming language, creating a lock-in effect.

What makes Angry Dynomites Lab Smart Contracts special?

Separation between Minting and Market Phase

A feature that we didn’t see at another project before:

  • Collection Contract: as mentioned before this is the contract defining the Angry Dyno Collection. Most projects have the minting guidelines implemented in their general smart contract. However, severe security issues might occur if there is a mistake within.
  • Store Contract: this contract has temporary access during the minting process. In general, minting and transferring tokens are two different processes — this is why we have two different contracts. After the mint, the store contract loses its access and rights and we reduce our blast radius. For us, it is crucial to have our smart contracts as secure as possible.

Optimization Enabled

Optimization Enabled with 300 runs

On Etherscan you can see that we have the Optimization Enabled with 300 runs. What does this mean?

Optimizations Enabled reduces the costs during the mint and for transfers but it increases the cost for deploying of the smart contract. This means that we pay higher costs, so you can enjoy lower fees. Since we are a game for everybody, we want to ensure that players with less money can also enjoy the game. A lot of other projects don’t properly use optimizations on the smart contracts.

Non-Upgradable Contracts:

There are two different ways of adapting smart contracts in the future: upgradable and non-upgradable. Upgradable contracts can be altered after they are created. However, it remains questionable if the below-lying storage structure remains the same — and secure. In our opinion, upgradable contracts bear a higher risk which could turn out negative in the future. Therefore, we consciously decided against upgradable contracts to reduce the potential for threats.

Fun Fact: all our contracts show Angry Dynomites Lab at the beginning as a code-comment ASCII art. See below:

Find our contracts here:

Fire Dynos: https://etherscan.io/address/0xeE85B6ce11276B50C72B2504776F8fAa36F29931

Fire Tokens: https://polygonscan.com/address/0x502f6e93285aa37b2fc326e64ffc3d9eef47130d

Water Dynos: https://etherscan.io/address/0xd1b248dee3a4a0e9215e349dce237d4b6d6bb8a3

We hope you enjoyed this theme week and cannot wait to introduce you to the next topic on Monday!

Join the Dyno Community now 🦖

Follow us on Twitter
Follow us on Twitch
Join our Discord
www.angrydynomiteslab.com

Watch our Angry Dyno trailer here

--

--