# Smart contract architecture

Creator Vault uses smart contracts for campaigns, NFT receipts, and bounties. Funds live in contracts. Creators and supporters interact through wallet transactions.

### High-level components

* **Factory contracts**
  * Deploy new campaign and bounty contracts.
* **Campaign contracts**
  * Accept $CAMP contributions.
  * Enforce withdrawal and refund rules.
* **Campaign NFT (ERC721)**
  * Mints receipt NFTs to supporters.
* **Bounty contracts**
  * Hold a locked reward pool.
  * Distribute rewards once, after the deadline.

### Roles

* **Creator**
  * Deploys campaigns and bounties.
  * Withdraws campaign funds when eligible.
  * Approves refunds for failed campaigns.
  * Selects bounty winners.
* **Supporter**
  * Funds campaigns.
  * Receives an NFT receipt.
  * Claims refunds if approved.

### Transactions you’ll commonly sign

* Deploy a campaign (creator).
* Deploy a bounty + deposit reward pool (creator).
* Fund a campaign (supporter).
* Withdraw campaign funds (creator).
* Approve + claim refunds (creator + supporter).
* Distribute bounty rewards (creator).

### Contract addresses (Camp Network mainnet)

* **CrowdfundingFactory**: `0xbDA3C2F7B43073e839dca15E95188f092649cF3f`
* **CampaignNFT (ERC721)**: `0xD5fbD7b84b3eFBd4d170833c07EC562991902075`
* **BountyFactory**: `0xd65C7439FE678fEf9E0b222395dA3a343A996A00`
* **Platform fee wallet**: `0x318787Ab7315c8d736A539a6C1bd8456f8266D47`

{% hint style="warning" %}
Addresses are network-specific. Always verify you are on the intended network before transacting.
{% endhint %}

### Immutability and upgrades

Contracts are intended to be immutable. New features typically ship as new deployments.


---

# 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://creator-vault.gitbook.io/documentation/creator-vault/reference/smart-contract-architecture.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.
