Premium Pool
Last updated
Last updated
All the functions called in Cohort contract pertaining to protocols depositing premium and withdrawing funds to dispatch claims will call the respective functions mentioned below of the Premium Pool contract.
Rewards to be allocated per user from the premium pool will be allocated via the below mentioned formula
totalPremium : refers to the remaining premium in the premium pool after the cohort ends
amount : refers to the amount which the user staked in the risk pool
poolCapital : refers to the the amount which the risk pool saved during staking period
APR of Pool : refers to the Annual Percentage Rate of the pool
total APR of pools : refers to the sum of APR of all pools
When the protocol participating in the cohort deposits the premium which shall be allocated to rewards the depositPremium
function in Cohort is called which in turns calls the depositPremium
in the Premium Pool. This function can only be called via the cohort.
_protocolIdx : refers to the protocol ID of the participating protocol in the cohort.
_amount: refers to the amount of funds being deposited.
This function can only be called by the cohort contract withdrawPremium
. It is called when either the cohort life is over and the user is calling the leaveFromPool
function in the cohort contract to get his rewards or when the claim amount is below the capital amount in Premium Pool and hence the claim has to be settled from the Premium Pool capital.
Input variables :
_to : refers to the protocol address to which the funds are dispatched
_protocolIdx : refers to the protocol ID in the respective cohort
_amount: refers to the capital amount of claims being processed to the protocol.