neprifinance
Search…
MINT

Forging (Minting & Redeeming) is the exchange of a whitelisted sbAsset for its corresponding niAsset at a 1:1 ratio. Forging increases or decreases the number of niAssets in circulation.

Minting

Each niAsset will use a smart contract to facilitate minting and redemption and hold its collateral.
    To mint an NEPRIM asset, a user will call the mint function of that niAsset contract.
    The user will then send any of the underlying whitelisted tokens to the smart contract of that asset.
      For the USD asset, the underlying sbAsset could be USDC, TUSD, USDT, BUSD, DAI, or sUSD.
    A mint is valid if it does not push any of the sbAsset collateral levels past their predefined maximum weight.
Minting a niAsset offers optionality and immediate 1:1 (zero slippage) conversion of a sbAsset into its corresponding niAsset.
For example, if you send 100 DAI to the nUSD contract, you will receive 100 redeemable nUSD back. Minting costs you nothing but gas. Users must have a niASSET in order to take advantage of NEPRIM's native interest rate.
All niAssets will be ERC20 compliant and redeemable for the underlying bAsset(s) at any time.

Redemption

In reverse, users will redeem their niAsset by calling a redeem function on the niAsset contract.
    The user will be able to specify which sbAsset they wish to receive in return for an equivalent amount of their niAsset (which is then burned).
    A redemption will be valid so long as the given sbAsset(s) does not push any of the other sbAssets over their maximum weights. When redeeming for a single sbAsset, a fee will be charged.
    If a sbAsset is at maximum weight, the system enforces "multi-proportional redemption". The user will receive a proportional representation of sbAssets, and will pay a fee. This fee will be always smaller than for a single sbAsset redemption.
    This means that even in the event of a peg loss, the system protects value without requiring oracles.

Examples

The Basic Process of Minting a niAsset
Assume there exists an niAsset called nExample, which has a basket with maximum weights defined as 35% for all sbAssets. The basket is comprised of 4 underlying sbAssets (Assets A, B, C, and D).
To mint a single unit of nExample:
    Call the smart contract’s mint function;
    Supply a quantity of sbAsset (here, 100 of Asset A).
The smart contract will validate that accepting 100 of Asset A will not push the total quantity of Asset A past its predefined maximum weight of 35%.
Asset A is then transferred from the senders’ address. If the transfer is successful, the smart contract would in turn mint 100 units of nExample to the specified recipient.
The user is therefore exchanging their asset for a niAsset of equal or very similar value.
The Basic Process of Redeeming a niAsset
Continuing with nExample, which as before has 4 sbAssets and maximum weights defined as 35% across them all.
To redeem 1000 nExample for 1000 of the underlying sbAsset D:
    Call the redeem function on the nExample smart contract;
    Specify that 1000 of Asset D is desired as the redemption asset.
A redemption is only valid if:
    It does not cause any sbAsset to rise above its max weighting.
    There are a sufficient number Asset D to pay out.
If the redemption is deemed valid, the contract retrieves 1000 nExample, which is burned, and the sender is credited with 1000 Asset D.
The fee for this single sbAsset redemption is equal to the swap fee.
Forging at maximum weights
In the event of one or more of nExample's sbAssets being at maximum weight, minting and redemption options are modified. As before, there are 4 sbAssets and maximum weights defined as 35% across them all. In this example, sbAssets are at the following weights:
    Asset A - 35%
    Asset B - 30%
    Asset C - 30%
    Asset D - 5%
As Asset A is at its maximum weight, users cannot redeem any of the other assets individually (as this would push Asset A proportionally over 35% of the basket). For the same reason, they cannot mint with Asset A. In this scenario, "multi" minting and redemption are now enforced.
To redeem 100 nExample from the basket:
    Call the multi redeem function on the nExample smart contract;
    Specify that 100 of nExample is to be redeemed.
    Receive 35 units of Asset A, 30 units of Assets B & C, and 5 units of Asset D.
The Forging process will be analogous for nGLD, nEUR, nBTC, nETH, and so on.
Last modified 8mo ago