# Component Libraries

The Configurable Rights Pool uses several externally linked libraries to implement all its functionality, detailed below.

* **BalancerConstants** - constant state variables used throughout
* **BalancerSafeMath** - similar to Open Zeppelin SafeMath, but normalized so that "1" = 10^18, to allow fractional arithmetic (e.g., on weights)
* **RightsManager** - defines a struct of boolean values, corresponding to each right; the Configurable Rights Pool stores this struct in storage.
* **SmartPoolManager** - factors out computationally intensive functions, mainly to reduce the bytecode size of the Configurable Rights Pool, to keep it deployable
* **SafeApprove** - an internal library (adapted from PieDAO) to enable pools to contain ERC20 tokens that require approve calls to be made from a base of 0 (e.g., KNC)

The Configurable Rights Pool contains getter functions that return the addresses of these libraries; a bit of future-proofing, so that clients can implement versioning.


---

# 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://balancer.gitbook.io/balancer-v2/v1/smart-contracts/smart-pools/component-libraries.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.
