agentleFS
GambiarraFinanceGambiarraFinance/gambiarra-v2/.cursor/rules/gambiarra.mdc

gambiarra-v2 / rules

Cursor rule0 starsChanged 28 days agoMITView on GitHub

Gambiarra Finance v2 — contratos BSC (Solidity/Foundry) e web agent-first (Next.js 16 + viem)

  • Reads credentials

The file

Files
gambiarra.mdc
---
description: Gambiarra Finance v2 — contratos BSC (Solidity/Foundry) e web agent-first (Next.js 16 + viem)
globs: ["contracts/**/*.sol", "contracts/**/*.toml", "web/**/*.ts", "web/**/*.tsx"]
alwaysApply: true
---

# Gambiarra Finance v2

Leia `AGENTS.md` na raiz. Fonte única de contexto. Regras que não podem quebrar:

- **Pré-deploy.** Nada da v2 está em mainnet; não faça deploy real nem mova fundos.
- **MasterChef legado é imutável** (`owner() == 0x0`). Não tente alterá-lo.
- **LP GAMB/WBNB nos pools 16 e 25.** Sempre passe `pid` explicitamente (vault = 25).
- **Solidity:** `0.8.26` exato, `evm_version = "paris"`, sem proxy/upgrade.
  Saques do `GambVault` nunca pausáveis; TWAP falha fechado; liquidação permissionless.
- **LTV:** 40% default, 50% liquidation threshold; alavancagem derivada de `maxLtvBps()`.
- **Web:** Next.js 16 — consulte `web/node_modules/next/dist/docs/` antes de mudar
  convenções. Use viem (não ethers/web3), `THREE.Timer` (não `Clock`) e `<a>` para
  rotas cruas (`/llms.txt`, `/agents.json`, `/api/stats`).
- **Números:** `web/src/lib/format.ts` (bigint, half-up, pt-BR). Nunca `Number(bigint)`.
- **Fork dev:** `next dev` tenta `http://127.0.0.1:8545` (chain 56) antes do RPC público.
  `USE_BSC_FORK=0` desativa. `make fork` em `contracts/`.
- **Checks:** `forge fmt --check && forge test -vvv`; `npm run lint && npm run build`.
- **Commits:** autor `codingsh <codingsh@pm.me>`, sem `Co-authored-by`.

Não edite `contracts/lib/` nem o contrato legado. Não commite `.env` ou chaves.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.