Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs and explains onchain systems that run unattended, covering callers, randomness, censorship and exposure.
27% 86%+59 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 6 of 22 without it.
Our engineering team is designing a contract function that rebalances portfolio pool weights when asset ratios drift beyond 5%. What three fundamental architectural questions must be answered for this state transition to execute reliably?
The response uses the term "onchain" without a hyphen.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
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:
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.
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:
Pausable, onlyOwner over user funds or user access, an upgradeable proxy, a blacklist — what each lets the operator do to a paying user, and what becomes of users if that key is lost. Scaffolding them unflagged is the failure; shipping none is an answer, say that instead.For the full review with a template, fetch crops/SKILL.md.
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:
hash(secret, salt) bound to their address, reveal after entries close, seed from the reveals plus a past blockhash. Put a stake at risk: whoever reveals last sees the outcome coming and can withhold. Mind the lookback — blockhash reaches back 256 blocks, the EIP-2935 history contract at 0x0000F90827F1C53a10cb7A02335B175320002935 reaches 8191, and past that the seed is gone for good. Convert those to wall clock at the target chain's block time before you size the reveal window: 256 blocks is ~51 min on mainnet at 12s and ~8.5 min on Base at 2s, and check EIP-2935 is deployed there at all before relying on the longer window.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.
Next to this one in the catalogue, plus more from the same author.