Comment on page
PremiumEngine
Premium calculator contract of Insure protocol
function getPremiumRate(uint256 coverAmount, uint256 totalLiquidity, uint256 lockedAmount) public pure returns (uint256)
Calculates the yearly premium rate.
Call Params
Name | Type | Description |
---|---|---|
coverAmount | uint256 | The cover amount of the policy |
totalLiquidity | uint256 | The liquidity inside risk pool |
lockedAmount | uint256 | The amount locked for all the active policies |
Return Value
Type | Description |
---|---|
uint256 | Yearly premium rate |
function getPremium(uint256 coverAmount, uint256 duration, uint256 totalLiquidity, uint256 lockedAmount) external pure returns (uint256)
Calculates premium to be paid to buy insurance
Call Params
Name | Type | Description |
---|---|---|
coverAmount | uint256 | The cover amount of the policy |
duration | uint256 | The duration of the policy |
totalLiquidity | uint256 | The liquidity inside risk pool |
lockedAmount | uint256 | The amount locked for all the active policies |
Return Value
Type | Description |
---|---|
uint256 | Premium to be paid |
Last modified 1yr ago