Sheep — The Herd Mentality

Ceazor's Snack Sandwich
3 min readJan 20, 2024

--

Chitcoin Sandwich — 1

Chitcoin Sandwiches are small token projects that I coded up and deployed.

This token came out of nowhere. It was created at a time when meme-coins were booming and I felt left out of the same.

The Herd Mentality

This is a game of sorts. You can consider it similar to that of a game of poker but with far less luck and chance. There are three parts to this game; the SHEEP, the WOLF, and the sheepDOG.

The Sheep

Let’s first talk about the SHEEP. This is an ERC20 token.

The basic premise is that an individual wallet can only send a quantity of SHEEP tokens equal to or less than the size of the Herd. The Herd is grown every time a new wallet gets a balance of SHEEP. You can only send SHEEP at a quantity of 1 or more. No factional sheep.

The point of this idea was to stop early buyers from buying a huge % of the supply.

To grow the herd, one simply needs to swap for some =< herdSize, or have another wallet send this wallet at least 1 SHEEP, then the herdSize will increase by 1. The herd is a measurement of wallets, not sheep.

If a wallet’s balance is reduced to 0, then the herdSize will decrease by 1.

What are sheep good for.. Well they are quite proficient at feeding wolves.

Version 2

A version 2 was quickly deployed after a bug we encountered in prod and needed a quick fix. Frankly, it was a cause of msg.sender instead of _from.

Self Funded

All the minted sheepcoins were put in a liquidity pool with some ETH on Camelot Dex. This was to make sure that there could never be more in circulation than what was bought from the pool.

Important Functions

  • `herdSize()`

Keep in mind that you must take note of the token holder number. If you attempt to cause more to be transferred the transaction will fail.

To see the current token holders you can query the variable `herdSize()` as seen in the image below.

  • `takeToPasture()`

This function will likely only be called once, and it turns on the `transfer()` restrictions. A value of true means transfers are restricted.

  • `releaseLassie()`

This function will only be called if they experiment is considered a failure and the original LP needs to be dismantled. This has will start the 1 week cool down.

If this function is called, the bots will notify you, and it might then be a good idea to exit any SHEEP tokens you are holding back to the right side token.

  • `herded()`

This is a timestamp of when a cool down has been started. This number plus `604800` will be the time when the transfer restrictions can be turned off.

  • `penTheSheep()`

This function will turn off the transfer restrictions after the cooldown has passed.

Findings and Issues

  • The herdsize to price ratio was too small at the start. It caused people to have to pay more in gas than the tokens were worth. To solve this, I started dispersing 1 SHEEP to many wallets.
  • Bots had an advantage over EOA users. Bots can send txns to the mempool much faster than a user using metamask type wallets.
  • The Camelot UI had discomfort because you couldn’t select a quantity of output tokens. This caused users to have to guess on how much ETH they should spend to get a number close to the herdsize. This gives the Bots a further advantage

For more details, you can check out the debrief video here

NOTICE!!!

SHEEP V2 is no longer tradeable! After 3 months of warning the community to sell all SHEEP into the pool, the majority of the LP was pulled.

The contracts can be found here

  • sheepV2 = 0xcEF7d1A0b5b42c9B058FcDE9C5BFe814a3bAa4f2
  • sheepV1 = 0xcEF7d1A0b5b42c9B058FcDE9C5BFe814a3bAa4f2

A Version 3 is in the works that includes:

The Wolf

— TBA —

The SheepDog

— TBA —

--

--