OriginProtocol / OriginProtocol/origin-dollar

Support deprecation of a single asset from strategies

Open
#301 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contracts enhancement P1
Dominant language
Solidity
Stars
152
Forks
115
Avg merge
3d 20h
Merged PRs (30d)
17

Description

If we could transfer a single asset out of a strategy and remove support for it future migrations of funds will become simpler. Right now to do this we need to liquidate the strategy, redeploy a new one with the assets we want it to support, remove the old one from vault, add the new one, and call allocate again.

Ideally:

  • A new function like liquidate that takes a single asset, i.e. liquidate(address _asset)
  • A deprecateAsset(address _asset) that calls that liquidate method and removes from assetsMapped (there is complexity here around removing from an array) and updates the assetToPToken mapping.
  • This whole setup should not allow a deprecateAsset call when there is only a single asset.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the strategy's existing liquidation flow and all uses of assetsMapped and assetToPToken. Confirm how a single asset can be liquidated and removed safely, and ensure deprecating the only supported asset is rejected; done means the requested migration path works without redeploying the strategy.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.