[PRC #6] Disable unused contract versions

TL;DR

Disable old v1.1, v1.2, and v1.2.2 PWN contracts.

Voting

Mode: Stewards
Duration: 5 days
Veto threshold: 10%

Proposal

This proposal removes tags of old loan and proposal contracts, v1.1, v1.2, and v1.2.2, turning off a new loan creation. Existing loans are unaffected and can still call repay and claim functions on the loan contracts. v1.3 will become the only supported version.

On-chain actions

  1. Schedule actions on Protocol timelock with 0 delay that calls PWNHub function setTags(address[],bytes32[],bool) that will remove
    – ACTIVE_LOAN tag from PWNSimpleLoan v1.1
    – NONCE_MANAGER tag from PWNSimpleLoan v1.2
    – ACTIVE_LOAN and NONCE_MANAGER tags from PWNSimpleLoan v1.2.2
    – LOAN_PROPOSAL and NONCE_MANAGER tags from PWNSimpleLoanSimpleProposal v1.2
    – LOAN_PROPOSAL and NONCE_MANAGER tags from PWNSimpleLoanListProposal v1.2
    – LOAN_PROPOSAL and NONCE_MANAGER tags from PWNSimpleLoanFungibleProposal v1.0
    – LOAN_PROPOSAL and NONCE_MANAGER tags from PWNSimpleLoanDutchAuctionProposal v1.0
    – SIMPLE_LOAN_TERMS_FACTORY and PWN_LOAN_OFFER tags from PWNSimpleLoanSimpleOffer v1.1
    – SIMPLE_LOAN_TERMS_FACTORY and PWN_LOAN_OFFER tags from PWNSimpleLoanListOffer v1.1
    – SIMPLE_LOAN_TERMS_FACTORY and PWN_LOAN_REQUEST tags from PWNSimpleLoanSimpleRequest v1.1
  2. Execute scheduled timelock actions

Contract addresses

  • Protocol timelock: 0xd8dbdDf1c0FDdf9b5eCFA5C067C38DB66739FBAB
  • PWNHub: 0x37807A2F031b3B44081F4b21500E5D70EbaDAdd5
  • PWNSimpleLoan v1.1: 0x57c88D78f6D08b5c88b4A3b7BbB0C1AA34c3280A
  • PWNSimpleLoan v1.2: 0x9A93AE395F09C6F350E3306aec592763c517072e
  • PWNSimpleLoan v1.2.2: 0x0773d5F2f7b3264a9Eb285F085aCCcC53d5aAa4F
  • PWNSimpleLoanSimpleProposal v1.2: 0xEb3e6B9B51911175F3a121b5Efb46Fa354520f41
  • PWNSimpleLoanListProposal v1.2: 0x0E6cE603d328de0D357D624F10f3f448855fFBDC
  • PWNSimpleLoanFungibleProposal v1.0: 0x0618504Fa17888ec36AC5D46A4A0Ed59436Fb77E
  • PWNSimpleLoanDutchAuctionProposal v1.0: 0x807eb2A61B2d0193b0696436BeFFcFE4d6D520CB
  • PWNSimpleLoanSimpleOffer v1.1: 0x5E551f09b8d1353075A1FF3B484Ee688aCAc02F6
  • PWNSimpleLoanListOffer v1.1: 0xDA027058708961Be3676daEB68Fde1758B210065
  • PWNSimpleLoanSimpleRequest v1.1: 0x9Cb87eC6448299aBc326F32d60E191Ef32Ab225D

PWNHub tag values

  • ACTIVE_LOAN: 0x9e56ea094d7a53440eef11fa42b63159fbf703b4ee579494a6ae85afc5603594
  • LOAN_PROPOSAL: 0xc0ba7a416221f318a8087fd62f9ff407488b7f5501e79caf9b0666c2df326b9c
  • NONCE_MANAGER: 0xe41b33e4d1c538d376dd219215a123562fbb87b8c85fa2aa4ebbd8810c2454d9
  • SIMPLE_LOAN_TERMS_FACTORY: 0xad7661817597136ce476ebc3173f62ce62c618f21c1809bd506e6dee26b217be
  • PWN_LOAN_OFFER: 0xe28f844deb305d6f42bccd9495572366ffc5df5d7ae8aca8b455248373c4ecfb
  • PWN_LOAN_REQUEST: 0xcc3e8039ebc82cf2dfc85f5e6f3b220fb59b5b4077418e8b935c7113f42bd229
7 Likes

Do you see it as a good practice we could establish? I mean periodically deprecating old contract versions on the protocol level?

1 Like

I would say yes. If there is a team using the older versions, we can change the practice.

Just out of curiosity - is there any issue / does it complicate something when we would keep the older versions enabled?

I see keeping anything we don’t need in the protocol as increasing the surface for a potential exploit.

8 Likes

I feel like we should not disable anything that was deployed previously and at some point in time was usable. Except maybe if there was a nasty vulnerability or something.

Because the nature of on-chain deployments is opening the expectation of “immutability” and “permanency”.

Say 15 years go by, lots can change in that time and someone would want to use the dapp - maybe even from some self-sovereign frontend.

If there wasn’t at least some newest version of contracts available, it wouldn’t be possible. And it would fail the promise of on-chain.

1 Like

I am aligned with the “permanency”, but we are not disabling any loan or proposal type, only older versions of already existing ones. We are leaving the newest version of contracts available, which is v1.3.

Here is a list of currently used contracts (not full, only those relevant to this proposal). You can check that to every disabled contract there is an active with higher version:

  • PWNSimpleLoan v1.3: 0x719A69d0dc67bd3Aa7648D4694081B3c87952797
  • PWNSimpleLoanSimpleProposal v1.3: 0xe624E7D33baC728bE2bdB606Da0018B6E05A84D9
  • PWNSimpleLoanListProposal v1.3: 0x7160Ec33788Df9AFb8AAEe777e7Ae21151B51eDd
  • PWNSimpleLoanElasticProposal v1.1: 0xeC6390D4B22FFfD22E5C5FDB56DaF653C3Cd0626 (renamed, was Fungible Proposal before)
  • PWNSimpleLoanDutchAuctionProposal v1.1: 0x1b1394F436cAeaE139131E9bca6f5d5A2A7e1369
  • PWNSimpleLoanElasticChainlinkProposal v1.0: 0xBA58E16BE93dAdcBB74a194bDfD9E5933b24016B

PRC#6 is now active Stewards DAO proposal.

2 Likes