BentoBox, to launch and beyond
Since I put out the proposal for BentoBox a few months ago, there has been a lot of progress and launch is now within sight. As the idea became design and then code, some things changed and some improved. This post will explain the solution we’re delivering and a potential roadmap for the future from my point of view.
To start, the term BentoBox was originally used for the lending solution, but as coding progressed, a new concept emerged. This I will refer to as BentoBox. The lending solution will be referred to as BentoBox Lending or simply lending.
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.
This is where the BentoBox comes in. The BentoBox is a single vault that holds all tokens. Not just for the lending contracts, but also for any other protocols and future extensions. Anyone can build extensions that use the BentoBox as their vault with these benefits:
- 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.
But more importantly, these are only some early benefits, when we move to BentoBox Plus, a lot more benefits get unlocked, as explained later in this post.
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.
- 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.
Benefit: Using this oracle opens up a wide range of tokens for lending that are currently not available on lending platforms. For many tokens, this will be the only oracle available.
Risks: The lending pool should probably not grow outsized in relation to the SushiSwap LP pool as that may lead to manipulation of the price to trigger liquidations.
The risks are somewhat mitigated by the elastic exchange rate optimizing for 70–80% utilization of the assets. This should in most cases keep TVL much lower than other lending platforms (while optimizing revenue through interest). TVL for a pool could grow quite large if the asset is going or is expected to go down in price fast as the borrow balance will grow fast due to a demand to short the token. If the asset is going down in price, this won’t trigger liquidations. If the price is expected to go up, TVL may shrink because borrowing the asset would lead to losses.
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.
Benefit: Quick response to fast price movements.
Risks: These are based on a single source (although with the UniSwap safeguard). This has created an issue before, causing about $90M to be liquidated. USDC and USDT are pegged 1:1 to USD. Compound may switch to another oracle solution at some point.
This oracle uses the publicly available Chainlink oracles that are “sponsored” by other protocols, such as Synthetix, Aave, bZx, etc.
Benefit: Some sort of weighted average from multiple sources, sourced by multiple reporters.
Risks: Because running each Chainlink oracle is quite expensive ($240k-$360k/year), most oracles currently rely heavily on sponsorship from the Chainlink team. Were they to stop paying for it, most Chainlink oracles would probably no longer be maintained. This introduces a single point of failure.
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.
Realistically, I’m hoping to see the first release go out in mid January.
The first release will give access to the basic features of BentoBox Lending for a predefined set of collateral-asset pairs. Features such as creating new pairs, searching for pairs, moving liquidity between pairs, etc will be added over time.
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.
Also, many in the team have never worked together before, so we took some time to find out the best ways to work together and communicate, etc. In the end, it’s become an amazing team effort from a team distributed across the globe.
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.
Meanwhile @Miya has been preparing launch communications and 0xMaki lined up top firms Peckshield and Quantstamp to conduct the audits.
And I’m sure I’m forgetting some people and some parts here. But the point here is that we started out as a group of strangers. But by now, a real team that works closely and effectively together has formed.
Now that the team is all ‘warmed up’ we should be able to deliver more in less time. The following is my idea for a high-level roadmap for Sushi.
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.
We can add any number of ‘base’ contracts with different settings for the safety parameters, etc.
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.
While currently not supported, we are investigating a way to get BAND oracles maintained at a very low cost (paid by those who benefit from keeping the price up to date, such as liquidators and large asset suppliers). At this point, this is still in an early stage of research, but this could lead to an affordable way to have a properly decentralized off-chain to on-chain oracle solution for BentoBox Lending.
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.
Initially, we could support xSushi as the main collateral, so you can be earning SUSHI while minting synthetic assets.
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.
Instead of just supported the standard curve AMM, we can also add support for pools with different ratios, such as 20:80. And for pairs such as USDC-USDT or WBTC-renBTC we can add a special curve that reduces slippage significantly.
We can also add some more experimental AMMs, such as one that only moves in one direction and can only backtrack a few percent. Or an AMM with a spread built-in.
The current BentoBox is very safe, but only provides no returns on capital. A second BentoBox can be launched that provides the following upgrades:
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.
These strategies will give you a return on your capital while it’s still 100% available to you to use in any of the BentoBox enabled protocols, such as lending and AMM.
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.
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:
- MISO — A platform to launch new projects (https://forum.sushiswapclassic.org/t/proposal-miso-minimal-initial-sushi-offering/1309)
- Gusoku — Options-based IL protection
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:
Let’s say you HODL ETH and BTC. You could add your WBTC and ETH to the BentoBox and provide both assets for Lending. This will give you lending tokens. These tokens could be placed in an AMM pair and they will be arbitraged by traders as the price of ETH-BTC moves (indirectly providing more liquidity to the overall on-chain ETH-BTC market). This will mint you SLP tokens for this pair. This could be supplied as collateral to borrow for instance USDC (or to borrow more WBTC and ETH to repeat the above and leverage this position).
This takes capital efficiency options to a whole new level.
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.
But once a lot of the eco-system is already running through the BentoBox, we simply deploy a BentoBox on layer 2. Once you’ve moved your tokens to layer 2 and into the BentoBox, you can stay in layer 2 while using all the cool protocols built on top of BentoBox.
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
P.S. This is my personal view for Sushi. However, Sushi is owned and governed by the community. It’s up to the community to set the real roadmap and accept or reject all or part of this.