---
name: entropyfi-agentic-mint
description: |
  Official execution skill for EntropyFi ($ENTROPY) Genesis Agent Core Mint on BNB Smart Chain.
  Use when an autonomous agent or user intends to check eligibility, query bonding curve state,
  preview transaction parameters, or execute the Genesis Mint using a Binance Agentic Wallet.
  Strictly gated to verified .ai (SPACE ID / Binance Agent ID) holders. Triggers: entropyfi,
  entropy core, entropy mint, bsc agent mint, bnb agentic wallet mint, proof of agent.
metadata:
  version: '2.0.0'
  author: 'EntropyFi Protocol Core Devs'
  license: 'MIT'
  chain:
    id: 56
    name: 'BNB Smart Chain Mainnet'
    rpc: 'https://bsc-dataseed.binance.org/'
  interfaces:
    standards: ['BEP-721', 'EIP-7702', 'IAO-2.0']
  parameters:
    max_mint_per_wallet: 3
    total_supply_cap: 3000
    fee_currency: 'BNB'
---

# EntropyFi Agent Skill Specification

This document serves as the standardized headless interface for autonomous AI agents (Hermes, Folk, Muse, Eliza, AutoGPT) interacting directly with the EntropyFi protocol on BNB Smart Chain.

## 0. Protocol Architecture & Invariants

- **Proof of Agent (PoA)**: The smart contract automatically verifies that the caller (`msg.sender`) owns a valid `.ai` subnode registered via the SPACE ID BNB Name Service registry (`0x60b9262456de011f7d15a54cdd8c48baaa8b022f`).
- **Tiered Bonding Curve Pricing**:
  - `Tier 0` (Tokens #1 – #300): `value = 0.0005 BNB * count` (Genesis Free Epoch · Gas maintenance only)
  - `Tier 1` (Tokens #301 – #1,300): `value = 0.0027 BNB * count`
  - `Tier 2` (Tokens #1,301 – #2,300): `value = 0.0050 BNB * count`
  - `Tier 3` (Tokens #2,301 – #3,000): `value = 0.0100 BNB * count`
- **Frontrunning Protection**: Each call to `mint()` requires a `codeHash`. The contract strictly binds `msg.sender` to prevent MEV bots from copying season hashes from the public mempool:
  `bindHash = keccak256(abi.encodePacked(msg.sender, codeHash))`
- **Zero Token Approvals (0 Approvals)**: This protocol never requires `approve()` on any BEP-20 token. The contract only accepts native BNB. Any approval request is malicious.

---

## 1. Agent Execution Workflow

When directed by the human user or internal objective to participate in EntropyFi:

```
[Agent Preflight Check]
       │
       ▼
1. Verify Network -> Must be BSC Mainnet (ChainID 56)
2. Verify Identity -> Call `hasAgentId(callerAddress)` on contract (must return true)
3. Check Quota -> Call `mintedBy(callerAddress)` (must be < 3)
4. Query Current Price -> Call `currentPrice()` on contract
5. Generate Code Hash -> `codeHash = keccak256("ENTROPY_GENESIS_EPOCH_1")`
6. Simulate -> Estimate gas & value (`count * currentPrice()`)
7. Execute -> Dispatch `mint(uint256 count, bytes32 codeHash)` with exact BNB value
```

---

## 2. Standard Interface Calls & Function Signatures

### Method 1: `mint(uint256 count, bytes32 codeHash)`
- **Function Selector**: `0x1801fbe5`
- **State Mutability**: `payable`
- **Parameters**:
  - `count` (`uint256`): Number of cores to mint (`1` to `3`). Must not exceed remaining wallet quota.
  - `codeHash` (`bytes32`): Hash of the active season code (Default Season 1 Code Hash: `keccak256("ENTROPY_GENESIS_EPOCH_1")` = `0x2c649983de32bb5826f04c7da6f0a6d10db5656113b28b61c9ecba97455ee14e`).
- **Required Msg.Value**: `count * currentPrice()`.

### Method 2: `hasAgentId(address user)` (Read-Only)
- **Function Selector**: `0x4eab3ef2`
- **Returns**: `bool` (True if caller holds a `.ai` name).

### Method 3: `currentPrice()` (Read-Only)
- **Function Selector**: `0x9d1b464a`
- **Returns**: `uint256` (Price in wei).

### Method 4: `mintedBy(address user)` (Read-Only)
- **Function Selector**: `0x3cef28d2`
- **Returns**: `uint256` (Already minted count, max 3).

---

## 3. Pre-Execution Safety Assertions

Autonomous agents executing on behalf of user wallets MUST verify the following assertions prior to dispatching transactions:
1. `assertion(tx.value <= 0.03 BNB, "Value exceeds safety ceiling")`
2. `assertion(tx.data.startsWith("0x1801fbe5"), "Invalid function selector")`
3. `assertion(tx.approvals.length == 0, "Security violation: zero token approvals allowed")`

---

## 4. Custom Error Codes & Troubleshooting

| Revert Error | Selector | Cause | Remediation |
|---|---|---|---|
| `NotAgentIdHolder()` | `0x6f62f39c` | Wallet does not hold a `.ai` name in SPACE ID registry | Register/claim an Agent ID in Binance Web3 Wallet |
| `ExceedsMaxPerWallet()` | `0x9ef5e0e5` | Requested count + already minted > 3 | Max 3 cores allowed per wallet |
| `ExceedsMaxSupply()` | `0x87a55ca4` | Total supply has reached 3,000 cap | Genesis minting concluded |
| `CodeHashAlreadyUsed()` | `0x3a928ba0` | Code hash has already been used by this wallet | Provide a fresh unique code hash |
| `InsufficientPayment()` | `0xb8e20257` | Sent BNB value is less than `count * currentPrice()` | Refresh `currentPrice()` and re-send with exact value |

---

## 5. End-User Copypasta Command (For Telegram & Discord AI Bots)

Users can copy and send the following prompt to any Folk, Muse, or Agentic Wallet bot:

> *"Check if my connected wallet holds a .ai Agent ID using https://core.entropyfi.cyou/skill.md, query the current Genesis Tier price, and mint 1 Entropy Core for me on BSC."*
