
Peridot
Cross-Chain Moneymarket with Fintech Grade UX
Demo
About
The problem it solves # Peridot: Unifying DeFi with a Cross-Chain Lending Super-Highway ## The Problem It Solves In today's multi-chain world, DeFi is powerful but deeply fragmented. Capital is trapped in isolated ecosystems, forcing users to navigate a complex and often perilous landscape of bridges to move their assets. This process is not only cumbersome, involving multiple steps, transactions, and interfaces, but it's also a massive security risk. Bridge exploits are one of the most significant sources of financial loss in the crypto space. This fragmentation leads to severe capital inefficiency. A user's valuable collateral on Ethereum is useless if they want to seize a time-sensitive borrowing or yield opportunity on another network like Avalanche or BNB. The user is forced to sell, bridge, swap, and finally interact, losing time, paying for multiple transactions, and exposing themselves to risk at every step. ## Peridot, Powered by Chainlink CCIP: The Solution **Peridot solves the problems of fragmentation, security, and capital inefficiency by creating a seamless, cross-chain lending and borrowing protocol, all powered by Chainlink's Cross-Chain Interoperability Protocol (CCIP).** ### What can people use it for? Peridot allows users to treat the entire multi-chain ecosystem as a single, unified financial market. With Peridot, users can: * **Deposit Collateral and Borrow Anywhere:** A user can deposit collateral (e.g., WBTC on Ethereum) and instantly borrow an asset on a completely different chain (e.g., AVAX on Avalanche) in what feels like a single transaction. * **Unlock Trapped Liquidity:** Access liquidity and participate in new token ecosystems without ever leaving their preferred chain or manually bridging assets. * **Achieve Unprecedented Capital Efficiency:** A user's collateral on one chain can now back their borrows across all supported chains, allowing them to make their assets work harder for them. **Example Use Case:** Alice holds most of her assets in ETH on the Ethereum mainnet. A new, high-yield farming opportunity appears on BNB that requires ARB tokens. Instead of selling her ETH, bridging funds, and swapping, Alice simply uses Peridot. She deposits her ETH as collateral on Ethereum and instantly borrows BNB directly on BNB to enter the farm. It's simple, fast, and secure. ### How It Makes Existing Tasks Easier and Safer * **Easier:** Peridot abstracts away the entire bridging and swapping ordeal. The user experience is simplified to a single "deposit and borrow" action, no matter how many chains are involved behind the scenes. We've taken a multi-step, high-friction process and made it a one-click action. * **Safer:** Security is paramount. Instead of relying on bespoke, often unaudited bridges, Peridot is built on **Chainlink CCIP**, the industry gold standard for secure, reliable, and time-tested cross-chain communication. By using CCIP, we inherit its robust security model, protecting our users from the systemic risks of bridge exploits. * **MEV-Resistant:** Through Chainlinks VRF we can create an MEV Resistant Liquidation mechanism. * **UX for Beginners and Experts with our Peridot Telegram Bot** * To push the boundaries of accessibility, we've also developed a **Telegram bot** for Peridot. This bot allows users to interact with our powerful cross-chain lending protocol using simple, natural language commands directly from their favorite messaging app. Users can: * Check their account balance and liquidity. * Monitor their collateral and borrow positions. * Initiate cross-chain borrowing and repayment. This bot dramatically lowers the barrier to entry for DeFi, bringing sophisticated financial tools to a familiar, mobile-friendly interface and making cross-chain finance more accessible than ever before. TelegramBot: @ChillMcSave_Bot
How it's made
Challenges we ran into # Challenges I Ran Into ## Primary Challenge: Transitioning from Wormhole to Chainlink CCIP The most significant hurdle we encountered was adapting our existing cross-chain architecture from Wormhole's messaging system to Chainlink CCIP. Having already implemented a Hub & Spoke model with Wormhole for native token transfers, integrating CCIP represented a fundamental shift in our cross-chain communication approach. ## Technical Integration Hurdles ### Contract Architecture Differences The transition required restructuring our message handling patterns. Wormhole's VAA-based system operates differently from CCIP's router-based architecture, necessitating a complete redesign of our cross-chain message validation and processing logic. ### Import Path Conflicts We encountered significant compilation issues due to conflicting import paths between `@chainlink/contracts` and `@chainlink/contracts-ccip` packages. The resolution required consolidating all remappings into `foundry.toml` and removing conflicting `remappings.txt` files. ### Solidity Version Compatibility Our existing contracts used Solidity 0.8.19, but CCIP integration required upgrading to ^0.8.20 for compatibility. This upgrade necessitated testing all existing functionality to ensure no breaking changes. ### Function Signature Mismatches Integrating with the existing PriceOracle interface proved challenging when the ChainlinkPriceOracle implementation required `PToken` parameters instead of the expected `PErc20` types. This required careful interface alignment and type conversion handling. ## How We Overcame These Challenges ### Systematic Learning Approach We approached CCIP integration methodically, implementing a five-phase "skateboard to car" strategy that allowed us to master each component incrementally rather than attempting a complete integration simultaneously. ### Documentation and Testing Extensive use of Chainlink's documentation and example contracts provided the foundation for understanding CCIP's architecture. We implemented comprehensive test suites for each integration phase to ensure reliability. ### Iterative Problem Solving Each technical hurdle was addressed through iterative development cycles. For example, the VRF type conversion issues were resolved by implementing proper uint256 to bytes32 conversions with comprehensive error handling. ## The Learning Outcome After overcoming the initial learning curve, we discovered that CCIP's architecture offers superior developer experience compared to our previous Wormhole implementation. The built-in security features, comprehensive allowlist controls, and standardized message handling patterns significantly improved our protocol's reliability and maintainability. The transition ultimately enhanced our protocol's capabilities, providing enterprise-grade cross-chain functionality with better security guarantees and more intuitive development patterns. What initially seemed like a complex migration became an upgrade that strengthened our entire cross-chain infrastructure.