[Proposal] Deploy a Union Safety Module

Title: [Proposal] Deploy a Union Safety Module on Cozy
Date: 2024-06-09

Onchain proposal:

Proposal PR:

UIP15 - UIP15: Union Safety Module by maxweng · Pull Request #24 · unioncredit/UIPs · GitHub

Plain English Overview

The primary risk to users of defi protocols like Union is smart contract risk. The risk that a bug, design flaw or potential attack surfacing on the smart contract layer could lead to unintended loss of funds.

A safety module is a dedicated pool of funds reserved to pay out in the event of such an unexpected loss of funds. The largest and most well known safety module being the one operated by AAVE.

Cozy Finance, an insurance markets protocol, has recently developed a saftey module product(you can read about it here: https://csm-docs.cozy.finance/). And has made it available for Union DAO.

If passed this proposal will deploy a Union Safety Module that anyone can interact with and help secure the protocol by locking an Asset (80:20 UNION-wstETH BPT in this case) into the Safety Module contract.

Proposed Initial Config

Onchain Proposal

Specification

Deploying the Union Safety Module requires 3 transactions to the CozyRouter contract (0x707C39F1AaA7c8051287b3b231BccAa8CD72138f)

  1. Deploying the governance-controlled trigger contract
  2. Deploying the Safety Module
  3. Update the Safety Module metadata

Test Cases

Tests and simulations can be found here: PR

Implementation

  • Deploying the governance-controlled trigger contract by calling CozyRouter.deployOwnableTrigger(address,(string,string,string,string),bytes32)
  • Deploying the Safety Module by calling CozyRouter.deploySafetyModule(address,address,((uint256,address),(address,address,bool),(uint64,uint64,uint64)),bytes32)
  • Update the Safety Module metadata by calling CozyRouter.updateSafetyModuleMetadata(address,address,(string,string,string,string))

Additional Links:

Notice: Proposal will be deployed in the next 24hrs, make sure you delegate your tokens asap. Only delegations before a proposal is live onchain can be voted.

Proposal is live for voting: Tally | Union | UIP-015: Union Safety Module