The trustless DeFi verdict layer. Recuse Protocol is a GenLayer Intelligent Contract that stores on-chain safety verdicts for ERC-20 tokens.
When a judge has a conflict of interest, they recuse themselves from the case. Recuse applies the same idea to DeFi: an integrating contract can consult should_recuse(token, chain) before touching an asset, and step aside when the token fails the integrity test.
- Network: GenLayer Bradbury Testnet
- Contract:
0xf7149EB915b7D0F0AD5068a73b5d05197F66f884 - Deploy tx:
0xbf47ad996f5766cb7b3fe105c92e25948ff05c61dad8870db7ecf1a6db7471b7 - Verified smoke checks:
- USDC on Ethereum:
CLEAR, score12, tx0xc85a99aee2aefa465b9bf1ad84fc557073dca63367b5d67002a30eadae64d1f5 - SQUID on BSC:
RECUSE, score90, tx0x80168a740334733647389f74ac364849fc13f81da6edb6d21931f786e766a792
- USDC on Ethereum:
| Bucket | Action | Score |
|---|---|---|
CLEAR |
Proceed without restriction. | 0-29 |
WATCH |
Proceed but log and reassess sooner. | 30-59 |
FLAG |
Hold and require explicit user override. | 60-79 |
RECUSE |
Step aside from the transaction. | 80-100 |
The integration gate is:
should_recuse(token: Address, chain: str) -> boolIt returns True only for the RECUSE bucket, so consumers can choose their own policy for WATCH and FLAG.
The production demo path is intentionally stable:
- The Vue app fetches a fresh live snapshot from DexScreener and Honeypot.is through
/api/snapshot. - The connected wallet signs a real Bradbury transaction to
assess_snapshot(token, chain, onchain, offchain). RecuseOracleapplies a deterministic risk rubric and stores theVerdictstruct on-chain.- The frontend waits for an accepted transaction, then reads
get_verdict(token, chain)and renders the stored report.
This means the frontend genuinely calls the contract and handles the write/read lifecycle. There is no private backend key and no centralized writer: the user's wallet submits the assessment transaction.
The contract also keeps an experimental assess(token, chain) path for GenVM-native web collection. The submission flow uses assess_snapshot because public token pages and explorers can block HTML renderers, while the API snapshot path is reliable for live demos.
@gl.public.write
def assess_snapshot(token: Address, chain: str, onchain: dict, offchain: dict) -> None
@gl.public.write
def assess(token: Address, chain: str) -> None
@gl.public.view
def get_verdict(token: Address, chain: str) -> Verdict
@gl.public.view
def should_recuse(token: Address, chain: str) -> bool
@gl.public.write
def subscribe(token: Address, chain: str) -> None
@gl.public.write
def tick() -> NoneCurrent production signals:
- contract source status from Honeypot.is
- sell simulation / honeypot result
- buy and sell tax
- liquidity, market cap, pair metadata from DexScreener
- holder count from Honeypot.is
- website, X/Twitter, and GitHub links from DexScreener token profile metadata
- Honeypot risk level and risk flags
The rubric is deterministic: high risk levels, failed sell simulation, high taxes, closed source contracts, missing off-chain footprint, low liquidity, and young pairs move a token toward FLAG or RECUSE.
contracts/ GenLayer Intelligent Contract
contracts/prompts/ Prompts retained for the experimental native web path
app/ Vue 3 + genlayer-js frontend
app/api/snapshot.ts Vercel serverless live-data endpoint
landing/ Static landing page
keeper/ Node one-shot keeper for tick()
test/ GenLayer Studio integration tests
docs/ Submission checklist, notes, and launch thread
deploy.sh Bradbury deploy helper
DEPLOYED_ADDRESSES.md Deploy and calibration proof
cd app
cp .env.example .env
npm install
npm run devThe public frontend variables are:
VITE_ORACLE_ADDRESS=0xf7149EB915b7D0F0AD5068a73b5d05197F66f884
VITE_GENLAYER_RPC=https://rpc-bradbury.genlayer.comPut the deployer key in a local .env file that is ignored by git:
GENLAYER_PRIVATE_KEY=0x...
GENLAYER_KEYSTORE_PASSWORD=...Then deploy:
bash deploy.shdeploy.sh reads .env or ../.env, imports/unlocks the local GenLayer account, deploys to Bradbury, and never writes secrets into the repository.
Commands run before publishing:
python3 -m py_compile contracts/recuse_oracle.py
cd app && npm run build
cd keeper && npx tsc --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --types node --skipLibCheck tick.ts
cd app && npx tsc --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck api/snapshot.tsBradbury checks:
genlayer call 0xf7149EB915b7D0F0AD5068a73b5d05197F66f884 get_verdict --args 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 ethereum
genlayer call 0xf7149EB915b7D0F0AD5068a73b5d05197F66f884 get_verdict --args 0x87230146E138d3F296a9a77e497A2A83012e9Bc5 bscExpected results are clear score 12 for USDC and recuse score 90 for SQUID.