Skip to content

Simple interface for group policies #857

Description

@christoph2806

Proposal:

We need an interface to create policies with arbitrary number of beneficiaries and otherwise identical parameters.

  • In the product contract, you should be able to call applyForPolicy with a list of tuples (address, premium) which would then create a single policy but connected to a list of (address, premium) tuples.
  • For each address, the premium should be collected,
  • In case of a payout, each beneficiary receives a pro-rata amount of the payout.
  • There is only a single policy to reduce gas costs
  • It should be possible to add more beneficiaries as long as the policy is in theApplied state.
  • In case of a very large number of beneficiaries, the payout could be conducted in batches, to prevent reaching the gas limit.

Rationale:

  • This could massively reduce gas cost for the typical scenario where we have only a very small number of different risks but for each risk we have a large number of beneficiaries with otherwise identical parameters.
  • Adding more beneficiaries should be a very gas efficient process
  • Payout in batches would also reduce the gas cost per beneficiary massively.
  • For large numbers of beneficiaries, the total gas cost should converge to the gas costs of the token transfer for premium and payout.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions