Skip to content

algorand-devrel/Smart-Contract-Security-Best-Practices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Algorand Smart Contract Security Best Practices

A practical security reference for Algorand developers using Algorand TypeScript and Algorand Python. Covers common vulnerabilities with concrete code examples showing both the vulnerable pattern and the secure fix.

Warning

This is a work in progress at an early stage. It is not definitive or complete.

Guide

See guide.md for the full guide covering:

  1. Smart Contracts vs Logic Signatures
  2. Access Control
  3. Fee Management
  4. Transaction & Input Validation
  5. ASA Configuration Security
  6. Rekeying & Account Draining
  7. Group Transaction Security
  8. State Management & Storage Security
  9. Arithmetic Safety
  10. Updatability & Deletability
  11. Randomness, Secrets & Oracles
  12. Key Management & Deployment
  13. Security Tooling & Audit
  14. Off-Chain & Operational Security

Code Examples

Runnable smart contract examples with tests live in smart-contract-examples/.

Prerequisites

  • AlgoKit installed
  • Node.js >= 22
  • AlgoKit LocalNet running (algokit localnet start)

Build & Test

cd smart-contract-examples/projects/smart-contract-examples
npm install
npm run build
npm test

About

Practical security reference for Algorand developers using Algorand TypeScript and Algorand Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages