BentoBox, to launch and beyond

The BentoBox

All the DeFi protocols work with tokens. They need to be stored somewhere. In most cases, they are stored in the contract that works with them. In the USDC-WBTC pair on SushiSwap for instance, the USDC and WBTC tokens are held in the contract for this specific pair. This way you need to approve each token for use in each protocol.

  • Once a token is approved for the Vault, any protocol built using BentoBox doesn’t need per token approval anymore.
  • Low flat gas fees for internal token transfers (even between different protocols using BentoBox) and advanced transfers such as one-to-many transfers.
  • Funds of users and protocols are separated internally. Only protocols that the user approves can access the user’s funds.

BentoBox Lending

The first product in the BentoBox is Lending. This is mostly as per described in my original proposal with some enhancements. In short:

  • Anyone can create a lending pair with one asset token and one collateral token with a specific oracle.
  • You can earn interest by supplying the asset.
  • You can borrow the asset by supplying collateral.
  • The target utilization is between 70–80%. This is the percentage of assets that are borrowed from the total supplied.
*Interest rate changes compound when accrue is called, then it will move faster. This is the linear time when no transactions happen on the pair.
  • The elastic interest rate moves up if the pair is underutilized and down if it’s over-utilized. The further it is from the target, the faster the interest rate will move. At 100% utilization, the interest rate will double every 8 hours. *
  • When a user is up to 2% insolvent, the position can be liquidated against any approved ‘swapper’. Currently, there is one approved swapper for SushiSwap. The proceeds of the liquidation go 90% to the asset suppliers, 9% to the SushiBar and 1% to the developer (BoringCrypto).
  • When a user is more than 2% insolvent, any user can liquidate the position and get the full 12% liquidation fee. There are several ways to liquidate, including a flash liquidation (or optimistic liquidation) that will give you the collateral and you have to repay the debt before the end of the transaction.
  • Short functionality allows you to leverage a position by borrowing any amount of the asset, swapping it to collateral and depositing the collateral. As long as your position is solvent in the end. Unwind does the opposite.


At launch, BentoBox Lending will support several oracles. No oracle is perfect as they each have their benefits and risks. Some risks are mentioned here. There may be other risks. It’s important to understand how these oracles work and what their strengths and weaknesses are.

SushiSwap TWAP (Time Weighted Average Price)

This oracle takes the average exchange rate between the tokens in SushiSwap over a period of time. The time period is between the last 2 calls to update the price, with a minimum of 5 minutes.

Compound Open Price Feed

This oracle takes the price feed that the Compound protocol uses. The prices for this oracle are supplied by Coinbase Pro and are bounded by a maximum deviation from the UniSwap TWAP. More info can be found on the compound website.

Chainlink Oracles

This oracle uses the publicly available Chainlink oracles that are “sponsored” by other protocols, such as Synthetix, Aave, bZx, etc.

Benefits to Sushi Holders

There are three income streams in BentoBox Lending:

  • A flat borrow fee of 0.05% of the borrowed amount as the funds are borrowed. All of this goes to the asset suppliers.
  • Compounding interest paid by the borrower. 90% of this goes to the asset suppliers, 9% goes to the SushiBar and 1% goes to the developer.
  • Profit made from “closed” liquidations. 90% of this goes to the asset suppliers, 9% goes to the SushiBar and 1% goes to the developer.

Launching BentoBox Lending

The smart contracts for BentoBox are currently under audit by Quantstamp and Peckshield. The Peckshield audit is wrapping up with all issues addressed. The Quantstamp audit will probably wrap up in early January. Good progress is being made on the UI. You can see the design for it here. And here you can see an early version of the design ‘coded’ into an actual webpage.

The Road Ahead

BentoBox has been an awesome team effort and took longer than expected because we still had to set up a lot of scaffolding, like deployment systems and testing frameworks, etc.


The solidity code and tests originally written by me were tested, analysed, tweaked and fixed by Keno Budde (@clearwood on discord) and @johba. Deployment and testing were streamlined by Matthew Lilley (@I’m software on discord), who also introduced coverage testing and helped us get to around 95% test coverage so far.

