[Ethereum] How does cryptokitties work with smart contracts and is there a random element to it


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?

Best Answer

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!

Related Topic