Beta Insurance

BetaInsurance (BetaInsurance.sol)

Beta insurance token is the LP token which is the proof that the user provides liquidity for the beta insurance. Users can deposit nBUSD, which is generated from NAOS liquidity protocol Formation, and get the LP tokens.

function deposit(uint256 _amount)

Deposit synthetic asset and get the beta token according the beta token price

function withdraw(uint256 _shares)

Burn the beta Token and get back the stable coins according the price per share.

function balance()

Get the net value of the beta pool.

function getPricePerFullShare()

Get the beta token price per share.

function issue( address _NFTContract, uint256 _NFTID, uint256 _validPeriod, uint256 _insuranceAmount )

Issue an insurance policy with the valid period and insurance amount.

function setInsurancePremium( uint256 _insuranceID, uint256 _premiumCurrencyAmount, uint256 _premiumNAOSAmount )

Governance can set the premium price of the insurance.

function payPremiumByCurrency(uint256 _insuranceID, uint256 _naosAmountOutMin)

User can pay the premium by the stable coins. The paid stable coins will be automatically exchanged as NAOS tokens by the AMM protocol. These NAOS tokens can be linearly distributed to the staking pool by the function distributeNAOSToStakingPool. And the issued insurance amount will be locked in the pool.

function payPremiumByNAOS(uint256 _insuranceID)

User can pay the premium by the NAOS tokens. These NAOS tokens can be linearly distributed to the staking pool by the function distributeNAOSToStakingPool. And the issued insurance amount will be locked in the pool.

function compensate(uint256 _insuranceID, uint256 _amount)

If there is default of Alpha pool, governance can use this function to compensate for losses. The compensation amount can not exceed the issued amount.

function unlock(uint256 _insuranceID)

After the valid period is expired, the user can use this function to unlock the locked insurance amount of this insurance policy.

function distributeNAOSToStakingPool(uint256[] calldata _index)

The insurance premium can be linearly distributed to the staking pool.

Last updated