Lended NEPRI Token (lNEP)
Last updated
Was this helpful?
Last updated
Was this helpful?
lNEP tokens are lAssets built for the NEPRI Finance platform, their value backed by underlying NEP delegations. lNEP tokens follows full compliance with the , SPL standard, BEP-20 standard having the potential to be integrated into a wide variety of decentralized finance applications.
The lNEP exchange rate is the rate of conversion used when lNEP is minted or redeemed. Defined as the amount of lended NEP per lNEP in existence, the value initially starts with 1, and decreases with slashing events.
lNEP tokens equally share all losses from slashing events of whitelisted validators. Slashing events decrease the l exchange rate, lowering the calculated value of a lNEP token.
The protocol will apply a fee of 0.5% to lNEP mints and burns whenever the exchange rate is below 1, targeting a gradual recovery to a one-to-one peg.
The lNEP contract will keep a whitelist of validators, only permitting delegations to those included in the whitelist. This is crucial since all lNEP tokens will equally share slashing risks, and delegations to low-performing validators could negatively affect all holders.
Validators that have proven their operational capabilities are eligible for whitelisting. Track records such as uptime and community support are factors of consideration.
Underperforming validators are deregistered from the whitelist, disallowing lNEP minters from making new delegations to them. Following deregistration, the lNEP contract automatically redelegates existing delegations to a different, randomly selected validator.
The NEPRI Finance platform will permanently disable validator addresses that have double signed a block (i.e. tombstoned). Tombstoned validators are also deregistered, with their remaining delegations redelegated. The new address of the tombstoned validator can later be re-registered to the whitelist if necessary.
The lNEP contract processes NEP undelegations in batches, creating them in epochs of 5 days. Whenever an undelegation is done, an entry storing its information is created:
batch_id
: incrementally-increasing unique identifier of the undelegation batch
amount
: total amount of fee deducted lNEP unbonded in this batch
time
: time of batch undelegation
withdraw_rate
: rate applied when later withdrawing undelegated NEP from this batch
released
: indicator on whether the unbonding period is over for this batch
When a batch is undelegated, withdraw_rate
is stored as the lNEP exchange rate at the time of undelegation, and released
is stored as false
.
Later when users withdraw undelegated NEP, the contract first checks for newly undelegated batches by comparing the current time with the time
of recent batches. Batches that are older than 18 days are considered undelegated, and are marked by updating released
as true
.
The withdraw_rate
, which determines the amount of NEP withdrawable per unbonded lNEP, is also updated to account for slashing events that happened during batch undelegation. The amount of slashed NEP, calculated by comparing the NEP amount initially undelegated and the NEP amount actually received, is deducted pro-rata from the newly undelegated batches by updating the corresponding withdraw_rate
to the new decreased value.
lNEP tokens are minted by delegating NEP via the lNEP contract. Users will be required to specify a validator to delegate, selected among the list of whitelisted validators. The amount of lNEP they receive is dependent on the current lNEP exchange rate -- minted lNEP amounts will be greater than the NEP amount sent when the lNEP exchange rate is below 1.
Slashing occurrences between the time of request and withdrawal may affect the final amount later withdrawn.
Any lNEP holder can redeem their tokens for their underlying lended NEP. Redemption is a two-step process; 1) requesting to unbond lNEP (undelegates underlying NEP) and 2) withdrawing undelegated NEP.
Due to the NEPRI Finance's unbonding period, a complete redemption cycle requires at least 18 days to finish.
A lNEP unbond request triggers the undelegation its underlying staked NEP. To track the NEP amount later withdrawable by each user, a waitlist entry with the the below information is created:
address
: address of lNEP unbond requester
batch_id
: ID of the batch that includes the user's undelegation request
amount
: amount of fee deducted lNEP unbonded by user
To disallow any holder from manipulating the lNEP contract's delegations by constant minting and redeeming, undelegations are performed from a randomly selected validator.
Users that previously made a request to unbond lNEP can later withdraw the undelegated NEP tokens. The amount of NEP that the user can withdraw from an undelegation batch is calculated by multiplying the amount in the user's waitlist with the batch's withdraw_rate
. Summation of this value for batches that are past the unbonding period (released
marked as true
) yields the user's total withdrawable amount.
lNEP tokens accrue nYUSD rewards, generated from delegation rewards of underlying NEP delegations. Delegation rewards, collected in various native token denominations (nYUSD, NEP, etc.), are swapped for nYUSD. Swapped nYUSD is then distributed pro-rata to lNEP holders.
Holders can send a request to the lNEP contract, which prompts the transfer of accrued rewards to their account. As rewards accrue during the user's period of ownership, transferring lNEP to a different user automatically credits accrued rewards to the previous holder.
The user's request is added to the current , which is undelegated in epochs of 3 days. If 3 days have past since the previous batch was undelegated, the current batch, along with the user's request is undelegated.