# What is POPP?

Your Web3 blue checkmark and access card

The Proof of Position Protocol (POPP) is a set of smart contracts designed for the verification of employment credentials using blockchain technology.&#x20;

POPP enables seamless verification of an individual's position within an organization, facilitates the cryptographic linking of social profiles and communication channels to their respective positions, and grants access to exclusive online spaces through token gates.&#x20;

This documentation provides an overview of the key features and benefits offered by POPP.


# Position Verification

POPP allows for efficient and reliable verification of an individual's position within an organization.&#x20;

By leveraging the power of smart contracts, POPP enables the validation of a token holder's claimed position, such as Chief Technology Officer (CTO) of Hooli.&#x20;

This feature ensures transparency and eliminates the need for traditional, time-consuming verification processes.


# Cryptographic Linking of Social Profiles

POPP provides a robust mechanism to cryptographically link an individual's social profiles with their respective positions via signing various messages using a private key.

This functionality enhances trust and authenticity by establishing a verifiable connection between the token holder's online presence and their employment credentials.&#x20;


# Cryptographic Linking of Communication Channels

In addition to social profiles, POPP enables the cryptographic linking of various forms of communication channels to specific positions.&#x20;

This feature allows token holders to associate their official email addresses, messaging accounts, or other communication channels with their designated roles.&#x20;

By doing so, POPP establishes a secure and immutable link between the individual's position and their authorized channels of communication.


# Access to Exclusive Online Spaces

POPP offers a novel way to grant access to exclusive online spaces through token gates.&#x20;

Using the protocol, organizations can create secure environments accessible only to verified token holders. For instance, *Hooli* may employ token gates to restrict access to certain platforms or services exclusively to its employees. This feature ensures confidentiality, enhances data privacy, and fosters a sense of community within organizations.


# How does it work?

POPP has 3 parts, each represented by non-transferable token.

The 3 main working modules of POPP are:

1. The Employer Badge.
2. The Employee Access Card.
3. The Employee Badge.


# Employer Badge

The Employer Badge is a non-transferable ERC-1155 token and can be granted either by the POPP KYC team or a verified employer.&#x20;

This badge serves as a verification mechanism for employers within the POPP ecosystem. By holding the Employer Badge, employers gain the ability to grant POPP employee badges as verified employers.&#x20;

This ensures that only legitimate employers have the authority to issue employee credentials within the system.


# How do I get one?

In order to become a verified POPP employer, you will need to&#x20;

