Vault Wrapper

If you would like to offer existing IPOR Vault to your customers and be compensated by charging fees, you can use a Vault Wrapper.

Plasma Vault Wrapper allows to charge fees on top of existing vaults and is compatible with every vault that allows for instant withdraw.

You can find ready contract here:

Unexpected error with integration github-files: Integration is not installed on this space

With a corresponding test file:

Unexpected error with integration github-files: Integration is not installed on this space

Quick Start

  • Identify the address of the vault you want to wrap. It can be found on the vault page on the https://app.ipor.io website.

  • Select the WrapperName (ERC20 standard)

  • Select the Ticker (ERC20 standard)

  • Appoint feeAccount - address that will claim the fees

  • select feePercentage for both performance and management fees

    • Fee is defined with 2 decimal places (10000 = 100%)

    • Contract hard caps the fee at 5% for management and 50% on performance

Construct the vault:

wPlasmaVault = new WrappedPlasmaVault(usdc, "WrapperName", "Ticker", address(plasmaVault));
wPlasmaVault.configurePerformanceFee(feeAccount, feePercentage);
wPlasmaVault.configureManagementFee(feeAccount, feePercentage);

Shares

Wrapper itself is a ERC4626 vault and emits it's own shares. Those shares are minted and burned along the shares of underlying vault.

Depositing/Minting and Withdrawing/Redeeming

The Interface allows to define amount of underlying asset to be deposited:

or number of shares to be minted:

Likewise, to exit the position, user can either appoint amount of underlying asset to be withdrawn:

or number of shares to be redeemed:

Checking the vault share price

As the vault accrue interest, the price of the share accounted in the underlying token changes.

It's important to know that the exchange rate is not updated constantly but rather with every rebalance the amount off assets held in a particular market is updated.

If you would like to simulate the exchange as if the balance was updated you can manually recalculate the cache by dry running update markets and convertToAssets inside of the multicall. Below you can find an example how to do it using JavaScript;

Administration

The deployer of the contract becomes the owner automatically. The owner can run the administrative actions, like changing fees or transferring ownership to another account.

Claiming fees

The address appointed as feeAccount will receive fees as shares in the vault. Those shares can be redeemed for the underlying asset of the vault. Simply run theredeem/withdraw function.

Setting fees

Transferring ownership

The ownership of the wrapper can be made by executing 2-step transfer process:

And as a new owner

Changing feeAccount

You can change the account that can claim fees along with setting the fee rate.

Last updated