Skip to content

Latest commit

 

History

History
107 lines (79 loc) · 3.65 KB

File metadata and controls

107 lines (79 loc) · 3.65 KB

Aethelred Contracts

Production Solidity smart contracts for the Aethelred ecosystem
Ethereum Bridge · Seal Verifier · Oracle · Governance

CI Security License Docs Audit

Solidity Hardhat Foundry OpenZeppelin


Contracts

Contract Description Address (Mainnet)
AethelredBridge.sol Lock-and-mint ETH ↔ AETHEL bridge (UUPS, guardian multi-sig) TBD
SealVerifier.sol On-chain Digital Seal verification TBD
AETHELToken.sol Wrapped AETHEL ERC-20 (18 decimals) TBD

Security

  • Guardian multi-sig: 2-of-N required for emergency withdrawals
  • Timelock: 27-day minimum delay on upgrades (UPGRADER_ROLE → timelock contract)
  • Rate limits: 1000 ETH/hr deposit + withdrawal ceiling
  • EIP-712: Structured data signing for all relayer messages
  • OFAC screening: blockedAddresses mapping with on-chain enforcement
  • Audited by: [Audit status pending]

IMPORTANT: Found a vulnerability? See SECURITY.md — do NOT open a public issue.


Quick Start

# Install dependencies
npm install

# Compile
npx hardhat compile

# Run tests
npx hardhat test

# Run Foundry tests
forge test -vvv

# Static analysis (Slither)
slither . --config-file slither.config.json

Deployment

# Deploy to local testnet
npx hardhat run scripts/deploy.ts --network localhost

# Deploy to Ethereum Sepolia testnet
npx hardhat run scripts/deploy.ts --network sepolia

Deployed addresses are tracked in deployments/:

deployments/
├── mainnet.json
├── sepolia.json
└── localhost.json

Architecture

AethelredBridge (UUPS Upgradeable)
├── Roles: RELAYER_ROLE, GUARDIAN_ROLE, UPGRADER_ROLE
├── deposit(ETH/ERC-20) → locks funds → emits DepositInitiated
├── finalizeDeposit() → RELAYER_ROLE → 64-block confirmation
├── proposeWithdrawal() → RELAYER_ROLE → 7-day challenge period
├── voteWithdrawal() → relayers vote (EIP-712 sig)
└── processWithdrawal() → 67% votes → releases funds

SealVerifier
└── verifySeal(jobId, outputHash, blockHeight) → read Aethelred state

Contributing

See aethelred/aethelred CONTRIBUTING.md.