# AngelNFT

{% hint style="info" %}

### 📋 Contract Overview

{% endhint %}

| Property        | Value                              |
| --------------- | ---------------------------------- |
| 📁 **File**     | `src/AngelNFT.sol`                 |
| 🔧 **Type**     | Non-Upgradeable Soul-Bound ERC-721 |
| ⚙️ **Solidity** | 0.8.33                             |
| 📜 **License**  | MIT                                |

{% hint style="info" %}
**🎯 Purpose:** Soul-bound NFTs for Angel-tier investors ($10,000 - $250,000), unlocking governance participation and investor benefits.
{% endhint %}

***

{% tabs %}
{% tab title="💰 Investment Tier" %}

### 💰 Angel Tier Details

| Attribute                     |        Value       |
| ----------------------------- | :----------------: |
| 💵 **Investment Range**       | $10,000 - $250,000 |
| 🗳️ **Governance Multiplier** |     1.5× - 3.0×    |
| 🆔 **Token ID Range**         |     1000 - 9999    |
| 📊 **Max Supply**             |      Unlimited     |
| {% endtab %}                  |                    |

{% tab title="⚙️ Specifications" %}

### ⚙️ Technical Specifications

| Property              | Value             |
| --------------------- | ----------------- |
| 📜 **Token Standard** | ERC-721           |
| 🔄 **Upgradeable**    | ❌ No              |
| 🔗 **Transferable**   | ❌ No (soul-bound) |

#### Inherits From

* `ERC721` (OpenZeppelin)
* `ERC721URIStorage` (OpenZeppelin)
* `AccessControl` (OpenZeppelin)
  {% endtab %}

{% tab title="🔐 Roles" %}

### 🔐 Access Control Roles

| Role                    | Description                                                                    |
| ----------------------- | ------------------------------------------------------------------------------ |
| 👑 `DEFAULT_ADMIN_ROLE` | Can grant/revoke all roles                                                     |
| 🔧 `MINTER_ROLE`        | Can mint NFTs ([InvestorMintContract](/developers/contracts/investor-mint.md)) |
| 🖼️ `URI_ROLE`          | Can update token URIs                                                          |
| {% endtab %}            |                                                                                |
| {% endtabs %}           |                                                                                |

***

## 📊 Subtier System

{% hint style="info" %}
Angel investments are divided into 5 subtiers with increasing governance power.
{% endhint %}

|     Subtier    | Investment Range    | Governance Multiplier |
| :------------: | ------------------- | :-------------------: |
| 👼 **Angel 1** | $10,000 - $25,000   |          1.5×         |
| 👼 **Angel 2** | $25,001 - $50,000   |          1.8×         |
| 👼 **Angel 3** | $50,001 - $100,000  |          2.2×         |
| 👼 **Angel 4** | $100,001 - $175,000 |          2.6×         |
| 👼 **Angel 5** | $175,001 - $250,000 |          3.0×         |

{% hint style="warning" %}
All investor multipliers are capped at 5× maximum by the [Governance contract](/developers/contracts/governance.md).
{% endhint %}

***

## 🔧 Functions

{% tabs %}
{% tab title="🔧 Minting" %}

### 🔧 Mint Angel NFT

```solidity
function mint(
    address to,
    uint256 investmentAmountUSD,
    uint8 subtier
) external onlyRole(MINTER_ROLE) returns (uint256)
```

**Access:** `MINTER_ROLE` ([InvestorMintContract](/developers/contracts/investor-mint.md) only)

**Parameters:**

* `to` - Recipient wallet address
* `investmentAmountUSD` - Investment amount in USD (6 decimals)
* `subtier` - Subtier level (1-5)

**Requirements:**

* Investment amount within Angel tier range
* Subtier matches investment amount
* Recipient not already holding Angel NFT
  {% endtab %}

{% tab title="⬆️ Upgrade" %}

### ⬆️ Upgrade Subtier

```solidity
function upgradeSubtier(
    uint256 tokenId,
    uint256 additionalInvestment
) external
```

Investors can upgrade their subtier with additional investment.

**Requirements:**

* Caller must own the token
* Additional investment pushes total to higher subtier
* Processed through [InvestorMintContract](/developers/contracts/investor-mint.md)
  {% endtab %}

{% tab title="👁️ View" %}

### 👁️ Query Functions

#### Investment Details

```solidity
function getInvestmentDetails(uint256 tokenId)
    external view returns (uint256 amount, uint256 date, uint8 subtier)
```

Returns investment details for a token.

#### Governance Multiplier

```solidity
function getGovernanceMultiplier(uint256 tokenId)
    external view returns (uint256)
```

Returns multiplier in basis points (15000 = 1.5×).

#### Investor Subtier

```solidity
function getInvestorSubtier(address investor)
    external view returns (uint8)
```

