Git Product home page Git Product logo

protocol-core's Issues

[Adapter Module]: Implement Metastable Token Adapter

Description

Create a token adapter contract that facilitates the burning and minting of metastable tokens. The adapter should interact directly with the Vault Contracts to manage metastable balances.

Tasks

  • Design the metastable token adapter contract interface
  • Implement functions for minting and burning of metastable tokens as well as representing the balance on the vault contracts
  • Integrate the adapter with the Vault Contracts
  • Write tests to ensure the functionality of the metastable token adapter

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

P

page

[Adapter Module]: Implement Token Adapter Factory

Description

Create a factory contract that allows for the creation and management of multiple token adapters. The factory should enable the addition of new token adapters as needed.

Tasks

  • Design the token adapter factory contract interface
  • Implement functions for creating and registering new token adapters
  • Maintain a registry of available token adapters
  • Provide a mechanism for retrieving the appropriate token adapter based on the token type
  • Write tests to ensure the functionality of the token adapter factory

[Adapter Module]: Implement Collateral Token Adapter

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

[Vault Module]: Refactor vault contract to only manage vault state

Description

Currently, the vault contract stores users' funds and interacts directly with the token contracts. We want to make sure that the vault is not making any external calls.

  • Vault should only be responsible for managing vault state(balances, collateralization ratio)
  • Introduce Vault IDs when creating vaults
  • Abstract out Liquidation function from Vault module

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.