Hibachi Store and King Rolls: Automated Arbitrage with %profits distributed through a lottery system
In our previous proposal, YCabal, we provided a basic idea of a solution set that utilized both offchain and onchain components for the purposes of crowding out market participants in
block sensitive transactions (e.g. front running, back running, sandwiching, etc). In preparation for the launch of the ‘Cabal’, we wanted to see what game mechanics could be utilized to both enforce prescribed rules and further incentivize market participants to continue trading.
This proposal covers what we call Hibachi Store and its companion, King Roll.
Hibachi Store is a pair-swap arbitrage system in which either A: an intermediate asset or B the profit taking asset is automated and enabled by either User funds or External Protocols. Such external protocols that could be utilized include BentoBox, Aave, Compound, etc.
The preliminary design specification is intended to reward those who trade on the platform by taking such arbitrage profits that are generated through Hibachi Store and deposit them into a lottery pool. The lottery pool mechanism is referred to as the ‘king roll’.
King Roll is, in essence, a claim on the funds that are generated through Hibachi Store, but more specifically they represent the potential for the ability to assert a claim on some portion of funds from the pool. In essence it is a lottery or raffle system in which those
King Roll is intended to be controlled by the governance protocol of SushiSwap.
King Roll can be used in such ways that the community thinks is best, such as using xSushi/etc for the actual settlement token. King Roll is just an abstraction layer over what really happens in essence.
King Roll distributes the profits generated from Hibachi Store either as a claim on funds of a deposit (e.g. a Bentobox). or as a verifiable random lottery system.
Lottery as a Impermanent Loss offest
We can also make a assertion towards attracting additional LP’s. through the mixed use of the system given certain parameters are met.
Attracting LP’s can be realized through both Hibachi Store (via the rebalancing effect of arbitrage) and the increased volatility through King Roll (for example placing a special status on the trading market making it eligible to earn King Rolls).
If volatility drag costs the asset more than 200% of its average log return, rebalancing on Uniswap won’t be able to eliminate enough of the drag to make it worthwhile, and you are better off just holding cash.
If volatility drag costs the asset less than 66% of its average log return, offsetting drag by rebalancing on Uniswap will not be worth the cost, and you are better off simply holding the asset.]
(Uniswap’s Financial Alchemy | Paradigm Research)
This area of optimization is worthy of additional consideration, however we only mention it to say that is is out of scope for the purposes of this initial proposal.
Given that the exchange rate is different for pool1 and poo2, and we assume pool1’s price is greater than pool2
We can compute the arbitrage trade below:
e1 = OldEthBalance_pool1
t1 = OldTokenBalance_pool1
e2 = OldEthBalance_pool2
t2 = OldTokenBalance_pool2
x = TokenWithdrawn_pool2 = TokenDeposited_pool1
y1 = EthWithdrawn_pool1
y2 = EthDeposited_pool2
(e1 - y1) / (t1 + x) = (e2 + y2) / (t2 - x)
relation between y1, x
EthWithdrawn = OldEthBalance - NewEthBalance
= OldEthBalance - productConst / NewTokenBalance
= OldEthBalance - (OldEthBalance * OldTokenBalance) / (OldTokenBalance + TokenDeposited)
y1 = e1 - (e1 * t1) / (t1 + x)
relation between y2, x
TokenWithdrawn = OldTokenBalance - NewTokenBalance
= OldTokenBalance - productConst / NewEthBalance
= OldTokenBalance - (OldEthBalance * OldTokenBalance) / (OldEthBalance + EthDeposited)
x = t2 - (e2 * t2) / (e2 + y2)
(1), (2), (3) for variables
x, y1, y2
y2 = sqrt [(e1 * t1 * e2 * t2) - (t1 * e2)] / (t1 + t2)
- Deposit y2 Eth in pool2 to get x tokens
- Deposit x tokens in pool1 to get y1 Eth
- (y1 - y2) is the net profit in Eth
Contract Design and Overview
GitHub Repo: https://github.com/manifoldfinance/hibachistore
Note that this does not include the implementation that contains integration
with lending protocols nor the VRF functionality for the lottery system.
- Finalized, pending audit
- Integration and testing with.SushiSwap proper (need another pair of eyes!)
- Additional analysis on King Roll eligible markets to ensure game theory correctness.
- Engineering tasked with BentoBox
- Onsen Menus
- SushiSwap LP’s
- UI/UX team’s
Please feel free to reach out to me on discord, @sambacha
I encourage questions, comments, critiques, etc.
enter the outcome of the For side
enter the outcome of the Against side
Build a poll using the Build Poll function, check out this link (https://meta.discourse.org/t/how-to-create-polls/77548) for a guide on how to build a poll