Returns subtier for an investor's wallet.
{% endtab %}
{% endtabs %}

***

## 🔗 Soul-Bound Implementation

{% hint style="warning" %}
Angel NFTs cannot be transferred—ensuring investment status stays with original investor.
{% endhint %}

```solidity
function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId,
    uint256 batchSize
) internal virtual override {
    // Only allow minting (from = 0) and burning (to = 0)
    if (from != address(0) && to != address(0)) {
        revert SoulBoundToken();
    }
    super._beforeTokenTransfer(from, to, tokenId, batchSize);
}
```

### Soul-Bound Benefits

| Concern                    | Solution                   |
| -------------------------- | -------------------------- |
| 🛡️ **Investment fraud**   | NFT proves investment      |
| 🗳️ **Governance attacks** | Can't buy governance power |
| 👥 **Sybil attacks**       | One NFT per investor       |
| 📈 **Market manipulation** | No secondary market        |

***

## 🖼️ Token Metadata

```json
{
    "name": "Built By DAO Angel Investor #1234",
    "description": "Angel-tier investor in Built By DAO",
    "image": "ipfs://[hash]/angel-[subtier].png",
    "attributes": [
        { "trait_type": "Tier", "value": "Angel" },
        { "trait_type": "Subtier", "value": "3" },
        { "trait_type": "Investment Date", "display_type": "date", "value": 1704067200 },
        { "trait_type": "Governance Multiplier", "value": "2.2x" }
    ]
}
```

***

## 📜 Events & Errors

{% tabs %}
{% tab title="📢 Events" %}

```solidity
event AngelMinted(
    address indexed investor,
    uint256 indexed tokenId,
    uint256 investmentAmount,
    uint8 subtier
);
event SubtierUpgraded(
    uint256 indexed tokenId,
    uint8 oldSubtier,
    uint8 newSubtier
);
event BaseURIUpdated(string newBaseURI);
```

{% endtab %}

{% tab title="⛔ Errors" %}

```solidity
error InvalidInvestmentAmount(uint256 amount, uint256 minRequired, uint256 maxAllowed);
error InvalidSubtier(uint8 provided, uint8 expected);
error AlreadyHoldsNFT(address investor);
error SoulBoundToken();  // Transfers not allowed
error InvalidTokenId(uint256 tokenId);
```

{% endtab %}
{% endtabs %}

***

## 💰 Investment Flow

{% hint style="info" %}

```
1. Investor completes KYC
2. Investor sends funds to InvestorMintContract
3. InvestorMintContract calls AngelNFT.mint()
4. NFT issued to investor wallet
5. BLTBY tokens vested according to schedule
6. Governance multiplier active immediately
```

{% endhint %}

***

## 🔗 Contract Interactions

| Contract                                                          | Interaction                         |
| ----------------------------------------------------------------- | ----------------------------------- |
| 🔧 [InvestorMintContract](/developers/contracts/investor-mint.md) | Calls mint after investment         |
| ⚖️ [Governance](/developers/contracts/governance.md)              | Reads multiplier for voting power   |
| 🏦 [Treasury](/developers/contracts/treasury.md)                  | Investment proceeds deposited       |
| 🪙 [BLTBYToken](/developers/contracts/bltby-token.md)             | Token allocation tied to investment |

***

<details>

<summary>💻 Integration Examples</summary>

#### Checking Investment Status

```javascript
const hasAngel = await angelNFT.balanceOf(investorAddress) > 0;
const tokenId = await angelNFT.tokenOfOwnerByIndex(investorAddress, 0);
const details = await angelNFT.getInvestmentDetails(tokenId);
```

#### Getting Governance Multiplier

```javascript
const multiplier = await angelNFT.getGovernanceMultiplier(tokenId);
// Returns basis points: 22000 = 2.2×
```

</details>

***

## 🔗 Related Pages

{% content-ref url="/pages/mEeXNWEzutYvRZoAjjzs" %}
[VentureOneNFT](/developers/contracts/ventureone-nft.md)
{% endcontent-ref %}

{% content-ref url="/pages/NZzxSKox9AQQdC4dBTRF" %}
[TrustNFT](/developers/contracts/trust-nft.md)
{% endcontent-ref %}

{% content-ref url="/pages/WO6aki9lKfddce25yEOE" %}
[InvestorMintContract](/developers/contracts/investor-mint.md)
{% endcontent-ref %}

{% content-ref url="/pages/bnZ7LGns2GHcaGozmfFV" %}
[Governance](/developers/contracts/governance.md)
{% endcontent-ref %}

{% content-ref url="/pages/HdsFywC5nPpuADDVeO1d" %}
[Investment Tiers](/investors/tiers.md)
{% endcontent-ref %}


---

# 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.builtbydao.com/developers/contracts/angel-nft.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.
