# Protocol Overview

Shprd protocol is designed to combine **security** with **decentralisation**.

For this purpose, a **role-based** access system has been set up to drastically reduce the risk of malicious actions. Besides, sensitive smart-contracts use proxies, which allow changes to be made in case of discovered vulnerabilities or the addition of new features.&#x20;

Learn more about Shprd's security measures on [pause](https://docs.shprd.finance/understand-shprd/pause "mention").

### DeFi protocols used by Shprd:

Vault smart contracts rely on two external actors, a **DEX Aggregator API** and **Chainlink price feeds**.&#x20;

1. **Chainlink Price Feeds**: In a vault, each asset is associated with a Chainlink price feed denominated in USD to exactly 8 decimal places. Chainlink price feeds are the fastest, most reliable and most secure way to obtain asset prices in a decentralised manner.
2. **DEX Aggregator and AMM**: The rebalance process is performed via Paraswap which is a swap optimizer like 1inch or 0x. The aim is to swap assets in a decentralised way and at the best prices.

### Factory

The *Factory* enables the creation of vaults and serves as a **registry**.

{% content-ref url="../technical-reference/core-contracts/factory" %}
[factory](https://docs.shprd.finance/technical-reference/core-contracts/factory)
{% endcontent-ref %}

### Vault

**Shprd** protocol is mainly represented by one contract, the vault. Vaults are smart contracts deployed by a **Factory** with a set of parameters defined at creation (assets, fees, security constraints). At creation, the vault creates an **ERC20** which will represent its **shares**.

A vault accepts deposits (e.g. in BUSD) and mints new ERC20 shares, in proportion to the deposit. It accepts withdrawals (in shares of the vault) and charges **fees** (management, performance and exit fees) according to the rates defined at creation.

To continuously value itself, it uses **Chainlink oracles** (e.g. USD-BTC, USD-ETH price feed) to determine the prices of volatile assets (e.g. BTC, ETH). Depending on the development of the volatile asset included in the vault, the **value** of the shares in the vault **increases**.

{% content-ref url="../technical-reference/core-contracts/vault" %}
[vault](https://docs.shprd.finance/technical-reference/core-contracts/vault)
{% endcontent-ref %}

### FeesManager

The FeesManager contract manages **management** and **performance** fees **receivers**.

{% content-ref url="../technical-reference/core-contracts/feesmanager" %}
[feesmanager](https://docs.shprd.finance/technical-reference/core-contracts/feesmanager)
{% endcontent-ref %}

### AccessManager

The AccessManager contract manages the **privileges** of protocol users. Indeed, vault creation by the Factory's 'createVault' method is only possible for addresses with the vault creator **role** granted by the AccessManager contract.

{% content-ref url="../technical-reference/core-contracts/accessmanager" %}
[accessmanager](https://docs.shprd.finance/technical-reference/core-contracts/accessmanager)
{% endcontent-ref %}

### KYCToken

The KYCToken contract manages the **KYC** of the protocol users. It may be necessary to be KYC to invest in a vault depending on the configuration chosen by the **trader**.

{% content-ref url="../technical-reference/core-contracts/kyctoken" %}
[kyctoken](https://docs.shprd.finance/technical-reference/core-contracts/kyctoken)
{% endcontent-ref %}
