Skip to content

A decentralized liquidity protocol designed to enhance the DeFi ecosystem supporting asset swaps, liquidity pools, and cross-chain interactions.

Notifications You must be signed in to change notification settings

josemle/Patronus_Aptos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patronus Contracts - Decentralized Liquidity Protocol

Welcome to the Patronus Contracts repository! This project is designed to provide a decentralized liquidity protocol that powers various decentralized finance (DeFi) applications. Patronus aims to bring efficient, transparent, and secure liquidity solutions to decentralized platforms, facilitating seamless asset transfers, swaps, and liquidity management.

In this repository, you'll find the smart contracts that form the backbone of the Patronus Protocol, an ecosystem aimed at improving decentralized liquidity through features like wrapped coins, oracles, and mock coins for testing.

Project Structure

The project is structured into several key components that make up the Patronus liquidity protocol:

├── README.md            # Project overview and documentation
├── deps/                 # External contracts that Patronus depends on
├── mock/                 # Mock coin for testing and development
├── oracle/               # Oracle-based solution using Switchboard
└── wcoin/                # Wrapped coin implementation

README.md: This file. It provides the introduction and essential information about the project. deps/: Contains the dependencies that Patronus Contracts rely on. These contracts may include essential functionalities like token standards, interfaces, or other core DeFi protocols. mock/: Includes a mock coin used to simulate transactions, test cases, and deployment without risking real funds. This is essential for testing and development environments. oracle/: Implements an oracle system using Switchboard, which provides real-world data to the smart contracts, enabling them to interact with external systems securely and reliably. wcoin/: Represents the wrapped coin system. It wraps a coin into a token that can be used on the platform, offering interoperability between various blockchains or tokens.

Key Features

  1. Decentralized Liquidity Patronus Contracts provide decentralized liquidity for DeFi applications, ensuring liquidity is always available for decentralized exchanges (DEXs) and liquidity pools. The decentralized nature ensures no central authority controls the liquidity flow.

  2. Wrapped Coins (Wcoin) The wrapped coin system allows assets to be wrapped on one blockchain and used across multiple platforms. This increases liquidity and facilitates smoother asset exchanges. With wrapped coins, assets are bridged from one network to another while retaining their value and utility.

  3. Oracle Integration with Switchboard The oracle contracts are based on the Switchboard platform, which provides decentralized, reliable price feeds for the system. These price feeds enable the liquidity protocol to adjust and update accordingly to external market conditions, ensuring accurate and real-time data on asset prices.

  4. Mock Coin for Testing The mock coin is a simulated token used for testing and development. It helps developers experiment with the protocol in a safe environment, conduct tests, and deploy without interacting with real tokens.

How It Works

The core of the Patronus Protocol is the interaction between the wrapped coins, the oracle, and the liquidity pools. Here's how each component functions:

Wrapped Coins (Wcoin):

The wcoin allows tokens to be transferred between chains or converted for liquidity management within the system. This process involves wrapping an asset from its native blockchain into a token that can be used by the Patronus Protocol. The wrapped coin system ensures that users can interact with assets across multiple blockchains seamlessly, without dealing with the complexity of bridging technologies directly. Oracle:

The oracle contracts fetch real-time market data (e.g., prices, asset values, etc.) from external sources. By leveraging Switchboard, a decentralized oracle network, the system ensures that the data feeding into the protocol is trustworthy and cannot be manipulated, providing a secure foundation for the liquidity protocol's operation. Liquidity Pools:

Patronus enables liquidity pools to be formed by users contributing assets, either in the form of wrapped coins or other tokens. These pools are then used for facilitating swaps or providing liquidity on decentralized exchanges. Mock Coin:

During development and testing, the mock coin allows developers to simulate real market conditions without the risks associated with dealing in live tokens. Developers can test interactions, performance, and scalability using this mock system. Installation & Setup To get started with the Patronus Contracts, follow these steps:

Prerequisites

Solidity: Knowledge of Solidity and smart contract development. Node.js: Make sure you have Node.js installed to interact with the blockchain. Truffle/Hardhat: A development environment and testing framework for blockchain applications. Metamask: A wallet to interact with the deployed contracts on your local test network or a live network. Setup Clone the repository:

git clone https://github.com/yourusername/Patronus-Contracts.git
cd Patronus-Contracts

Install dependencies: If you're using Hardhat, run:

npm install --save-dev hardhat

Deploy the contract to your local test network (Hardhat):

npx hardhat run scripts/deploy.js --network localhost

Interact with the deployed contract: Use Hardhat's console or Truffle to interact with the deployed contracts and test their functionalities.

Contributing

We encourage contributions to this project! Whether you want to submit bug fixes, new features, or improvements to the documentation, feel free to fork the repository, make your changes, and submit a pull request.

When contributing:

Follow Solidity best practices. Write meaningful unit tests for any new features. Update the documentation where applicable.

License

T#his project is licensed under the MIT License. See the LICENSE file for more details.

About

A decentralized liquidity protocol designed to enhance the DeFi ecosystem supporting asset swaps, liquidity pools, and cross-chain interactions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages