> For the complete documentation index, see [llms.txt](https://docs.metacraft.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metacraft.cc/ape-score-2021/rules.md).

# Rules

## Metrics

We counted the following metrics for each address, from block height `11565019` to block height `13916165` (full year 2021) :

| metric                                                                            | describe                                                                                                                                   |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| gas\_all                                                                          | Total gas cost, in ETH                                                                                                                     |
| project\_num                                                                      | Number of projects participated. Project labels from <https://etherscan.io/labelcloud>                                                     |
| tx\_num                                                                           | Number of transactions sent                                                                                                                |
| gas\_max                                                                          | The largest gas fee spent, in ETH                                                                                                          |
| opensea\_buy                                                                      | Number of times NFTs were purchased at opensea                                                                                             |
| eth\_deposit                                                                      | Number of deposits to ETH2.0 contracts                                                                                                     |
| <p>polynet\_victim</p><p>cream\_victim</p><p>badger\_victim<br>anubis\_victim</p> | <p>Poly Network hack event victim<br>Cream Finance hack event victim<br>Badger Finance frontend hack event victim<br>Anubis rug victim</p> |
| contract\_deploy                                                                  | Number of deployed contracts                                                                                                               |
| loot\_claim                                                                       | Minter of loot NFT                                                                                                                         |
| ens\_claim                                                                        | ENS claimed amount                                                                                                                         |

## Creature calculation

```python
for record in query:
    if record.gas_all > 20 and record.project_num > 20 and record.opensea_buy > 50:
        creature = "EnderDragon"
    elif record.polynet_victim > 0 or record.cream_victim > 0 or record.badger_victim > 0 or record.anubis_victim > 0:
        creature = "Wither"
    elif record.loot_claim > 0 or record.ens_claim > 200:
        creature = "Dolphin"
    elif record.contract_deploy > 2:
        creature = "Enderman"
    elif record.eth_deposit > 0:
        creature = "IronGolem"
    elif record.tx_fail_num / record.tx_num > 0.2:
        creature = "Creeper"
    elif record.tx_num > 300 and record.project_num > 10:
        creature = "Bee"
    elif record.opensea_buy >= 5:
        creature = "Axolotl"
    elif record.tx_num < 50 and 0 < record.project_num <= 5:
        creature = "Turtle"
    elif record.project_num >= 6:
        creature = "Cow"
    else:
        creature = "Slime"
```

## Score calculation

```python
score = 0
total_score = 0

if 0 < record.gas_all < 0.1:
    score = 100
elif 0.1 <= record.gas_all < 0.3:
    score = 200
elif 0.3 <= record.gas_all < 1:
    score = 300
elif 1 <= record.gas_all < 5:
    score = 500
elif 5 <= record.gas_all < 10:
    score = 800
elif 10 <= record.gas_all < 20:
    score = 1200
elif record.gas_all >= 20:
    score = 2000
total_score += score

# project
score = min(record.project_num * 45, 2000)
total_score += score

# opensea buy
score = min(record.opensea_buy * 125, 2000)
total_score += score

# tx num
score = min(record.tx_num * 0.1, 200)
total_score += score

# hack
if record.polynet_victim:
    score = 500
    total_score += score
if record.cream_victim:
    score = 500
    total_score += score
if record.badger_victim:
    score = 500
    total_score += score
if record.anubis_victim:
    score = 500
    total_score += score

# ETH deposit
if record.eth_deposit:
    score = 500
    total_score += score

# airdrop
if record.loot_claim:
    score = 500
    total_score += score

score = 0
if 0 < record.ens_claim < 100:
    score = 200
elif 100 <= record.ens_claim < 200:
    score = 300
elif record.ens_claim >= 200:
    score = 500
total_score += score

# max gas
if record.gas_max > 1:
    score = 200
    total_score += score

# developer
score = min(record.contract_deploy * 100, 1000)
total_score += score
```