1. Sign up on the [POPP platform](https://www.proofofposition.xyz/)
2. Go through a simply KYC process and receive your employer badge.


# Employee Access Card

The Employee Access Card is a non-transferable ERC-1155 token that is granted to new team members during the onboarding process by their employer (verified by POPP).&#x20;

This token plays a crucial role in providing access to various online and metaverse spaces through token gates. Token gates act as access control mechanisms, allowing only those individuals holding the Employee Access Card to enter specific digital environments. It ensures that only authorized employees can access restricted areas, fostering confidentiality and privacy within online spaces.&#x20;


# Employee Badge

The Employee Badge is a non-transferable ERC-721 token that is granted to new team members by their employer *(verified by POPP)* during the onboarding process.&#x20;

This badge represents the holder's position within the company. By receiving an Employee Badge, individuals are provided with a verifiable proof of their employment position and their professional history.&#x20;

The unique nature of the ERC-721 token ensures that each employee has a distinct and identifiable badge, preventing duplication or tampering. This token establishes a clear link between the individual and their designated role, enhancing transparency and trust within the POPP ecosystem.


# Quick Start

The following will show how to get started using the protocol

The following will give some use cases and example of POPP integrations using the **Solidity** smart contract language.


# Employer Badge

Learn how to integrate the POPP employer badge into your code

To integrate our smart contracts you will need to install our `interface` package

```bash
npm install popp-interfaces
```

After the npm package has been installed, you can now import the `IEmployerSft` into your contract.

```solidity
import "popp-interfaces/IEmployerSft.sol";
```

{% hint style="info" %}
Employer badge contract (`erc-1115`)

**Testnets**&#x20;

* *goerli*: [0xbA48b6AC88761d8B153E50Ca882FB4Ae798f57df](https://goerli.etherscan.io/address/0xbA48b6AC88761d8B153E50Ca882FB4Ae798f57df)
* *sepolia*: [0x9452B6f7726214cc6BFD04c6145033D113A78eC4](https://sepolia.etherscan.io/address/0x9452b6f7726214cc6bfd04c6145033d113a78ec4)
* *optimism goerli:*&#x20;
* base goerli: [0x57172fC26F83BD18850B5657f62d2fa09Cd1C4dD](https://base-goerli.blockscout.com/address/0x57172fC26F83BD18850B5657f62d2fa09Cd1C4dD)
* polygon mumbai:&#x20;

**Mainnets**

* ethereum: coming soon...
* polygon: coming soon...
* optimism: coming soon...
* base: coming soon...
  {% endhint %}

Then you will need to instantiate the contract:

```solidity
IEmployerSft private employerSft;

function constructor(address _employerSftAddress) {    
    employerSft = IEmployerSft(_employerSftAddress);
}
```

You can now use the contract accordingly (refer to [the reference](/reference/employer-badge)):

```solidity
uint256 _employerId = employerSft.employerIdFromWallet(msg.sender);
```


# Employee Access Card

Learn how to integrate the POPP employee access card into your code

To integrate our smart contracts you will need to install our `interface` package

```bash
npm install popp-interfaces
```

After the npm package has been installed, you can now import the `IAccessCardSft` into your contract

```solidity
import "popp-interfaces/IAccessCardSft.sol";
```

{% hint style="info" %}
Employee access card smart contract (`erc-1115`)

**Testnets**&#x20;

* *goerli*: [0x6AD61192B4a732e4ce54A68c5c993370490EA042](https://goerli.etherscan.io/address/0x6AD61192B4a732e4ce54A68c5c993370490EA042)
* *sepolia*:&#x20;
* *optimism goerli:*&#x20;
* polygon goerli:&#x20;

**Mainnets**

* ethereum:&#x20;
* polygon:
* optimism:&#x20;
* base:
  {% endhint %}

Then you will need to instantiate our contract:

```solidity
IEmployerSft private employerSft;

function constructor(address _employerSftAddress) {    
    employerSft = IEmployerSft(_employerSftAddress);
}
```

You can now use the contract accordingly (refer to [the reference](/reference/employee-access-card)):

```solidity
uint256 _employerId = employerSft.employerIdFromWallet(msg.sender);
```


# Employee Badge

Learn how to integrate the POPP employee badge into your code

To integrate our smart contracts you will need to install our `interface` package

```bash
npm install popp-interfaces
```

After the npm package has been installed, you can now import the `IEmployeeNft` into your contract

```solidity
import "popp-interfaces/IEmployeeNft.sol";
```

{% hint style="info" %}
Employer badge contract (erc-721)

**Testnets**&#x20;

* *goerli*: [0xEc1c73060efd5dd5283AfF81eA5EaE03eA4d512D](https://goerli.etherscan.io/address/0xEc1c73060efd5dd5283AfF81eA5EaE03eA4d512D)
* *sepolia*: [0x88904C5Ef29570f999b234F2ae1456C2A02251f2](https://sepolia.etherscan.io/address/0x88904c5ef29570f999b234f2ae1456c2a02251f2)
* *optimism goerli:*&#x20;
* *base goerli:* [0x71763e216f4C68e8865F8dd1f060E2f1C5fb14c3](https://base-goerli.blockscout.com/address/0x71763e216f4C68e8865F8dd1f060E2f1C5fb14c3)
* polygon goerli:&#x20;

**Mainnets**

* ethereum:&#x20;
* polygon:
* optimism:&#x20;
* base:
  {% endhint %}

Then you will need to instantiate our contract:

```solidity
IEmployeeNft private employeeNft;

function constructor(address _employeeNftAddress) {    
    employeeNft = IEmployeeNft(_employeeNftAddress);
}
```

Then you can use the contract accordingly (refer to [the reference](/reference/employer-badge)):

```solidity
uint256 _tokenId = employeeNft.mintFor(0x3DdDF83eDD1aa846c4e75f0592AE60C4D1C1C1c6, "QmU2EXy9qKZd1H6ngxQMSY9vdbDyiVD8c8EEnaQqqW839d")
```


# Token Gates

The following will describe token gates and how they integrate into the protocol

### What is a token gate?

A token gate is software that can control access to particular spaces (online and offline) according the tokens held by a given wallet.&#x20;

So in the context of POPP, a token gate can only grant access to employees of your organisation. This can be applied to spaces in the [metaverse](https://www.spatial.io/), various websites, applications, blogposts and ultimately in the [real world](https://twitter.com/saurabhJsuranse/status/1583798660013633536) (coming soon).&#x20;


# Reference

The following documents the POPP smart contracts and their functions


# Employer Badge

A deep dive into the various methods in the Employer Badge ERC-1155 contract

The following assumes you have installed the required interface package and imported the working contract into your codebase.

### employerIdFromWallet

This `external` function allows anyone to get an employer's unique identifier from any given wallet. This can be used to verify a particular message sender is a POPP verified employer from a particular organisation.&#x20;

```solidity
uint256 _employerId = employerSft.employerIdFromWallet(msg.sender);
require(_employerId == 1, "You need to be a Hooli employer to access");
```

### addToMyTeam

Once you become a *verified* employer, you can now add wallets to your team using the `addToMyTeam` method. This will will allow you to scale the onboarding process for your organisation.&#x20;

```solidity
employerSft.addToMyTeam(_newEmployerWallet);
```

### removeFromMyTeam

You can remove any team member using the external `removeFromMyTeam` function. This will burn the token and set the \`inValidFrom\` date (as a timestamp).&#x20;

{% hint style="info" %}
The `invalidFrom`  timestamp is used for when an employer's wallet is compromised and any activity holding that token becomes invalid.
{% endhint %}

```solidity
employerSft.removeFromMyTeam(_employerWallet, 1546360800);
```

### invalidFrom

A way to check the timestamp when a given employer wallet was removed form the team.

```solidity
employerSft.invalidFrom(_employerWallet);
```


# Employee Badge

A deep dive into the various methods in the Employee Badge ERC-721 contract

The following assumes you have installed the required interface package and imported the working contract into your codebase.

### mintFor

Used for onboarding new employees. This `external` function allows verified employers to add a given wallet to their organisation and define a tokenUri which will contain the `ipfs` CID pointer to the json file representing the job details in the standard NFT json schema.

```solidity
uint256 _tokenId = employeeNft.mintFor(0x3DdDF83eDD1aa846c4e75f0592AE60C4D1C1C1c6, "QmU2EXy9qKZd1H6ngxQMSY9vdbDyiVD8c8EEnaQqqW839d");
```

```json
{
  "name": "Chief Technology Officer",
  "image": "ipfs://QmXVPmiW6uq6c9XDKkFeQjU6KVjCq4wi5zksaE5WwSwbAX",
  "employer": "Hooli",
  "attributes": [
    {
      "display_type": "date",
      "trait_type": "start date",
      "value": 1546360800
    },
    {
      "trait_type": "Employer",
      "value": "Hooli"
    },
    {
      "trait_type": "Department",
      "value": "Internal Solutions"
    },
    {
      "trait_type": "Governance Level",
      "value": "Board of Directors"
    },
    {
      "trait_type": "Special Groups",
      "value": "Hooli X"
    }
  ]
}
```

### getEmployerId

An easy way to get the current employer id for a give employee NFT id.

```solidity
uint256 _employerId = employeeNft.getEmployerId(1)
```

### burn

&#x20;As a token holder (employee) or token granter (employer) you can terminate the employment within that organisation at any given time. This is done by burning the employee badge.

```solidity
employeeNft.burn(_tokenId);
```


# Employee Access Card

A deep dive into the various methods in the Employee Access Card ERC-1155 contract

The following assumes you have installed the required interface package and imported the working contract into your codebase.

### addToMyEmployer

This `external` function allows verified employers to onboard new employees by granting the their pre-configured `ERC-1155` Access Card.

```solidity
uint256 _tokenId = employerSft.addToMyEmployer(_employee);
```

### removeFromMyEmployer

A verified employer can, at any time, off-board an employee in their organisation. This will subsequently burn the `ERC-1155`, thus revoking ownership.

```solidity
employerSft.removeFromMyEmployer(_newEmployerWallet);
```


# Code Audit

Coming soon ...


# POPP Job Marketplace

Coming soon...


