- Home
- Security Audits
- NAFTA
Web3 · Smart Contract Audit
NAFTA Security Audit
softstack completed a smart contract audit of NAFTA's NFT Flash Loans & Long-Term Renting without collateral in July 2022, reporting 7 findings (2 medium, 3 low and 2 informational). The full report is published in the softstack public audit archive.
Key facts
- Client
- NAFTA
- Completed
- Chains
- Starknet, Ethereum
- Languages
- Solidity, JavaScript
- Commit
773089f4768e
About the project
NAFTA is a protocol for NFT flash loans and long-term NFT renting without collateral. It lets a holder lend an NFT out for a defined period, and a borrower take temporary use of one without posting collateral against its value. Its contracts were reviewed across Ethereum and Starknet.
Scope
Source repositorygithub.com/OilerNetwork/naftaComponents reviewed
3 modules · 3 files- Nafta.sol
- truffle-config.js
- hardhat.config.js
Findings
0 of 7 findings resolved before the final report.
| ID | Title | Severity | Status |
|---|---|---|---|
6.2.1 | A User Can Inject A Malicious Contract The addNFT function deposits the NFT of the user to the pool, by inserting the nftAddress and the nftId. A malicious user can deploy an own ERC721 contract with modified standard functions, such as transfer and transferFrom. | Medium | acknowledged |
6.2.2 | Precision Loss Can Lead To Bypass Fees In the longRent and flashLoan functions, the pool fee is calculated using the following formula poolFree x longtermPayment / 1e18, the issue here is that if poolFee x longTermPayment is less than 1e18 the poolPart will be equal to 0 due to… | Medium | acknowledged |
6.2.3 | Anyone Can Mint Infinite Amount Of Nafta NFTs The users can only mint Nafta’s NFTs by locking their NFTs to the contract’s pool. As there are no restrictions on the contract, the user can create an ERC721 contract and mint an infinite number of Nafta NFTs. | Low | acknowledged |
6.2.4 | Missing Zero Address Checks Certain functions lack a safety check in the address, the address-type argument should include a zero-address test, otherwise, some of the contract’s functionality may become inaccessible. | Low | acknowledged |
6.2.5 | Missing Value Verification Certain functions lack a value safety check, the values of the arguments should be verified to allow only the ones that comply with the contract’s logic. | Low | acknowledged |
6.2.6 | Floating Pragma Version Identified It is recommended to specify a fixed compiler version to ensure that the bytecode produced does not vary between builds. This is especially important if you rely | Informational | acknowledged |
6.2.7 | Renounce Ownership Generally, the contract’s owner is the account that deploys the contract. As a result, the owner can perform certain privileged activities. The renounceOwnership function is used in smart contracts to renounce ownership. | Informational | acknowledged |
About this engagement
A smart contract audit reviews on-chain code for flaws an attacker could exploit. Engineers trace how assets move through the contracts, check who can call privileged functions, and test the arithmetic, external calls and upgrade paths. Each finding is rated by severity, and fixes are re-checked before the final report.
How softstack runs smart contract auditsMethodology
Review process
Scoping and threat modelling
The commit hash is frozen and the attack surface is mapped: asset flows, trust assumptions, privileged roles and the external systems the code depends on.
Automated analysis
Static analysers sweep the full codebase to surface known weakness patterns, unreachable states and deviations from established conventions.
Manual code review
Independent engineers read the code line by line, concentrating on business logic, access control, arithmetic and the handling of external calls.
Adversarial testing
Property-based fuzzing and invariant tests attack the assumptions the protocol relies on, targeting states that ordinary unit tests never reach.
Reporting
Every finding is documented with a severity rating, its impact, the steps to reproduce it and a concrete remediation the team can act on.
Remediation verification
Submitted fixes are re-reviewed against the original finding, and the final report records the resolved state of each one.
Standards and references
- SWC RegistrySmart Contract Weakness Classification
- CWECommon Weakness Enumeration
FAQ
NAFTA was audited by softstack GmbH, a German Web3 security and software company based in Flensburg and certified to ISO/IEC 27001 by TÜV SÜD. softstack completed a smart contract audit for NAFTA in July 2022. The full report is linked on this page and published in the softstack public audit archive.
The review reported 7 findings: 2 medium, 3 low and 2 informational. 0 of 7 were resolved or mitigated before the final report.
3 source files were reviewed in github.com/OilerNetwork/nafta at commit 773089f. The published report lists every file covered.
This report covers the code as reviewed in July 2022 at commit 773089f. Any code changed after that point is outside the reviewed scope.
Related audits
Browse all security auditsDisclaimer
This audit represents a point-in-time security assessment of the reviewed codebase and is intended for informational purposes only. While Softstack applies industry-standard security review methodologies, no audit can guarantee the absence of vulnerabilities, bugs, or other security risks. This report does not constitute financial, legal, regulatory, or investment advice, nor does it endorse the project, its business model, products, or services. Security is an ongoing process, and we strongly recommend conducting a new assessment following any material code changes or at least every 6 months to address newly emerging threats, vulnerabilities, and ecosystem developments.