---
name: aave-security-foundations-01e2429d9f9a
description: Security baseline for AAVE integration and execution scripts. Use when user asks for AAVE security review, pre-trade checks, liquidation safety, allowance minimization, or execution hardening.
license: MIT
metadata:
  author: AAVE AI Contributors
  version: 1.0.0
---

# AAVE Security Foundations

Security-first checklist for AAVE script development and operations.

## Threat Areas

- Over-approval risk: unlimited ERC20 approvals can expose wallet funds.
- Health factor drift: market volatility can liquidate leveraged positions quickly.
- Interest rate mode mismatch: stable mode assumptions can fail per asset.
- RPC/data inconsistency: stale or failing RPC can produce bad decisions.
- Execution race conditions: quote-time assumptions may be invalid at execution.

## Required Pre-Execution Checks

1. Validate chain/token/account/amount format.
2. Read reserve status (`isActive`, `isFrozen`, `borrowingEnabled`).
3. Read account health (`healthFactor`, `availableBorrowsBase`).
4. Enforce HF safety threshold before `withdraw` and aggressive `borrow`.
5. Reject execution if allowance/balance preconditions fail.

## References

- `references/audit-checklist.md`
- `references/common-failures.md`


---
Source attribution: AAVE AI Contributors
Original project: https://github.com/NeverSight/skills_feed/blob/8db54595422f40924a0e2c3365b2f40e9aba0ad4/data/skills-md/0xweaksheep/aave_farmore/aave-security-foundations/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: AAVE AI Contributors
Original project: https://github.com/NeverSight/skills_feed/blob/8db54595422f40924a0e2c3365b2f40e9aba0ad4/data/skills-md/0xweaksheep/aave_farmore/aave-security-foundations/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: ML / AI Engineer, Backend Developer, Product Manager
Specialties: Backend
Tools: Aave
Country applicability: Country not specified
Classification basis: Source category, role and specialization labels
Instruction SHA-256: 2631bf5a26af6020f37a414bde7bc0b956929a46f6e34c1673c8ce3fb889fc84
