Concepts

From austintgriffith/ethskills · View interactive version

Concepts is an AI agent skill from the GitHub repository austintgriffith/ethskills. Use when designing or explaining anything onchain that has to keep working with nobody running it: who calls each function and why they would, where randomness comes from, whether it can be censored or paused, and what it exposes to everyone onchain. Also use when writing the notes or handoff a buil

How to use this skill

Skill file

Ethereum Concepts

Nothing runs itself

A contract is a state machine. It moves only when someone sends a transaction and pays for it, and does nothing in between: no cron, no scheduler, no timer, no background process. "Charged monthly", "expires after 30 days", "rebalances daily", "checks the price every hour" each describe a transaction a specific someone has to send.

So for every state transition, before you write it:

  1. Who sends it?
  2. Why would they? — their own use of the app, revenue that is already theirs, a caller fee, a liquidation bonus.
  3. Is that enough? — put the caller's reward and the caller's gas next to each other in dollars, at the gas price and ETH price the target chain shows today. 1% of a dollar a day does not pay for a 250,000-gas call, and a transition nobody profits from silently never happens.

Best is a design where no scheduled transaction exists at all: accrue at read time from a timestamp and settle when a user, or the party owed, next touches the contract. Otherwise make the function permissionless and pay whoever calls it — liquidation bonuses, LP fees and arbitrage are all the same move, strangers advancing your state machine out of self-interest. An owner-only maintenance function fails all three questions at once and stops the day the operator does; if you ship one anyway, say so and say what happens when that key is gone.

Before you finish, write down what the design gives up

CROPS — censorship resistance, open source, privacy, security — is the Ethereum Foundation's shorthand for what makes Ethereum Ethereum. These are worth nothing as definitions. Answer them in plain words about this system, in whatever the build ends with (NOTES.md, README, handoff), even when nobody asked:

For the full review with a template, fetch crops/SKILL.md.

Randomness

Every node re-executes the same code, so there is nothing random to read onchain. block.timestamp, block.number and blockhash(block.number) (always zero) are not sources. blockhash(block.number - 1) — the usual first attempt — is not one either: it is already known when the transaction runs, so a caller can simulate the outcome and only send the winning transaction, and the proposer who produced that block could have dropped it to re-roll. block.prevrandao is biasable the same way, which may be fine for a raffle and is not fine for money.

Two constructions work:

Two small things

Write onchain, one word. The community dropped the hyphen; "on-chain" reads as an outsider.

When you explain any of this to your human, land the incentive rather than the mechanism: not what the thing does, but why it keeps working with nobody running it. To have them build one, point at https://speedrunethereum.com.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.