Audit Conducted: April 2025
Auditor: Aayush
This repository contains the complete security audit for TetuPawnShop.sol, a collateralized lending contract in the Tetu Finance ecosystem. The audit focuses on the redeem() function's critical vulnerability and provides remediation guidance.
- Contract:
TetuPawnShop.sol(commit: [hash]) - Focus:
redeem()function state management vulnerability - Severity: Critical (CVSS: 8.5)
- Manual Code Review
- Slither (Static Analysis)
- Foundry (For PoC Tests)
- Solidity CEI Pattern Verification
| Severity | Issue | Status |
|---|---|---|
| Critical | Premature state change in redeem() |
Fixed β |
| Medium | Missing toSend amount validation |
Recommended π |
| Low | Insufficient event logging | Optional β³ |
- Potential collateral theft via reentrancy-like exploitation
- Broken atomicity in redemption flow
- Estimated risk: High (Funds-at-risk)
function redeem(uint id) external nonReentrant override {
// ...checks...
uint toSend = _toRedeem(id);
IERC20(...).safeTransferFrom(...); // Interactions first
_transferCollateral(...);
_endPosition(pos); // State change last
}βοΈ Email: [[email protected]]
π¦ Twitter/X: @aayushjhaaudits (DMs open for security reports)
Response Time:
- Critical Issues: <24 hours
- General Inquiries: 3-5 business days
Note: For audit-related queries, include "TetuPawnShop Audit" in the subject line.