https://vimeo.com/1074681449/aa219e98c6?ts=0&share=copy
Welcome to the PYB Protocol! This decentralized finance (DeFi) protocol allows users to deposit collateral, receive yield-generating NFTs, and participate in a robust ecosystem of yield optimization and strategy management.
- Users deposit collateral (e.g., ETH, USDC) and receive Bond NFTs.
- These NFTs represent ownership of the deposited collateral and entitle the holder to claim yield.
- Fully compliant with the ERC721 standard, enabling easy transfer and trading.
- Collateral is deployed to yield-generating strategies via the StrategyManager.
- Yield is distributed periodically to NFT holders through the YieldDistribution contract.
- NFT holders can claim or reinvest their yield.
- The StrategyManager optimizes collateral allocation across multiple strategies.
- Supports rebalancing to maintain efficiency and maximize returns.
- Integrates with external lending protocols (e.g., Aave, Compound).
- The ProtocolTreasury collects fees and manages reserves.
- Emergency reserves ensure protocol stability.
- Transparent fee collection and reserve management.
- AI agents optimize yield strategies, manage risks, and rebalance portfolios.
- Includes:
- YieldStrategyAgent: Maximizes yield across strategies.
- RiskManagementAgent: Monitors and mitigates risks.
- RebalancingAgent: Ensures optimal collateral allocation.
- PriceOracleAgent: Tracks market prices for decision-making.
- Users deposit collateral into the protocol via the
BondFactorycontract. - A Bond NFT is minted and sent to the user.
- Collateral is deployed to yield-generating strategies by the
StrategyManager. - Yield is tracked and distributed by the
YieldDistributioncontract.
- NFT holders can claim their yield or reinvest it to increase the bond's principal amount.
- Bond NFTs can be sold or transferred, with ownership automatically updated.
- Manages bond series, collateral deposits, and NFT minting.
- Key Functions:
createBondSeries: Creates a new bond series.depositCollateral: Handles user deposits and mints NFTs.
- Represents Bond NFTs and manages bond metadata.
- Key Functions:
mint: Mints new Bond NFTs.claimYield: Allows NFT holders to claim yield.
- Manages yield streams and distributes yield to NFT holders.
- Key Functions:
distributeYield: Updates yield streams.claimYield: Transfers earned yield to NFT holders.reinvestYield: Reinvests yield into the bond's principal.
- Deploys collateral to yield-generating strategies and handles rebalancing.
- Key Functions:
deployCollateral: Allocates collateral to strategies.rebalanceStrategy: Adjusts collateral allocations.
- Manages protocol fees and reserves.
- Key Functions:
collectFees: Collects fees from yield distributions.emergencyWithdraw: Allows emergency withdrawals.
- Optimizes yield generation across strategies.
- Monitors risks and ensures protocol safety.
- Rebalances collateral to maintain efficiency.
- Tracks market prices for informed decision-making.
- Clone the repository:
git clone <repository-url>
- Install dependencies:
cd PYB-protocol forge install cd frontend/PYB npm install
- Deploy the contracts:
forge script script/Deploy.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY>
- Run the AI agents:
cd agentKit/agentkit/python/examples/langchain-cdp-chatbot python chatbot.py
Mohit -> Smart Contracts Rishi -> Frontend Soham -> Integrations + AI agents
This project is licensed under the MIT License.
#contributions Soham - Smartcontract(BondFactory) + AI agents +Integration Mohit- Remaining Smart contracts Rishi-Frontend+ Integration
