🇺🇲
Protocolink
  • 🔮Overview
  • 🌟Why Protocolink?
  • 💡Use Cases
    • Flash Loans
    • Permit2 Amplifier
    • Zap-in & Zap-out
    • Position Management
    • Multi-Action Bundling
  • 📋Networks & Protocols
  • 🛡️Security & Audits
  • 💎Fees
  • ❓FAQ
  • Protocolink API
    • 🔮Overview
      • Swap & Supply (Example)
    • 📗Swagger
      • Request Protocols
      • Request Tokens
      • Request Quote
      • Estimate Logics Result
      • Request Transaction Data
  • Protocolink SDK
    • 🔮Overview
    • 1️⃣Install SDK
    • 2️⃣Build Logics
    • 3️⃣Estimate Router Data
    • 4️⃣Send Router Transaction
    • ⚒️API SDK Interfaces
      • Global Types
      • FlashLoan Logic
      • Aave V2
      • Aave V3
      • Balancer V2
      • Compound V3
      • Iolend
      • Magicsea
      • Morphoblue
      • OpenOcean V2
      • ParaSwap V5
      • Permit2
      • Spark
      • Stargate
      • Stargate V2
      • SyncSwap
      • Uniswap V3
      • Utility
      • Wagmi
      • ZeroEx V4
    • ⚒️Common SDK Interfaces
      • Constants
      • Network
      • Token
      • Web3Toolkit
      • Utility Functions
  • Lending SDK
    • 🔮Overview
    • ✳️SDK
      • Open By Collateral
      • Open By Debt
      • Close
      • Leverage By Collateral
      • Leverage By Debt
      • Deleverage
      • Collateral swap
      • Debt swap
      • Zap supply
      • Zap withdraw
      • Zap repay
      • Zap borrow
  • Smart Contract
    • 🔮Overview
      • Router
      • Agent
      • Callback
      • Fees
      • Utility
      • Data Type
      • ERC721/ERC1155 Support
    • 📑Deployment Addresses
    • 🧑‍💻Security Review Details
  • COMPOUND KIT
    • 🔮Overview
    • ✳️SDK
      • Leverage
      • Deleverage
      • Collateral Swap
      • Zap Supply
      • Zap Withdraw
      • Zap Repay
      • Zap Borrow
    • 📗API
  • Video Tutorials
    • 1. Introducing Protocolink
    • 2. Lending SDK
    • 3. Protocolink Q&A
  • Social medias
    • Twitter
  • Support
Powered by GitBook
On this page
  • Introduction to Compound Kit
  • Architecture Diagram
  • Developers
  • Compound Kit SDK & API
  • TypeScript SDK
  • API
  • Tenderly Simulation Examples
  1. COMPOUND KIT

🔮Overview

PreviousSecurity Review DetailsNextSDK

Last updated 11 months ago

For a more comprehensive protocol support and enhanced position and market information, we recommend using the Lending SDK.

Introduction to Compound Kit

The Compound Kit is an open source SDK/API which empowers developers to rapidly build robust and elastic applications that enhance the user experience with the Compound protocol.

Building an application on top of the Compound Protocol can be a challenging and time-consuming process. This is due to the inherent risks associated with working with smart contracts, as well as the complex calculations and encoding required for various use cases, such as leverage, deleverage, collateral swap, and zaps.

The Compound Kit reduces the need for developers to spend time and resources on building and maintaining their own smart contracts. The Compound Kit leverages Protocolink, which provides the ability to add more use cases in a highly modular way without deploying new smart contracts, and significantly reducing user risk.

Architecture Diagram

Developers

Developers can adapt the Compound Kit SDK/API into their frontend or backend services. With the use cases supported by the Compound Kit, they can easily generate transaction data, or utilize it for complex transaction scenarios. This significantly lowers the barrier for developers, allowing them to focus on providing a better user experience or infrastructure.

Compound Kit SDK & API

The Compound Kit API and its TypeScript SDK generate and return transaction data based on the specified use cases. It provides estimated execution results, calculates the optimal path for each use case, and forwards protocol logics to Protocolink.

TypeScript SDK

Interacts with the Compound Kit API without having to handle the low-level details of the API requests and responses.

API

Provides information about Compound markets, encodes a variety of use cases, and includes comprehensive Swagger documentation for ease of use.

Tenderly Simulation Examples

Employ Balancer flash loan (0% fee) on Ethereum ETH market

  • Leverage 1 wstETH collateral

  • Deleverage ~10 ETH base by wstETH collateral

  • Collateral-Swap 10 wstETH to cbETH

  • Zap-Supply 0.1 ETH to cbETH collateral

  • Zap-Supply 100 USDC to cWETHv3

  • Zap-Withdraw 1 wstETH to ETH

  • Zap-Withdraw 10 cWETHv3 to cbETH

  • Zap-Repay by 1 WBTC

  • Zap-Borrow 1 ETH to cbETH

Employ Aave v3 flash loan (0.05% fee) on Ethereum USDC market

  • Deleverage ~2800 USDC by UNI collateral

  • Collateral-Swap all UNI to ETH

Logic: the above illustrates the actions performed during execution, such as: approval, swap, supply, borrow, flash loans, and so on.