# #45772 \[SC-Insight] NatSpec Mismatch in CoreVault Redemption Logic

**Submitted on May 20th 2025 at 10:05:51 UTC by @MyssTeeQue for** [**Audit Comp | Flare | FAssets**](https://immunefi.com/audit-competition/audit-comp-flare-fassets)

* **Report ID:** #45772
* **Report Type:** Smart Contract
* **Report severity:** Insight
* **Target:** <https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/facets/CoreVaultFacet.sol>
* **Impacts:**

## Description

## Brief/Intro

In `CoreVaultFacet.sol`, there is a mismatch between the NatSpec comment and the actual code implementation for the `redeemFromCoreVault` function. The NatSpec comment states that "the number of lots, must be larger than `coreVaultMinimumRedeemLots` setting", but the code uses a greater than or equal to (`>=`) comparison:

## Vulnerability Details

```solidity
//@audit-info natspec says "the number of lots, must be larger than `coreVaultMinimumRedeemLots` setting"
// but the code is using `_lots >= minimumRedeemLots`
require(_lots >= minimumRedeemLots, "requested amount too small");
```

The code's implementation is actually safer as it:

1. Allows redemption at exactly the minimum threshold
2. Avoids potential precision issues with strict inequalities

## Impact Details

The code is actually more permissive than documented, not less

* Could cause confusion for developers reading the documentation
* Might lead to unnecessary code changes if someone tries to "fix" the code to match docs

## Proof of Concept

## Proof of Concept

Update the NatSpec comment to accurately reflect the code's behavior and its rationale:

```solidity
// The number of lots must be greater than or equal to the minimum required lots.
// This allows redemption of exactly the minimum amount while avoiding strict inequality precision issues.
```

No code changes are needed as the current implementation using `>=` is the safer approach.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reports.immunefi.com/flare-fassets-or-mainnet-audit-comp/45772-sc-insight-natspec-mismatch-in-corevault-redemption-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
