πŸ“ƒProtocol Technical Description

Perpy's core contracts have a simple structure: A factory contract is responsible for creating Trading Vaults for traders where they will be able to trade users’ deposits. After a deposit is made, the user receives an equivalent amount of shares corresponding to an ERC-20 contract which acts as a proof of deposit. The vault also tracks the performance of the trader through the shares and manages fees redistribution. TVL and shares are calculated by Pyth Network oracle.

Trading Vault

Perpy introduces the concept of Trading Vault which is a contract that enables the trader to interact with decentralized Perpetual Protocols like GMX or 1inch.

From the user’s perspective, following someone corresponds to making a deposit in a vault. The owner of the vault can then trade with the vault’s funds as he would trade using his wallet on GMX.

There are two different types of vaults: PERP vaults and SPOT vaults.

PERP Vaults

PERP vaults operate through integration of GMX (Arbitrum) and Level Finance (BNB Chain).

When a trade is in progress in a PERP Vault

In the event that a trade is in progress, an investor cannot deposit funds directly, but can program a deposit through Gelato. Gelato will then deposit the user's funds once all trades are closed."

Similarly, users are able to program an automatic withdrawal with Gelato.

In a PERP vault, funds are always deposited and withdrawn in USDC.

SPOT Vaults

Spot vaults operate through integration of 1inch. Currently, spot vaults are only available on the Arbitrum network, but very soon Ethereum and BNB Chain will be added.

Unlike Perp vaults, deposits and withdrawals in a Spot vault are always instant. When depositing USDC, an investor receives their share of the vault immediately, allowing the trader to start trading with the funds without delay. Similarly, during withdrawal, the investor receives their funds directly.

When an investor withdraws their share from the vault, they will receive a portion of all the assets held by the vault.

Example: Suppose the trader holds 50% of the vault's funds in BTC and 50% in ETH, and the investor has deposited USDC to acquire a 10% share of the vault. When the investor withdraws their 10%, they will receive in their wallet 50% in BTC and 50% in ETH.

Last updated