DEV Community

jack
jack

Posted on

A Developer's Guide to SushiSwap: Integrating Kashi Lending with the BentoBox Vault

This guide provides a technical overview for developers looking to build on the SushiSwap Official Site ecosystem. We will focus on the unique architecture of the BentoBox dApp Vault and how it enables isolated lending markets through SushiSwap Kashi Lending.

Step 1: The BentoBox Foundation

Before using Kashi, you must understand its foundation. BentoBox is a token vault that generates yield on idle assets from flash loans and other strategies. Instead of assets sitting unused in a smart contract, BentoBox puts them to work.

Action: To integrate, your dApp will call the deposit() function on the BentoBox contract, specifying the token and amount.

Step 2: Understanding Kashi Lending

Kashi is an isolated lending and borrowing platform built on top of BentoBox. "Isolated" is the key technical term here.

Problem with Pooled Risk: In protocols like Aave or Compound, if one high-risk asset collapses, it can create bad debt that affects the entire protocol.

Kashi's Solution: In Kashi, each lending pair (e.g., ETH/DAI) is its own independent market. A collapse in one pair has no effect on any other pair. This provides a much higher degree of security and answers a part of "Is SushiSwap Safe?".

Step 3: Creating a Kashi Pair

Any user or developer can create a new lending market on Kashi.

Choose an asset from BentoBox to be used as collateral.

Choose a second asset from BentoBox to be the borrowable asset.

The factory contract deploys a new, isolated market for this pair.
This permissionless creation allows for a long tail of lending markets not available on other platforms.

Step 4: Tying it to the Ecosystem

The revenue generated from Kashi lending and swaps on the AMM feeds back into the ecosystem. A portion of the protocol fees are used to buy SUSHI on the open market and distribute it to users who Stake SUSHI for xSUSHI, creating a direct link between platform usage and token value.

For all smart contract addresses and a deeper dive into the SUSHI Tokenomics, refer to the Full Official Documentation.

https://sites.google.com/network-guide.org/sushiswap/home

Top comments (0)