Cover Provision

The governance portal enables DAO members to provision NEP tokens as Liquidity Pool Support for any given cover. We believe this will foster community participation and will also incentivize liquidity providers. The NEP provision acts as a defense mechanism during cover incidents. Along with the NEP provisions, the liquidity providers also have Cover Assurance Support for a rainy day.

Increase Provision

/**
* This feature is only accessible to Neptune Mutual Governance Contract
* or administrator
*/
import { ChainId, provision } from '@neptunemutual/sdk'
import { info } from './info.js'
import { getProvider } from './provider.js'
import { ether, weiAsNep } from './bn.js'
const increase = async () => {
const { key, coverName } = info
const provider = getProvider()
const amount = ether(25_000)
let response = await provision.get(ChainId.Mumbai, key, provider)
console.info('[%s Provision] Before: %s', coverName, weiAsNep(response.result))
await provision.approve(ChainId.Mumbai, { amount }, provider)
response = await provision.increase(ChainId.Mumbai, key, amount, provider)
console.info(response)
await response.result.wait()
response = await provision.get(ChainId.Mumbai, key, provider)
console.info('[%s Provision] After: %s', coverName, weiAsNep(response.result))
}
increase()
/*****************************************************************************
[info] [Compound Finance Cover Provision] Before: 0.00 NEP
[info] {
status: 'Success',
result: {
nonce: 1,
gasPrice: BigNumber { _hex: '0x06fc23ac00', _isBigNumber: true },
gasLimit: BigNumber { _hex: '0x026b49', _isBigNumber: true },
to: '0xD52F2321D0713071843546b503E8137Ed4Bb3795',
value: BigNumber { _hex: '0x00', _isBigNumber: true },
data: '0xb7d3571e70726f746f3a636f6e7472616374733a636f7665723a6366633a30310000000200000000000000000000000000000000000000000000054b40b1f852bda00000',
chainId: 80001,
v: 160037,
r: '0x42004ddaf03e90acdfae56b0d689fa4be6f40838cde52dd3ba9123d079f80c3f',
s: '0x401f146aa19d3b456ed307bea062f7a0a7bedc4c97a9408d33a2ce2bc324c643',
from: '0xA3dEE71417e31C0A09F33690cA55052018041a94',
hash: '0xb131465bbbc54bbad85b2e0fc76782b00de01e856aca8461113cd1fe937f5183',
type: null,
wait: [Function (anonymous)]
}
}
[info] [Compound Finance Cover Provision] After: 25,000.00 NEP
*****************************************************************************/

Get Provision

import { ChainId, provision } from '@neptunemutual/sdk'
import { info } from './info.js'
import { weiAsNep } from './bn.js'
const get = async () => {
const { key, coverName } = info
const response = await provision.get(ChainId.Mumbai, key)
console.info('[%s Provision] %s', coverName, weiAsNep(response.result))
}
get()
/*****************************************************************************
[info] [Compound Finance Cover Provision] 25,000.00 NEP
*****************************************************************************/

Decrease Provision

/**
* This feature is only accessible to Neptune Mutual Governance Contract
* or administrator
*/
import { ChainId, provision } from '@neptunemutual/sdk'
import { info } from './info.js'
import { getProvider } from './provider.js'
import { ether, weiAsNep } from './bn.js'
const decrease = async () => {
const { key, coverName } = info
const provider = getProvider()
const amount = ether(200)
let response = await provision.get(ChainId.Mumbai, key)
console.info('[%s Provision] Before: %s', coverName, weiAsNep(response.result))
response = await provision.decrease(ChainId.Mumbai, key, amount, provider)
console.info(response)
// Wait for the transaction to get included in a block
await response.result.wait()
response = await provision.get(ChainId.Mumbai, key)
console.info('[%s Provision] After: %s', coverName, weiAsNep(response.result))
}
decrease()
/*****************************************************************************
[info] [Compound Finance Cover Provision] Before: 25,000.00 NEP
[info] {
status: 'Success',
result: {
nonce: 1,
gasPrice: BigNumber { _hex: '0x06fc23ac00', _isBigNumber: true },
gasLimit: BigNumber { _hex: '0x020729', _isBigNumber: true },
to: '0xD52F2321D0713071843546b503E8137Ed4Bb3795',
value: BigNumber { _hex: '0x00', _isBigNumber: true },
data: '0x735b702870726f746f3a636f6e7472616374733a636f7665723a6366633a3031000000020000000000000000000000000000000000000000000000056bc75e2d63100000',
chainId: 80001,
v: 160038,
r: '0x0fec5d669550f8d17ccdc91f0ea007acf8676c4694e3ee5e12f2182d7d486f89',
s: '0x0c1d628090f07fd916427caa871d5a96ced32f06577ccf65c25f2a7c7c487442',
from: '0xA3dEE71417e31C0A09F33690cA55052018041a94',
hash: '0xe5cf70fa61656b602f15c074551ae08b0dcad20adadaf2700a565439efd40832',
type: null,
wait: [Function (anonymous)]
}
}
[info] [Compound Finance Cover Provision] After: 24,800.00 NEP
*****************************************************************************/