ARC-37: Update Deployed Stableswaps to Latest Pool Version

Summary

Upgrade fifteen stableswap pools to the latest version of the stableswap pool code that is used in production.

Abstract

There are fifteen stableswap pools on Terra 2 mainnet that have code ID 72. The stableswap code ID has been updated to 428 in the Astroport factory contract and as a result, these pools (which were deployed prior to the change in the factory) should be upgraded in order to have the same functionality like any other upcoming stableswaps. The complete list of pools that need to be upgraded looks as follows:

[
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1mpj7j25fw5a0q5vfasvsvdp6xytaqxh006lh6f5zpwxvadem9hwsy6m508"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1ygn5h8v8rm0v8y57j3mtu3mjr2ywu9utj6jch6e0ys2fc2pkyddqekwrew"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1cr8dg06sh343hh4xzn3gxd3ayetsjtet7q5gp4kfrewul2kql8sqvhaey4"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1vzxatdcx3msz0lpvl7anu8raarhhyenjhnrnpdhvsnhhx7dew9ms0hdaz9"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra19kaa5azm3tw6a2yd2p0chvfznt6rathpf0qy2twm5mgwrg0wrf8sletgyv"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra13aaxn6ekd9fhz9lwrnfqx3ywk4w4eryurmuytdlhwfgp804qjkjst95kej"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra16v9vyplltvc52qrr5xxyw5c20tswtfvpc0wgmfv9n3ew6hd4afsqy3k8ym"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1faheydctjeq59qnwcw9yfs6qth5dntfugppm2we5ayud38er9eyqq0sesk"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1dythudkvns73g2sx3qqehkkug2hhcs26cpx5q4wjmuh88qhw0dus4rmxvd"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1sxdrn5efjuf3z2lzuwnew839zus4lm2dndwzw589t0kzku6kmhnsuhsxq3"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra10w06e42fg2sre2quy24hv5l93djp3lrp80fu0n8k336r90vszddspfn7vx"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1c7uyg2lq70awrm2thf2cfza0xz6e8g6v4eta7xscuupyh0f77zdqtkvwc8"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1c0k8gjgdwrqz9sfv5tdn2ympfn36zfd4uzjc9f7kxks7ayvu7yps9mvdwx"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1tjgl3ym6qqwcq0vphz5aem2usxs5wpt44wkymxh93mcp9fh8ph8qkldnfx"
  },
  {
    "type": "stable",
    "codeId": 72,
    "address": "terra1q0799zjacryduxw5hcxwaqc6jf3ls604afvm7gqjpvultvm88d4qhyhss8"
  }
]

Motivation

Ensure all stableswap pools deployed on Astroport behave the same.

Security Considerations

The main risk associated with this proposal is that the fifteen stableswap pools are mistakenly upgraded to a version of the code that makes liquidity withdrawal and/or swapping impossible. In this scenario, a subsequent proposal will be needed to remediate the issue.

Governance Action

The executable message for this proposal looks as follows:

[
  {
    "order": "1",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1mpj7j25fw5a0q5vfasvsvdp6xytaqxh006lh6f5zpwxvadem9hwsy6m508",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "2",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1ygn5h8v8rm0v8y57j3mtu3mjr2ywu9utj6jch6e0ys2fc2pkyddqekwrew",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "3",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1cr8dg06sh343hh4xzn3gxd3ayetsjtet7q5gp4kfrewul2kql8sqvhaey4",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "4",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1vzxatdcx3msz0lpvl7anu8raarhhyenjhnrnpdhvsnhhx7dew9ms0hdaz9",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "5",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra19kaa5azm3tw6a2yd2p0chvfznt6rathpf0qy2twm5mgwrg0wrf8sletgyv",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "6",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra13aaxn6ekd9fhz9lwrnfqx3ywk4w4eryurmuytdlhwfgp804qjkjst95kej",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "7",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra16v9vyplltvc52qrr5xxyw5c20tswtfvpc0wgmfv9n3ew6hd4afsqy3k8ym",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "8",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1faheydctjeq59qnwcw9yfs6qth5dntfugppm2we5ayud38er9eyqq0sesk",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "9",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1dythudkvns73g2sx3qqehkkug2hhcs26cpx5q4wjmuh88qhw0dus4rmxvd",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "10",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1sxdrn5efjuf3z2lzuwnew839zus4lm2dndwzw589t0kzku6kmhnsuhsxq3",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "11",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra10w06e42fg2sre2quy24hv5l93djp3lrp80fu0n8k336r90vszddspfn7vx",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "12",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1c7uyg2lq70awrm2thf2cfza0xz6e8g6v4eta7xscuupyh0f77zdqtkvwc8",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "13",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1c0k8gjgdwrqz9sfv5tdn2ympfn36zfd4uzjc9f7kxks7ayvu7yps9mvdwx",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "14",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1tjgl3ym6qqwcq0vphz5aem2usxs5wpt44wkymxh93mcp9fh8ph8qkldnfx",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  },
  {
    "order": "15",
    "msg": {
      "wasm": {
        "migrate": {
          "contract_addr": "terra1q0799zjacryduxw5hcxwaqc6jf3ls604afvm7gqjpvultvm88d4qhyhss8",
          "msg": "e30=",
          "new_code_id": 428
        }
      }
    }
  }
]

Disclaimers/Conflicts of Interest

The author is a paid service provider of Delphi Labs Ltd. Additionally, the author has a development stake of ASTRO tokens.

Thanks, @stefan . What would be the main changes after this upgrade?

What does the “astroport factory contract” do and why was the code for stableswap pools changed from 72 to 428?

The Astroport factory contract uses to create new pools.
There is the only one change to enforce a minimum amount of liquidity to always stay in a pool on next providing after the pool gets empty.