osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

Allow Governance module permission to move CL positions from Community Pool

Open JohnnyWyles opened this issue 1 year ago • 0 comments

Background

Liquidity positions transferred to the community pool by transferring the position to osmo1jv65s3grqf6v6jl3dp4t6c9t9rk99cd80yhvld are unable to be recovered by governance for later adjustment.

Using a proposal to transfer from the community pool to an alternative address:

{
 "messages": [
  {
   "@type": "/osmosis.concentratedliquidity.v1beta1.MsgTransferPositions",
   "position_ids": ["870"],
   "sender": "osmo1jv65s3grqf6v6jl3dp4t6c9t9rk99cd80yhvld",
   "new_owner": "osmo19mywfjzj324w5ukf7ss6jak0dg9hnljfp0rfx4"
  }
 ],
 "metadata": "Not Used",
 "deposit": "500000000uosmo",
 "title": "Test",
 "summary": "Test",
 "expedited": false
}

Returns

Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: osmo1jv65s3grqf6v6jl3dp4t6c9t9rk99cd80yhvld: expected gov account as only signer for proposal message [cosmos/[email protected]/x/gov/keeper/proposal.go:54] With gas wanted: '300000000' and gas used: '57470' : unknown request

Using the gov account (osmo10d07y265gmmuvt4z0w9aw880jnsr700jjeq4qp) as the signer successfully loads the proposal to chain, but fails on completion: https://testnet.mintscan.io/osmosis-testnet/proposals/138

Suggested Design

Similar to how the MsgCommunityPoolSpend message differs from the MsgSend message, in which there is an authority account rather than the direct owner.

"messages": [
  {
   "@type": "/osmosis.concentratedliquidity.v1beta1.MsgTransferCommunityPositions",
   "position_ids": ["870"],
   "authority": "osmo10d07y265gmmuvt4z0w9aw880jnsr700jjeq4qp",
   "new_owner": "osmo19mywfjzj324w5ukf7ss6jak0dg9hnljfp0rfx4"
  }
 ]

Acceptance Criteria

Governance Proposals can move position IDs from a module address that it has authority over, to a designated address.

JohnnyWyles avatar Jan 17 '24 11:01 JohnnyWyles