IInsurance
The IInsurance interface makes it easy for developers to build custom support for any insurnace token protocol.
All insurance adapters must inherit from and adhere to the IInsurance
interface.
buyInsurance
buyInsurance
Purchases the insurance tokens with the underlying token (e.g., DAI)
parameter:
amount
, the amount of underlying tokens used to buy insurancereturns: the amount of insurance tokens received
sellInsurance
sellInsurance
Sells the insurance tokens in return for the underlying token (e.g., DAI)
parameter:
amount
, the amount of insurance tokens that will be sold for the underlying tokenreturns: the amount of underling tokens received following the sale
getCostOfInsurance
getCostOfInsurance
Calculates the cost of premiums to be paid in order to obtain coverage
parameter:
amount
, the amount of insurance tokens for which the cost of premiums is determinedreturns: the amount of the underling tokens needed to pay for the
amount
of insurance tokens provided
isActive
isActive
Checks the expiration status of the insurance token
returns: Returns true if insurance token has NOT expired
Last updated