You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Proposal:
We need an interface to create policies with arbitrary number of beneficiaries and otherwise identical parameters.
applyForPolicy
with a list of tuples (address, premium) which would then create a single policy but connected to a list of (address, premium) tuples.Applied
state.Rationale:
The text was updated successfully, but these errors were encountered: