hackquest logo

PharosAgentKit

Pharos First Agent Kit with custom functions built to swap tokens and deposit in a liquidity pool and custom function.Leading Pharos to become world most auto transactional chain with it's high tps

Videos

Description

Pharos Agent Kit : Developer Tooling

NPM I PHAROSAGENT

An innovative and user-friendly software toolkit designed to make it easy for developers to build decentralized finance (DeFi) applications on the Pharos Network, a blockchain platform optimized for secure and efficient transactions. This toolkit is essentially a collection of pre-built, customizable tools (referred to as "agent tools") that allow developers to interact with a set of smart contracts—self-executing programs on the blockchain—without needing to deal with the complex details of blockchain programming. By packaging these tools into a simple-to-use NPM package (a library you can install with the command npm i pharosagent), the Pharos Agent Kit enables developers to integrate advanced financial features into their applications quickly and with minimal hassle.
Npm Package link
https://www.npmjs.com/package/pharosagent

What Does It Do?

The Pharos Agent Kit focuses on three core financial functionalities, each powered by a specific smart contract on the Pharos Network:

Vault System for Stablecoins:

This feature allows users to create "vaults," which are like digital safes where they can lock up assets (called collateral, such as tokens) to borrow or create stablecoins—digital currencies designed to maintain a stable value. Developers can use the kit’s tools to let their users deposit collateral, generate stablecoins, repay their debt by destroying stablecoins, or withdraw their collateral. The system also includes a liquidation process, where underfunded vaults (those with too little collateral compared to the stablecoins borrowed) can be closed by others to keep the system secure. The kit makes it easy to manage these vaults, track collateral prices, and ensure the system stays balanced.

Contract Address: 0x1234567890abcdef1234567890abcdef12345678

Purpose: Handles the creation and management of vaults for minting and burning stablecoins with collateral.

Liquidity Pool for Trading:

The kit includes tools to interact with a liquidity pool, which is a shared pool of two different tokens (like a pair of currencies) that people can use to trade tokens without needing a traditional buyer or seller. Developers can enable their users to add tokens to this pool (providing liquidity) and receive special tokens (called LP tokens) in return, which represent their share of the pool and allow them to earn a portion of the trading fees. The tools ensure that adding tokens is done in the right proportions to keep the pool balanced and protect users from unexpected price changes.

Contract Address: 0xabcdef1234567890abcdef1234567890abcdef12

Purpose: Enables users to add liquidity to token pools for decentralized trading and earn fees.

MTK Token Management:

The kit supports interactions with a digital currency called MTK, which is a standard token on the Pharos Network (following the ERC20 format, a common standard for tokens). This token can be used as collateral in the vault system, one of the tokens in the liquidity pool, or for other purposes like governance or rewards in the application. The tools allow developers to create new MTK tokens, destroy them, or transfer them between users, making it versatile for various use cases.

Contract Address: 0x7890abcdef1234567890abcdef1234567890abcd

Purpose: Manages the MTK token for use in vaults, trading, or other system functions.

How It Works for Developers

The Pharos Agent Kit is designed to be as simple as possible for developers to use. Instead of writing complex blockchain code to interact with the smart contracts directly, developers can install the kit’s NPM package (npm i pharosagent) and use its pre-built functions to perform tasks like creating a vault, adding liquidity, or managing tokens. Here’s a basic example of how it works:

Setup: Developers install the package and connect it to the Pharos Network by providing a connection to the network (like a URL for a Pharos node) and a digital wallet to sign transactions.

Using the Tools: The kit provides simple commands (APIs) to perform actions. For example, a developer can call a function to create a vault for a user, deposit 100 MTK tokens as collateral, and mint 50 stablecoins. Another function could let a user add 100 MTK and 100 stablecoins to a liquidity pool to earn trading fees.

Flexibility: The tools are customizable, so developers can adapt them to fit their application, whether it’s a lending platform, a trading app, or a completely new financial product.

The kit is like a set of pre-assembled building blocks: developers don’t need to understand the intricate details of the Pharos Network or the smart contracts to use them effectively. This makes it accessible to both experienced blockchain developers and those new to DeFi.

Why It’s Useful

The Pharos Agent Kit is valuable because it saves developers time and effort while opening up powerful financial possibilities. Here are some key benefits:

Ease of Use: By installing a single NPM package, developers get access to a full suite of DeFi tools without writing complex smart contract code.

Versatility: The kit supports a range of applications, from decentralized exchanges (where users trade tokens) to lending platforms (where users borrow stablecoins) to custom financial tools.

Pharos Network Optimization: The kit is tailored for the Pharos Network, which is designed for fast, secure, and cost-effective transactions, making it ideal for DeFi applications.

Scalability: Developers can build small prototypes or large-scale applications, as the tools are designed to handle various levels of complexity.

Community and Growth: By building on the Pharos Network, developers join a growing ecosystem of DeFi projects, with opportunities to collaborate and innovate.

How to Get Started

To use the Pharos Agent Kit, developers need:

A development environment with Node.js and NPM installed.

Access to the Pharos Network, either through its main network (Mainnet) or a testing network (Devnet).

A digital wallet with some Pharos Network tokens to pay for transaction fees.

Once set up, developers can install the package with npm i pharosagent, follow the documentation to configure their connection, and start using the tools. The kit includes example code to show how to perform common tasks, like setting up a vault or adding liquidity, making it easy to get started.

Important Notes

Contract Addresses: The addresses listed above (0x123..., 0xabc..., 0x789...) are placeholders. Developers must use the actual addresses of the deployed contracts on the Pharos Network (check the project’s official documentation or repository for these).

Security: Before using the kit in a live application, developers should verify the contract addresses and ensure their application is secure. The kit’s token management tools, for example, may need restrictions to prevent unauthorized actions like creating unlimited tokens.

Testing: Developers can test their applications on the Pharos Devnet, a testing environment where they can experiment without using real money.

Support: The Pharos Agent Kit team provides support through email, a community Discord, or GitHub issues (details available in the project repository).

Progress During Hackathon

100% testing done for phase 1

Tech Stack

React
Node
Web3
Ethers
Solidity

Fundraising Status

Will be doing it from devs and organizations

Sector
DeFiInfra