{"id":46714050,"url":"https://github.com/aave/aave-v4","last_synced_at":"2026-03-09T10:02:22.384Z","repository":{"id":325284322,"uuid":"821044257","full_name":"aave/aave-v4","owner":"aave","description":"Aave V4","archived":false,"fork":false,"pushed_at":"2026-03-04T03:55:58.000Z","size":21508,"stargazers_count":128,"open_issues_count":85,"forks_count":56,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-04T05:38:56.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits/2026-02-05_Aave-V4_Blackthorn.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-27T17:38:18.000Z","updated_at":"2026-03-04T03:26:22.000Z","dependencies_parsed_at":"2026-02-24T11:33:35.724Z","dependency_job_id":null,"html_url":"https://github.com/aave/aave-v4","commit_stats":null,"previous_names":["aave/aave-v4"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/aave/aave-v4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aave","download_url":"https://codeload.github.com/aave/aave-v4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-v4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30290924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-09T10:02:19.845Z","updated_at":"2026-03-09T10:02:22.379Z","avatar_url":"https://github.com/aave.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aave V4\n\nA unified liquidity layer and modular architecture that enhances capital efficiency, scalability, and risk management.\n\n## Table of Contents\n\n- [Documentation](#documentation)\n- [Architecture](#architecture)\n- [Repository Structure](#repository-structure)\n- [Dependencies](#dependencies)\n- [Development](#development)\n- [Security](#security)\n\n## Documentation\n\n- [Aave V4 Overview](./docs/overview.md)\n- [Aave V4 Docs](https://aave.com/docs/aave-v4)\n\n## Architecture\n\nThe Aave V4 architecture follows a modular **hub-and-spoke design** that separates liquidity management from user-facing operations and collateralization.\n\n## Repository Structure\n\n```\naave-v4/\n├── src/                          # Main source code\n│   ├── hub/                      # Hub contracts and interfaces\n│   ├── spoke/                    # Spoke contracts and interfaces\n│   ├── position-manager/         # Position Managers, including gateway contracts\n│   ├── libraries/                # Shared libraries (math, types)\n│   ├── utils/                    # Utility contracts (Multicall, etc.)\n│   └── dependencies/             # Dependencies (Chainlink, OpenZeppelin, etc.)\n├── tests/                        # Test suite\n│   ├── unit/                     # Unit tests\n│   ├── gas/                      # Gas snapshot tests\n│   ├── invariant/                # Invariant tests\n│   ├── misc/                     # Symbolic tests, prototype development\n│   └── Base.t.sol                # Base test setup\n├── scripts/                      # Deployment scripts\n├── snapshots/                    # Gas snapshots\n└── lib/                          # Foundry dependencies\n```\n\n## Dependencies\n\n### Required\n\n- **[Foundry](https://book.getfoundry.sh/getting-started/installation)** - Development framework\n  ```bash\n  curl -L https://foundry.paradigm.xyz | bash\n  foundryup  # Update to latest version\n  ```\n- **[Node.js](https://nodejs.org/en/download)** - For linting and tooling\n\n  ```bash\n  # Verify installation\n  node --version\n  yarn --version\n  # Install dependencies\n  yarn install\n  ```\n\n### Optional\n\n- **Lcov** - For coverage reports\n\n  ```bash\n  # Ubuntu\n  sudo apt install lcov\n\n  # macOS\n  brew install lcov\n  ```\n\n### Dependency Strategy\n\nDependencies are located in the `src/dependencies` subfolder rather than managed through external package managers. This approach:\n\n- Mitigates supply chain attack vectors\n- Ensures dependency immutability\n- Minimizes installation overhead\n- Provides simplified version control and auditability\n\n## Quickstart\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/aave/aave-v4.git\ncd aave-v4\n```\n\n### 2. Install Dependencies\n\n```bash\n# Copy environment template and populate\ncp .env.example .env\n\n# Install Foundry dependencies\nforge install\n\n# Install Node.js dependencies (required for linting)\nyarn install\n```\n\n### 3. Build Contracts\n\n```bash\nforge build\n```\n\n## Development\n\n### Testing\n\n- **Run full test suite**: `make test` or `forge test -vvv`\n- **Run specific test file**: `forge test --match-contract ...`\n- **Run with gas reporting**: `make gas-report`\n- **Generate coverage report**: `make coverage`\n\n### Code Quality\n\n- **Check contract sizes**: `forge build --sizes`\n- **Check linting**: `yarn lint`\n- **Fix linting issues**: `yarn lint:fix`\n- **Generate Rust bindings**: `yarn rs:generate`\n\n### Gas Snapshots\n\nGas snapshots are automatically generated and stored in the `snapshots/` directory. To update snapshots:\n\n```bash\nmake gas-report\n```\n\nSnapshot files generated:\n\n- `Hub.Operations.json`: Gas for Hub actions or treasury operations invoked by Spokes.\n- `Spoke.Operations.json`: Gas for user-facing Spoke operations.\n- `Spoke.Operations.ZeroRiskPremium.json`: Same scenarios as `Spoke.Operations.json` but with Collateral Risk set to 0, to show baseline gas excluding risk-premium computation.\n- `Spoke.Getters.json`: Gas for getters across different combinations of supplies/borrows.\n- `NativeTokenGateway.Operations.json`: Gas for native-asset (ETH) gateway flows.\n- `SignatureGateway.Operations.json`: Gas for EIP-712 meta-transactions.\n\n## Security\n\n### Audit Reports\n\nYou can find all audit reports under the audits folder\n\n- [2026-02-05 - Aave V4 - Blackthorn](./audits/2026-02-05_Aave-V4_Blackthorn.pdf)\n- [2026-02-10 - Aave V4 - TrailOfBits](./audits/2026-02-10_Aave-V4_TrailOfBits.pdf)\n- [2026-02-19 - Aave V4 - ChainSecurity](./audits/2026-02-19_Aave-V4_ChainSecurity.pdf)\n\n### Bug Bounty\n\nFurther details will be made available soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-v4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faave%2Faave-v4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-v4/lists"}