This folder explains smart contracts with a strong focus on how they enforce PiRC launchpad rules and how they integrate with a DEX/AMM.
These docs are written to be understandable for someone new to smart contracts and precise enough to implement.
PiRC requires these properties to be true by construction (i.e., enforced by code, not policy):
- All committed Pi goes into liquidity, not to the project team.
- Initial liquidity cannot be withdrawn by the project (escrow/LP lock).
- Allocation and pricing rules are deterministic and auditable.
- State transitions are explicit (participation → allocation → TGE → post-launch).
01-smart-contract-basics.md02-pirc-invariants.md03-contract-architecture.md04-launch-state-machine.md05-commitments-allocation-math.md06-liquidity-amm-formulas.md07-dex-integration.md08-security-threat-model.md09-migration-from-current-backend.md10-reference-contract-skeletons.md11-end-to-end-worked-example.mdglossary.mdfaq.md
- If you’re new: start at 01 → 02 → 03 → 04.
- If you care about the math: focus on 05 + 06 (they include formulas and worked examples).
- If you care about the DEX side: read 06 + 07.
- If you’re implementing: read 03 + 04 + 08 + 10, then 09 to map to this repo’s current architecture.