Skip to content

Design a way for adapters to decouple automatic deposits and withdrawals #387

@p-offtermatt

Description

@p-offtermatt

We want to be able to support a few more usecases with adapters:

  • We want to remove our position in an adapter -> we could disable automatic deposits, and still have automatic withdrawals enabled
  • we want to reduce our position in an adapter to not exceed a certain maximum -> only automatically deposit when we are below that number, and prioritize withdrawals from the adapter otherwise

I propose that for each adapter, add a max allocation number (uint128).

  • If an adapter has funds above the max allocation, NO NEW FUNDS are put into the adapter.
  • if an adapter has funds available to withdraw and is above the max allocation, no funds will be withdrawn automatically from adapters that are below their max allocation (and instead only from ones above the max allocation)

The max allocation can be set manually by the control center admin for each adapter.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions