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
ProductService reverts if product is not ACTIVE -> in case of depeg product, owner can pause() right after depeg event, wait for CLAIM_GRACE_PERIOD to expire then unpause() and close all policies / release all collateral without experiencing any claim. Of course owner can just stop processing claims but in this case collateral will remain locked (or just decline all claims).
function processPayout(bytes32processId, uint256amount)
externaloverride
onlyPolicyFlow("Pool")
onlyActivePoolForProcess(processId)
PoolController::processPayout() reverts if risk pool is not ACTIVE -> risk pool owner can pause it to prevent payouts and collateral release.
For paused component, GIF MUST NOT revert when working with already existing "policy flows", only prevent creation of new one.
For example, at first glance: ProductService must revert on newApplication(), underwrite(), but continue to decline(), revoke(), collectPremium(), adjustSumInsured(), expire(), close(), newClaim(), confirmClaim(), declineClaim(), closeClaim(), newPayout(), processPayout().
suspend() is more tricky if we assume that instance operator must have an option to stop operations in case of code malfunction.
The text was updated successfully, but these errors were encountered:
rapidddenis
changed the title
Component suspend() and pause() prevents component from completing its responsibilities after premiums being paidsuspend() and pause() prevents component from completing its responsibilities after premiums being paid
Jun 9, 2023
Similar situation with RiskpoolService:
When risk pool is paused then revert on createBundle(), fundBundle(), collateralisePolicy() but continue to defundBundle() (Capital provider can withdraw not locked funds at any time except after suspend()), processPremium(), releasePolicy(), processPayout()
In release 2.0.0-rc1:
gif-contracts/contracts/services/ProductService.sol
Lines 20 to 28 in b58fd27
ProductService reverts if product is not
ACTIVE
-> in case of depeg product, owner canpause()
right after depeg event, wait forCLAIM_GRACE_PERIOD
to expire thenunpause()
and close all policies / release all collateral without experiencing any claim. Of course owner can just stop processing claims but in this case collateral will remain locked (or just decline all claims).In develop:
gif-contracts/contracts/modules/PoolController.sol
Lines 248 to 251 in d698b26
PoolController::processPayout()
reverts if risk pool is notACTIVE
-> risk pool owner can pause it to prevent payouts and collateral release.For paused component, GIF MUST NOT revert when working with already existing "policy flows", only prevent creation of new one.
For example, at first glance:
ProductService
must revert onnewApplication()
,underwrite()
, but continue todecline()
,revoke()
,collectPremium()
,adjustSumInsured()
,expire()
,close()
,newClaim()
,confirmClaim()
,declineClaim()
,closeClaim()
,newPayout()
,processPayout()
.suspend()
is more tricky if we assume that instance operator must have an option to stop operations in case of code malfunction.The text was updated successfully, but these errors were encountered: