ARC-74: Upgrade All Generator Contracts to Mitigate Rewards Accounting Issue

Summary

This proposal aims to upgrade all active Astroport Generator contracts in order to mitigate a potential ASTRO rewards related issue that might arise in the future.

Abstract

The current version of the Astroport Generator code allows anyone to stake LP tokens for pools that never received any rewards. This can pose a problem in case any of these staked LP tokens start to receive rewards in the future: the Generator will miscalculate the amount of rewards that these pre-staked LP tokens should receive and can cause the tokens to remain stuck in the contract.

This proposal aims to solve this issue by upgrading the Generators on Terra, Neutron and Injective so that they can correctly handle rewards accounting for pre-staked LP tokens.

Executable Message

The executable message that upgrades the Neutron mainnet Generator looks as follows:

[
  {
    "wasm": {
      "migrate": {
        "contract_addr": "neutron1jz58yjay8uq8zkfw95ngyv3m2wfs2zjef9vdz75d9pa46fdtxc5sxtafny",
        "new_code_id": 123,
        "msg": "e30="
      }
    }
  }
]

The executable message that upgrades the Terra mainnet Generator looks as follows:

[
  {
    "wasm": {
      "migrate": {
        "contract_addr": "terra1ksvlfex49desf4c452j6dewdjs6c48nafemetuwjyj6yexd7x3wqvwa7j9",
        "new_code_id": 1715,
        "msg": "e30="
      }
    }
  }
]

The executable message that upgrades the Injective mainnet Generator looks as follows:

[
  {
    "wasm": {
      "migrate": {
        "contract_addr": "inj1z354nkau8f0dukgwctq9mladvdwu6zcj8k4928",
        "new_code_id": 68,
        "msg": "e30="
      }
    }
  }
]

Copyright

Copyright and related rights waived via CC0.

4 Likes

With the upcoming launch on Sei mainnet, this proposal should be amended to include the Astroport Generator on Sei as well.

The executable message that updates the Astroport Generator on Sei looks as follows:

[
  {
    "wasm": {
      "migrate": {
        "contract_addr": "sei13hwj6afyxgue26f966hd5jkcvvjeruv7f9cdtd5d9mrtyrnn73ysp04nt4",
        "new_code_id": 45,
        "msg": "e30="
      }
    }
  }
]
1 Like

HTMLPreformatted text