Fuzz-Aldrin is a decentralized smart contract auditing service that:
- Analyzes contract bytecode for common vulnerabilities
- Provides security scores and detailed findings
- Operates as a fully decentralized AVS with operator consensus
- Submits audit results directly on-chain
The system performs real security analysis including:
- Reentrancy vulnerability detection
- Access control issues
- Integer overflow/underflow risks
- Gas optimization opportunities
- Delegatecall security
- Timestamp dependency issues
- Unchecked return values
- Storage collision risks
- Go 1.23 or higher
- Foundry
- An Ethereum RPC endpoint
- Clone the repository:
git clone https://github.com/your-org/fuzz-aldrin.git
cd fuzz-aldrin
- Install dependencies:
go mod download
- Build the binaries:
make build
This will create the following binaries in the bin/
directory:
aggregator
- The main AVS aggregator serviceoperator
- The operator node softwarecli
- Command-line interface for interacting with the AVS
export PRIVATE_KEY="your-private-key-here"
./deploy_audit_contract.sh
This deploys the SimpleContractAudit contract and saves the deployment info to deployment-info.json
.
export PRIVATE_KEY="your-private-key-here"
./run_aggregator.sh
The aggregator will start monitoring for audit requests.
In a new terminal:
export PRIVATE_KEY="your-private-key-here"
./submit_audit_request.sh 0xContractToAudit
Replace 0xContractToAudit
with the address of the contract you want to audit. The audit fee is 0.001 ETH.
The aggregator will automatically:
- Detect the audit request
- Fetch and analyze the contract bytecode
- Generate a security report
- Submit the results on-chain
Check the aggregator logs to see the audit progress and results. The transaction hash for the submitted results will be displayed.
Deploy the full AVS infrastructure including TaskMailbox, OperatorRegistry, and audit contracts:
forge script script/Deploy.s.sol:DeployScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
The operator set must be configured in the TaskMailbox before it can accept tasks. This requires setting:
- Curve type for BLS signatures
- Task hook address
- Task SLA parameters
- Stake proportion threshold
- Fee token
Each operator must register with the AVS:
./bin/cli operator register \
--private-key=$OPERATOR_PRIVATE_KEY \
--rpc-url=$RPC_URL \
--registry=$REGISTRY_ADDRESS
Run each operator node:
./bin/operator \
--private-key=$OPERATOR_PRIVATE_KEY \
--rpc-url=$RPC_URL \
--port=9001 \
--registry=$REGISTRY_ADDRESS \
--log-level=info
Run the aggregator:
./bin/aggregator \
--private-key=$AGGREGATOR_PRIVATE_KEY \
--rpc-url=$RPC_URL \
--chain-id=$CHAIN_ID \
--task-mailbox=$TASK_MAILBOX_ADDRESS \
--audit-contract=$AUDIT_CONTRACT_ADDRESS \
--log-level=info
PRIVATE_KEY
- Private key for the accountRPC_URL
- Ethereum RPC endpoint URLCHAIN_ID
- Chain ID
--simple
- Run in simple mode with a specific contract address--task-mailbox
- TaskMailbox contract address--audit-contract
- Audit contract address--port
- HTTP server port (default: 8080)--metrics-port
- Metrics server port (default: 9090)--log-level
- Logging level
--port
- HTTP server port for operator API--registry
- Operator registry contract address--log-level
- Logging level
Fuzz-Aldrin consists of several key components:
-
Smart Contracts
ContractAudit.sol
- Main audit contract integrated with TaskMailboxSimpleContractAudit.sol
- Simplified version for direct audit requests- AVS infrastructure contracts from Hourglass
-
Aggregator
- Monitors blockchain for audit requests
- Distributes tasks to operators
- Collects and aggregates operator signatures
- Submits final audit results on-chain
-
Operators
- Perform actual contract analysis
- Sign audit results with BLS signatures
- Maintain minimum stake for participation
-
Auditor Engine
- Analyzes contract bytecode
- Detects vulnerability patterns
- Generates security scores and detailed reports
-
Private Key Management
- Never commit private keys to version control
- Use environment variables or secure key management systems
- Consider using hardware wallets for production deployments
-
Operator Security
- Operators should run on secure, isolated infrastructure
- Regular security updates and monitoring
- Proper firewall configuration for operator APIs
-
Contract Security
- All contracts are audited and tested
- Use official deployments when available
- Verify contract addresses before interaction
go test ./...
make build
Contracts are in the contracts/
directory. To compile:
cd contracts
forge build