11

I'm totally new to cryptokitties, but my understanding of cryptokitties so far is:

  • It's a smart contract that generates new kitties according to your ethereum address.

My questions are:

  • If you are breeding kitties, how does it handle randomness to "breed" different attributes of kitties?
  • Can we see how the kitties smart contract is made?
  • Can the crypto kitties website run as a standalone app (dapp) to interact with the ethereum blockchain?
Patoshi パトシ
  • 4,800
  • 7
  • 45
  • 93

2 Answers2

14

Partial answer:

A large chunk of the contract can be seen here: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code

The breeding algorithm is "sooper-sekret" and is handled by a contract that implements GeneScienceInterface. As not-an-Ethereum-developer, I don't know where that contract lives. But @comodoro does! it's at 0xf97e0A5b616dfFC913e72455Fde9eA8bBe946a2B Presumably, the source isn't published and you'd have to reverse engineer how the pseudorandomness is implemented. Also presumably why people from the cryptokitties creators aren't allowed to own the cryptokitties (at least, I read that somewhere): they'd get all the fancy cats!

lungj
  • 6,680
  • 2
  • 17
  • 45
5

CryptoKitties is composed of 4 public facing contracts.

In November 2017, as part of their launch, the AxiomZen team put out the CryptoKitty Bounty Program with all the primary smart contracts on github here: https://github.com/axiomzen/cryptokitties-bounty

As part of the bounty program they released the details of 3 of 4 of their primary smart contracts:

You can read more about the CryptoKitties as well as the roles of CEO, CTO, COO and how the bring new Kitties (as well as their features/genotypes/phenotypes) into the world here: https://github.com/axiomzen/cryptokitties-bounty/blob/master/CryptoKitty%20Basics.md#common-functions

Eric Kigathi
  • 151
  • 1
  • 4
  • The thing I don't understand is: I think all contract is published by someway. (i.e: we can search on etherscan). Why we cannot find GeneScience.sol. thanks. – hqt Apr 18 '18 at 19:37
  • @hqt: It's the EVM bytecode that's published to the blockchain, not the Solidity source. Etherscan allows smart contract authors to also add their Solidity source code, but they don't have to do this. – Vikram Saraph Dec 04 '18 at 06:20
  • @EricKigathi the four hashes you mentioned appear to be contracts on rinkeby, do you know the corresponding transaction hashes for the contracts on mainnet? – Vikram Saraph Dec 04 '18 at 06:26