Starkware products ecosystem - how to start? (chess game example)

Trying to understand how to start with starkware products.

Let’s imagine I want to build simple blockchain chess game:

  1. Round starts: black and white can move one after another. We have a prize for this game.
  2. Anyone can submit a TX to move a figure black or white (based on round)
  3. Once game finished, the account that made more moves receive a prize.

Approach-1: build on starknet:

  1. I just need to write and deploy the contract to starknet (and additional contracts to L1) and that’s it.
  2. Starknet is based on Starknet OS, so it manages state, etc…
    No questions here, just write a contract and deploy.
    Limitations: 100tx per sec maximum (limitation of the sequencer?)

Approach-2: cairo program + sharp:

  1. I need to write the program on Cairo: that will be like “separate server” (that users interact with)
  2. I need to manage “state” by myself as there is no Starknet OS
  3. I need to send Cairo trace to SHARP that will generate stark proof and commit to L1
  4. I can’t interact with other contracts
    This part is less clear, but I see that all the tools (cairo-lang and sharp API) are available, and seems no limitations for that.
    Limitations: infinite amount of tx/sec. Depends on the implementation of the server, as we need to code it ourselves?

Approach-3: starkex:

  1. This is similar to approach-2, but starkware team has its private starkex server (that also based on starknet OS and can keep state).
  2. I just need to write the contract (the same as for starknet) and deploy to starkex. For that I need to receive approve from starkware team.
  3. Starkex interact with Sharp
  4. No composability
    Starkex “node” is private? But all other is the same.
    Limitations: infinite amount of tx/sec? Because I receive separate “server” that run starkex node, which is super fast.

Approach-4: L3:
Not clear at all.

  1. I can’t fork starknet/starkex nodes as it’s fully private for now. If I want to be able to use features of Starknet OS I need to build my own cairo program that integrate Starknet OS.
  2. How to push prove to L2, does SHARP support this mode now?
  3. Async composability exists with L2.

Correct me if I understand it wrong or miss anything.
Would be great if you could push links to any documentation that helps to implement approach-2 or approach-4

18 Likes