Lending Improvements

LendingPair variants

Currently, a lot of the parameters are hardcoded to what we think may be good for a medium risk token pair. Some pairs are riskier, so they may need larger safety margins. But a pair like DAI-USDC is a lot safer, so more leverage may be ok to allow.

More Oracles

Anyone can create a new oracle interface to be used with Lending. Here are some that could be interesting to add:

  • Uniswap V2 TWAP oracle — this is the same as the SushiSwap one
  • xSUSHI oracle — this would allow xSUSHI to be used as collateral
  • SLP TWAP oracle — this would allow for SushiSwap SLP tokens to be used as collateral. (same could be done for Uniswap LP tokens)
  • cToken oracle — this would allow Compound Finance cTokens to be used as collateral, so you can farm COMP tokens on Compound and get interest as well as provide liquidity on BentoBox Lending. (Same can be done for C.R.E.A.M., Aave, etc…)
  • Multiple feed oracle — Combine multiple feeds, such as SushiSwap, Compound and Chainlink
  • Multiple AMM TWAP oracle — Combining the TWAP of SushiSwap and UniswapV2 into a single oracle.
  • BentoBox asset supply token oracle — this is getting a little meta, but there are some interesting use cases for this for the larger pairs.

Issue Synthetic Assets (such as Stablecoins)

Once lending is live, only a small change is needed to allow users to deposit collateral and instead of lending assets, they can mint synthetic assets. Oracles, liquidation, etc all work the same. When the synthetics are returned, they are burned and collateral is returned.

SushiSwap V2

By bringing SushiSwap into BentoBox we gain many advantages. Such as:

  • Adding new pairs becomes much cheaper.
  • Any rebasing token that supports the BentoBox Plus will support all pairs with that token.
  • Extra income from putting idle capital to work.
  • Extra income from flash loans.

BentoBox Plus

The current BentoBox is very safe, but only provides no returns on capital. A second BentoBox can be launched that provides the following upgrades:

Flash Loans

Earn extra income on all funds through flash loans.

Support for rebasing tokens.

When a rebasing token calls sync on the BentoBox, all funds within (regardless of which protocol uses them) automatically rebase correctly.


For each token in the vault, a strategy can be specified that will invest the asset in a “safe” way to generate a return. Strategies used should only grow the value and should be able to be withdrawn instantly. We could also create a BentoBox Degen, that also allows more risky strategies, with higher returns.

ERC1155 Support

This ERC supports a single contract that “issues” multiple tokens. This way you could receive bTokens when you add tokens to the BentoBox. This is not so different from the way it currently works, but it currently doesn’t conform to the ERC1155 standard.

NFT Support

Currently, the BentoBox only supports fungible tokens. Adding support for NFTs opens a new range of possibilities as the use of NFT grows. You may for instance use an NFT as collateral. Some low value NFTs could be added to an AMM, such as common CryptoKitties, that are all of minimal, mostly equal value. And many use cases we haven’t even thought of yet. Currently, NFTs are mostly used to represent digital “goods”, but there are many more ways where NFTs may play a role in the DeFi eco-system.

The BentoBox eco-system

Because the BentoBox is an open platform, any protocol can use the BentoBox as their token storage and get all the benefits. We can add any missing DeFi legos, such as options, insurance, yield earning vaults and/or help existing protocols integrate. Some of the current Sushi products under development that can be added:

Capital Efficiency

The holy grail of DeFi is to maximize capital efficiency and generate the highest yield with the lowest risk. Once the BentoBox has Lending, AMM, etc and the BentoBox Plus is live, here’s an example of how it could be used:

Layer 2 — Scaling DeFi

There’s a lot of hype around “layer 2”, optimistic roll-ups, etc. But in practice, the major drawback for most of these solutions is that it’s expensive and/or slow to move between layer 1 and layer 2.

Exciting Times Ahead

While we don’t know what the future might hold, at least we’ve got a lot of plans… I’m looking forward to working with the great team of Sushi to bring more cowbell :D



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store