project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Cozy Trading Company

Fully on-chain game where you sail around the ocean, collect resources, and level up! But there's a twist - each island has it's own AMM exchanges, creating a world full of arbitrage opportunities.

Cozy Trading Company

Created At

ETHSanFrancisco 2022

Winner of

🎮 Polygon — Best Metaverse or Gaming

Project Description

Read the full design doc here: https://docs.google.com/document/d/1TYkPdaXszkkEVjXxCBPWq41d6maw4Y7jM1-OhQgLl6I/edit#

Slide deck here: https://docs.google.com/presentation/d/1_aKoBN6xnbJJnBhRiG5Rt5JB7N0uY57n2Dn0RSnifdM/edit#slide=id.g1847203c5af_0_73

=== Overview ===

Cozy Trading Co. is an exploration, resource, and upgrade game where you build a boat and sail the seas to collect resources and treasure.

But there’s a twist! On every island there’s a trading hut where all resources can be exchanged. This is done via AMMs. There are plenty of arbitrage opportunities for players but they must travel to each island to take advantage of it which takes time. Players can choose to engage the game as a “trader” which is played more as an arbitrage game.

There’s also a portal in which resources are converted to ERC20 tokens which can be freely used as players see fit on the blockchain!

=== Systems ===

Players mint an explorer NFT and start on Cozy Island with nothing but an axe. They are able to perform a cutting tree action that emits a certain number of wood over time based on their level. As the player cuts more wood they gain experience and levels which results in cutting wood faster. Levels and XP apply to all 4 player skills (wood cutting, gathering, mining, fishing) After getting 10 wood, the player is able to build a raft with the shipmaster. They can then sail to sugar cove island to collect fruit. They can return to the home island with bananas which they trade for a pickaxe and the ability to mine. Through these series of traveling, resource gathering and interactions the player is able to unlock more skills and upgrades to their ship.

Each island will have unique resources and skill requirements. In addition, each island will have a trading post that supports all trading pairs via AMMs. It is an intentional design to create staggering arbitrage opportunities across islands due to resource availability and distance traveled.

The goal of the game is to level up your boat and character to collect resources more efficiently. There are also opportunities to capitalize on arbitrage opportunities and take a “trader/merchant” role sailing from island to island and trade against the exchanges.

There are 3 extrinsic drivers to the endgame:

  • There will be a global seasonal leaderboard celebrating the best upgraded boats and gold collected
  • Players can sail to “The Gate” players can exchange their resources for equivalent ERC20 representations of them. They can do whatever they wish with the token and trade it back to the in game resource at any time
  • Players can burn gold to mint more explorers. Gold cost to mint increases per new explorer

=== Inflation Resistance ===

  • Infinite upgrades on characters and boat creates infinite resource sink
  • Leaderboard to incentivize leveling beyond efficiency goals
  • Inflationary periods incentivizes more leveling, consuming excess
  • Scaling costs to unlock more Cozy Explorers

=== Revenue === Developers will make money through two primary mechanisms:

  • Activation Fee - Players have to pay an activation fee on their Explorer to begin their journey in Cozy Trading Co. Admin may optionally make one time fee waivers during initial player onboarding cohort
  • ERC20 Portal - The protocol will charge a nominal fee in MATIC to wrap and unwrap in game resources to ERC20
  • Royalties on secondary marketplaces will be set to 0

=== Intentions === The intentions of Cozy Trading Co. is to build the economic layer for a broader mmo type exploration game experience. The goal may not necessarily be to create an inflation proof system, but one that grows slowly enough that developers and the community can outpace the ecosystem with new content. Pending successful product market fit, we aim to build a more complete game (e.g. more interesting mechanics to gather resources, complex mastery tree etc…) with this inspiring the economic backbone.

=== Goals ===

  • Build a robust game economic system where “players” and “traders” coexist
  • Players can enjoy the game without spending or trading and play the single player progression arc as their main experience
  • Players can also enjoy the game primarily through arbitrage & maximizing profits
  • Bots, automation, and tools are invited as part of the openness and composability of blockchain, and do not degrade the experience of single players
  • Players are able to learn defi mechanics in a fun and low stakes way
  • Explore alternative revenue in the NFT space as royalties inevitably go to 0%

How it's Made

The scope of this hackathon was to design the game and put together a proof of concept through the smart contract work. The Game UI/dApp is out of scope.

Contracts were developed in solidity, with some customer wrappers over hardhat to make the command calls and configuration management easy. Contract addresses are automatically written on deployments which are referenced by subsequent calls. This dramatically improves speed of testing and reliable ops.

Contracts are deployed on Polygon. I've been using Polygon as our side-chain for anything related to game in order to build games at "arcade pricing" on a reliable network. NFT assets are stored on IPFS

In this hackathon the following was delivered:

  • Design doc (see above)
  • Pitch deck (see above)
  • Smart contract code where a player -- mints an explorer NFT -- mines gold -- converts to ERC20 -- mints another explorer with the ERC20 -- Exchanges gold for iron in an AMM -- Travels
  • In addition I built tooling and a CLI dashboard to visualize the game state better
background image mobile

Join the mailing list

Get the latest news and updates