> 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/49413-sc-insight-discrepancy-between-document-and-codebase.md).

# #49413 \[SC-Insight] discrepancy between document and codebase

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

* **Report ID:** #49413
* **Report Type:** Smart Contract
* **Report severity:** Insight
* **Target:** <https://github.com/Folks-Finance/algorand-smart-contract-library/blob/main/contracts/library/RateLimiter.py>
* **Impacts:**
  * Contract fails to deliver promised returns, but doesn't lose value

## Description

## Brief/Intro

discrepancy in code base and document

## Vulnerability Details

the document says this about `_fill_amount` in `RateLimiter.py`

> \_fill\_amount(byte\[32] bucket\_id, uint64 amount) returns void. Fills an amount inside a bucket. Will not exceed the bucket’s limit. It emits the BucketFilled event.

says this functioni will get `uint64` as amount input however in the codebase it takes `uint256`:

```python
 def _fill_amount(self, bucket_id: Bytes32, amount: UInt256) -> None:
```

***

also about `get_rate_duration` document says it should return `uint256`

> get\_rate\_duration(byte\[32] bucket\_id) returns uint256. Returns the rate duration of the given bucket.

but codebase returns `uint64`:

```python
get_rate_duration(byte[32] bucket_id) returns uint256. Returns the rate duration of the given bucket.

```

## Impact Details

although this doesnt make direct risk but its a discrepancy that should be fixed hence reported `Low` severity that might cause issue

## References

(<https://github.com/Folks-Finance/algorand-smart-contract-library/blob/7673a43fa5183af736b65f17d1a297fdea672059/contracts/library/RateLimiter.py#L96-L97>)

(<https://github.com/Folks-Finance/algorand-smart-contract-library/blob/7673a43fa5183af736b65f17d1a297fdea672059/contracts/library/RateLimiter.py#L222-L223>)

## Proof of Concept

## Proof of Concept

discrepancy in code base and document


---

# 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/49413-sc-insight-discrepancy-between-document-and-codebase.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.
