Cohort

Cohort contains all the information about the participating protocols and staking pool details. It is deployed via the actuary smart contract and is the main contract from which staking process will occur.

Add Protocol

To add a protocol to the cohort the cohort owner calls the addProtocol function. This function is only accessible by the cohort's respective cohort owner.

addProtocol(string _name, 
            address _protocolAddress, 
            string _productType, 
            string _premiumDescription, 
            uint256 _coverDuration )

Input variables :

  • _name : refers to the name of the to be added protocol

  • _protocolAddress : refers to the address of the to be added protocol

  • _productType : refers to the type of the of the to be added protocol (Smart Contract vault, Insurance protocol, etc.)

  • _premiumDescription : refers to the premium pool's description of the to be added protocol

  • _coverDuration : refers to the protocol coverage duration of the to be added protocol.

Create Risk Pool

The Cohort owner calls the createRiskPool function to add risk pools. This function is only accessible by the cohort's respective cohort owner.

createRiskPool(address _factory, 
               address _currency, 
               uint256 _APR, 
               uint256 _maxSize)

Input variables :

  • _factory : refers to the smart contract which will deploy the risk pool i.e. Risk Pool address

  • _currency : refers to the to be deployed risk pool's digital asset (USDT, USDC, etc)

  • _APR : refers to the to be deployed risk pool's annual percentage rate

  • _maxSize : refers to the maximum amount which can be staked in the risk pool

Deposit Premium

Protocols will call the depositPremium function to deposit the premium share (either part or entire depending upon the agreement between the concerned parties i.e. Insurance Product Developer and Protocol) they intend to put up for the staking pool.

depositPremium(uint16 _protocolIdx, uint256 _amount)

Input variables :

  • _protocolIdx: refers to the protocol index of the protocol in the respective risk pool.

  • _amount: refers to the amount being deposit as premium

Enter In Pool

Through the enterInPool function users can stake assets in the risk pools. If the total staked capital in the pool exceeds the maximum limit set by cohort owner, no more staked would be admitted.

enterInPool(address _from, address _pool, uint256 _amount)

Input variables :

  • _from : The address which stakes asset in risk pool

  • _pool : Targeted Risk pool's address

  • _amount : Staking amount

Leave From Pool

Users can call the leaveFromPool function to receive the allocated rewards and to withdraw the remaining out of the staked assets. Users can call this function only after cohort coverage duration has passed.

leaveFromPool(address _to, address _pool)

Input variables :

  • _to: refers to the address which is exiting the pool

  • _pool : refers to the address of the risk pool the user is exiting from.

Last updated