> For the complete documentation index, see [llms.txt](https://reports.immunefi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reports.immunefi.com/folks-smart-contract-library/49409-sc-insight-incorrect-comment-in-uint64setlib.md).

# #49409 \[SC-Insight] Incorrect comment in UInt64SetLib

**Submitted on Jul 15th 2025 at 15:47:35 UTC by @j3x for** [**Audit Comp | Folks Smart Contract Library**](https://immunefi.com/audit-competition/folks-sc-library)

* **Report ID:** #49409
* **Report Type:** Smart Contract
* **Report severity:** Insight
* **Target:** <https://github.com/Folks-Finance/algorand-smart-contract-library/blob/main/contracts/library/UInt64SetLib.py>
* **Impacts:**

## Description

## Brief/Intro

Incorrect comment in `UInt64SetLib` library.

## Vulnerability Details

It is mentioned in [this comment](https://github.com/Folks-Finance/algorand-smart-contract-library/blob/main/contracts/library/UInt64SetLib.py#L10) that:

> item on stack cannot exceed 4098 bytes.

But this is incorrect, the correct value is 4096 bytes, according to the algorad documentation:

> If the stack depth is exceeded or if a byte-array element exceeds 4096 bytes, the program fails.

Source: <https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#the-stack>

## Impact Details

Incorrect information to integrators, which may erode their trust.

## References

<https://github.com/Folks-Finance/algorand-smart-contract-library/blob/main/contracts/library/UInt64SetLib.py#L10>

<https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#the-stack>

## Proof of Concept

## PoC

Change the 4098 to 4096, this will enhance the documentation and give confidence to readers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://reports.immunefi.com/folks-smart-contract-library/49409-sc-insight-incorrect-comment-in-uint64setlib.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
