protocol-core icon indicating copy to clipboard operation
protocol-core copied to clipboard

[Adapter Module]: Implement Collateral Token Adapter

Open njokuScript opened this issue 1 year ago • 0 comments

Description

Create a token adapter contract that facilitates the movement of collateral tokens in and out of the system. The adapter should interact directly with the Vault Engine Contracts to manage collateral balances on vaults.

Tasks

  • [ ] Design the collateral token adapter contract interface
  • [ ] Implement method for depositing and locking collateral tokens within the adapter. The locked collateral should be represented in the Vault module
  • [ ] Implement method for withdrawing locked collateral tokens from the adapter
  • [ ] Integrate the adapter with the Vault Module Contracts. The adapter should call the Vault module to create a representation of the collateral tokens and also remove the representation as needed.
  • [ ] Write tests to ensure the functionality of the collateral token adapter

NB: This has previously been implemented here: https://github.com/Descent-Collective/protocol-core/blob/module/adapter/contracts/adapter.sol#L13

njokuScript avatar Mar 15 '24 18:03 njokuScript