Anchor workflow
Skill Nerfherder16/BrickLayer/.claude/skills/anchor-workflow
Solana/Anchor development workflow for ADBP3. Build, test, and deploy Anchor programs. Run simulations (simulate.py, monte_carlo.py, analyze.py). Check backing ratio, treasury health, and token mechanics. Use when working on the ADBP reserve-backed credit system.From its SKILL.md
npx -y skills add Nerfherder16/BrickLayer --skill anchor-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.4 KB, as published. Nobody here has run it
Anchor Workflow — ADBP3
You are assisting with the ADBP3 Solana reserve-backed credit platform. This skill covers:
- Anchor smart contract build/test/deploy
- Python simulation and analysis scripts
- Monte Carlo modeling of treasury mechanics
- Backing ratio and fee optimization
Project Location
/home/nerfherder/Dev/Bricklayer2.0/projects/ADBP3/
Key Files
| File | Purpose |
|---|---|
simulate.py | Core treasury simulation |
monte_carlo.py | Monte Carlo backing ratio analysis |
analyze.py | Campaign findings analyzer |
constants.py | Ground-truth system parameters |
project-brief.md | Confirmed mechanics (do not re-derive) |
ARCHITECTURE.md | System architecture |
Common Commands
Anchor (when Anchor.toml / programs/ exist)
# Build programs
cd /path/to/anchor-project && anchor build
# Run tests
anchor test
# Deploy to devnet
anchor deploy --provider.cluster devnet
# Verify IDL
anchor idl fetch <program_id> --provider.cluster devnet
Python Simulations
cd /home/nerfherder/Dev/Bricklayer2.0/projects/ADBP3
# Run core simulation
MPLBACKEND=Agg python simulate.py
# Monte Carlo analysis
MPLBACKEND=Agg python monte_carlo.py
# Analyze findings
python analyze.py
# Run all sims
MPLBACKEND=Agg python simulate.py && python analyze.py
System Mechanics (ground truth — never re-derive)
- Employee pays $1.00/credit → 100% to treasury wallet
- Treasury earns 4% APR compounded monthly
- 10% admin fee on purchases → separate from treasury
- Discretionary burns cost treasury $2/credit
- Health metric:
backing_ratio = treasury_wallet / total_credits_outstanding - Target backing ratio: ≥ 1.0 (fully backed)
Workflow
- Read
project-brief.mdandconstants.pybefore any simulation changes - Never modify confirmed mechanics in
constants.pywithout explicit instruction - Use
MPLBACKEND=Aggfor headless matplotlib runs - Check
results.tsvfor prior simulation results before running new ones - Findings go in
findings/— use BrickLayer finding format