> 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.md).

# Folks Smart Contract Library | Aud Comp

## Reports by Severity

<details>

<summary>Low</summary>

* \#49075 \[SC-Low] \`SetLib.remove\_item()\` is not safe on empty Dynamic arrays
* \#49559 \[SC-Low] The remove functionality in \`UInt64SetLib::remove\_item\` underflows on empty array
* \#48983 \[SC-Low] Potential Underflow in remove\_item() on Empty Array
* \#48990 \[SC-Low] Integer underflow in remove\_item leads to AVM trap and DoS via empty array call
* \#48894 \[SC-Low] Underflow in index calculation fails remove\_item
* \#49003 \[SC-Low] Array Underflow Vulnerability in UInt64SetLib leads to contract failure
* \#49687 \[SC-Low] An underflow in \`remove\_item\` function in \`Uint64SetLib\` Contract.
* \#48885 \[SC-Low] No items length check in remove\_item leads to a revert with an underflow
* \#48998 \[SC-Low] Critical UInt64 underflow in set removal causes permanent denial of service
* \#49938 \[SC-Low] Underflow Revert in \`remove\_item\` When Removing from an Empty Array
* \#49390 \[SC-Low] \`UInt64SetLib#remove\_item\` would revert if the item is empty
* \#49527 \[SC-Low] Invariant breakage , Edge case Integer UInt64SetLib.py::remove\_item leads to int underflow
* \#49690 \[SC-Low] Integer Underflow in UInt64SetLib.py

</details>

<details>

<summary>Insight</summary>

* \#49409 \[SC-Insight] Incorrect comment in UInt64SetLib
* \#49250 \[SC-Insight] \`AccessControl\`: unnecessary box usage in \`\_grant\_role\`
* \#48747 \[SC-Insight] Consider emitting BucketConsumed for infinite buckets in RateLimiter
* \#49970 \[SC-Insight] Malicious upgradable admin can permanently brick contract upgradeability
* \#49553 \[SC-Insight] program\_sha256\`, Reducing Auditability and Monitoring Efficiency
* \#48717 \[SC-Insight] RateLimiter current capacity can be permanently held at zero
* \#48804 \[SC-Insight] TBD
* \#49061 \[SC-Insight] The Function \`get\_current\_capacity()\` returns wrong value when bucket is infinite
* \#49051 \[SC-Insight] Improving and expanding documentation to reduce risks
* \#49437 \[SC-Insight] \`RateLimiter\`: incorrect infinite -> finite bucket transition
* \#49413 \[SC-Insight] discrepancy between document and codebase
* \#48718 \[SC-Insight] Contract Upgrade Completion DoS/Takeover Risk

</details>

## Reports by Type

<details>

<summary>Smart Contract</summary>

* \#49075 \[SC-Low] \`SetLib.remove\_item()\` is not safe on empty Dynamic arrays
* \#49559 \[SC-Low] The remove functionality in \`UInt64SetLib::remove\_item\` underflows on empty array
* \#49409 \[SC-Insight] Incorrect comment in UInt64SetLib
* \#48983 \[SC-Low] Potential Underflow in remove\_item() on Empty Array
* \#48990 \[SC-Low] Integer underflow in remove\_item leads to AVM trap and DoS via empty array call
* \#49250 \[SC-Insight] \`AccessControl\`: unnecessary box usage in \`\_grant\_role\`
* \#48894 \[SC-Low] Underflow in index calculation fails remove\_item
* \#49003 \[SC-Low] Array Underflow Vulnerability in UInt64SetLib leads to contract failure
* \#48747 \[SC-Insight] Consider emitting BucketConsumed for infinite buckets in RateLimiter
* \#49970 \[SC-Insight] Malicious upgradable admin can permanently brick contract upgradeability
* \#49553 \[SC-Insight] program\_sha256\`, Reducing Auditability and Monitoring Efficiency
* \#48717 \[SC-Insight] RateLimiter current capacity can be permanently held at zero
* \#49687 \[SC-Low] An underflow in \`remove\_item\` function in \`Uint64SetLib\` Contract.
* \#48885 \[SC-Low] No items length check in remove\_item leads to a revert with an underflow
* \#48998 \[SC-Low] Critical UInt64 underflow in set removal causes permanent denial of service
* \#48804 \[SC-Insight] TBD
* \#49061 \[SC-Insight] The Function \`get\_current\_capacity()\` returns wrong value when bucket is infinite
* \#49938 \[SC-Low] Underflow Revert in \`remove\_item\` When Removing from an Empty Array
* \#49051 \[SC-Insight] Improving and expanding documentation to reduce risks
* \#49437 \[SC-Insight] \`RateLimiter\`: incorrect infinite -> finite bucket transition
* \#49413 \[SC-Insight] discrepancy between document and codebase
* \#49390 \[SC-Low] \`UInt64SetLib#remove\_item\` would revert if the item is empty
* \#49527 \[SC-Low] Invariant breakage , Edge case Integer UInt64SetLib.py::remove\_item leads to int underflow
* \#48718 \[SC-Insight] Contract Upgrade Completion DoS/Takeover Risk
* \#49690 \[SC-Low] Integer Underflow in UInt64SetLib.py

</details>


---

# 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.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.
