# Under the hood

On the lower end of the implementation, the protocol consists of multiple smart contracts with various responsibilities that enable various protocol features.

Besides Renfter smart contract as the core of the protocol, the rest of the smart contracts are implemented to create an extendable, loosely-coupled, and modular protocol, which would allow new feature additions in the future, as well as during development.

{% hint style="info" %}
The entire smart contract suite is currently upgradable using the OpenZeppelin Upgrades tool. The decision to use OpenZeppelin Upgrade allows contracts to be modified during development and any internal/external testing sessions. While for most smart contracts this functionality will be removed at the time of the official release, the core of the protocol may still be upgradeable in order to tackle any future feature addition or bug fixing release.
{% endhint %}

### BaseGovernance

Contains base governance functionalities for Renfter’s smart contracts and enables emergency actions in case of emergency situations of any kind (hack, malfunction etc.)

### FeeDistributor

Responsible for distributing fees appropriately according to the initial fee and payment token setup. It also provides fee calculation on-chain.

### WalletFactory

Responsible for creating new Holder Wallets uniquely associated with a particular user. The description of Holder Wallets can be found in "[Technical Overview](/developers/technical-overview.md)".

### wNFTFactory

Responsible for creating the wrapper smart contracts of any NFT collection. As NFTs can be represented by using either the ERC-721 or the ERC-1155 standards, separate wrappers are created depending on the ERC compliance of the original NFT collection.

### wNFTBase

Contains the base logic inherited by both types of wrapper NFT contracts.

### MethodWhitelist

Contains the logic for whitelisting method calls towards the original NFT collection on behalf of the wrapper NFT contract token owner.

### wNFT721

Represents the standard implementation of the ERC-721 standard while also adding the required functionality to integrate the standard with Renfter’s core smart contract.

### wNFT1155

Represents the standard implementation of the ERC-1155 standard while also adding token ownership, which is not originally part of the standard. It also contains the required functionality to integrate the standard with Renfter’s core smart contract.


---

# 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://docs.renfter.com/developers/technical-overview/under-the-hood.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.
