Core Contracts

The core contracts are a collection of open source smart contracts that implement essential insurance product and policy lifecycle functions. This enables the modeling of a wide range of insurance types.

The core contracts provide the generic functions for all sub-steps in the lifecycle of an insurance policy and thus enable an automated workflow.

Core smart contracts are deployed and operated by an instance operator - a DAO or other legal entity. The instance operator publishes entry points to its instance of the GIF and registers actors.

For a concise overview of the basic concepts see here:

Organization

The core contracts are organized in folders in the gif-contracts repo:

/contracts
├── /flows
├── /modules
├── /services
├── /shared
└── /tokens

Contracts

Flows

Flows encapsulate the business logic which controls the life cycle of an insurance product. Currently we offer a very generic default flow (PolicyDefaultFlow) which typically suits most products with a fixed policy period. Special flows could be created for revolving policies, or policies without a fixed end date.

A policy flow guarantees the overall consistency of all data objects during the lifecycle of a process and maintains all state transistions.

PolicyDefaultFlow.sol

The default policy flow implements a standard policy lifecycle with application, underwriting, decline, expire, revoke functionality.

Modules

Modules encapsulate the functionality which operates on a certain data object. Each module guarantees the internal consistency and validity of its data objects. Modules are not accessible from the outside. They are only accessed via service contracts.

All contracts whose name ends in ...Controller.sol will be renamed in ...Module.sol in the next release.

AccessController.sol

t.b.d.

BundleController.sol

t.b.d.

ComponentController.sol

t.b.d.

LicenseController.sol

t.b.d.

PolicyController.sol

t.b.d.

PoolController.sol

t.b.d.

QueryModule.sol

t.b.d.

RegistryController.sol

t.b.d.

TreasuryModule.sol

t.b.d.

Services

Services provide defined access points by which the data objects can be manipulated in a controlled way.

ComponentOwnerService.sol

t.b.d.

InstanceOperatorService.sol

t.b.d.

InstanceService.sol

t.b.d.

OracleService.sol

t.b.d.

ProductService.sol

t.b.d.

RiskpoolService.sol

t.b.d.

Tokens

Tokens are used to represent ownership of investments in risk pools. The use of tokens allows the permissionless transfer of ownership.

BundleToken.sol

t.b.d.

RiskpoolToken.sol

t.b.d.

Shared

The following contracts provide some helper functionality or act as base classes, from which other contracts are derived.

CoreController.sol

t.b.d.

CoreProxy.sol

t.b.d.

TransferHelper.sol

t.b.d.

WithRegistry.sol

t.b.d.