SushiSwap X OnePiece - Automated System Tools


Proposal for the open collaboration of OnePiece as a multi-chain automation system available for Sushi Swap’s users.


Chris D. Beckman, Head of Business Development at OnePiece, is submitting this proposal on behalf of Luffy He, the CEO and founder of OnePiece.


Onchain composability plays a pivotal role in Defi’s evolvement for both end-users and developers – a high percentage of their onchain tasks, strategies or new protocol construction requires interoperations across multiple protocols combined with calculations & data monitoring.

OnePiece is the first multi-chain middleware layer that renders swift & automated access to onchain application & onchain composability, aiming to substantially reduce the barrier & cost of utilizing the onchain composability of Dapps to accelerate the development & adoption of Defi. In specific, OnePiece provides :

  1. End users with a set of automated Defi Task Types, which :

    A. Turn complex manual execution of a typical Defi task to a simple 3-step task definition process.

    B. Optimize user’s capital efficiency.

  2. Developers with :

    A. As Infura is saving developers effort for node setup & maintenance, Onepiece wants to save comparable amount of effort when developers access Dapps;

    B. Onchain data requires considerable effort in processing & structuring before they are ready for use, even for data provided by “The Graph”. Onepiece saves that for developers.


For Sushi’s users,

  1. Increased revenue for liquidity providers:
    A) OnePiece users can swap assets directly from Sushi’s pools, generating more fees payable to Sushi’s LP.
    B) Automatically claim, swap, and deposit user’s rewards to increase his earning pool position, therefore optimizing his APR.

  2. Provide a 2-level protection against liquidation:

    A) Keep user’s collateral ratio to preset target through auto rebalancing across his lending position & farming/staking positions.
    B) In case of rapid collateral ratio rise, part of the collateral is sold via Flashloan to return to the target collateral ratio to avoid liquidation.

  3. Increase users’ capital efficiency (Using Loan): When the collateral ratio drops below preset standard, it will return to the target collateral ratio by auto borrowing extra to increase user’s predefined farming/staking positions

  4. Save much of user’s manual execution for tasks involving interoperations between Sushi & other protocols through automation & auto data monitoring.

For developers,

  1. Provide more uniformed ABI to access Sushi smart contracts to shorten the learning cycle.

  2. Provide processed & structured Sushi data to save data acquisition & processing time.

  3. Provide documents to accelerate user’s development on top of Sushi.

For Sushi Swap,

  1. All the above should increase Sushi’s adoption rate and transaction volume through enhancement in user stickness & reduction in user’s concern with risk & overhead of using Sushi Swap.

  2. Increase liquidity in Sushi’s pools & swap due to the exposure to new users.

  3. As one of the main protocols in Defi, Sushi Swap is accessed by many developers in various cases to compose new strategies, tasks or protocols. Increased accessibility to Sushi Swap smart contracts & data could further enlarge Sushi’s impact in the ecosystem.


3 building blocks lay the foundation for Onepiece’s improved onchain accessibility:

  1. Protocol Integration: Integrating major Dapps on mainstream blockchains;
  2. Data acquisition, processing & structuring for all integrated protocols;
  3. Automation.



With MS in EE from Delft University of Technology, Luffy started as an engineer/researcher at Intel Eindhoven, NL. & computer system lab of Stanford University, successively. Then he became a strategy consultant in Accenture and Mckinsey, Amsterdam Office. In 2018, Luffy founded a leading aggregative OTC platform adopted by 100+ crypto-exchanges, wallets and mining platforms. The company shifted focus to Defi asset management since March 2020 with sizable AUM.


Upon arrival, every Onepiece’s user creates a dedicated smart account, which is a smart contract solely accessible to user’s EOA and Onepiece smart contracts for automation. Only the user has the right to withdraw funds from this smart account as he/she is the owner & creator. In order to trigger an automation task based on onchain data monitoring & calculation, Onepiece Admin must play the role to initiate this process since we don’t have users’ secret keys. However, the admin only has the right to trigger the automation task which moves user’s funds across protocols approved by the user, but not to withdraw, which is hardcoded in the smart contract for smart account.

One thing to clarify about security/decentralization: Every transaction within any user-defined automation task executes only with users’ signature, meaning no transaction could take place without user’s signature. But apparently many users value the manual effort saved by the automation & don’t want to sign every transaction manually. To prevent users from signing every transaction while keeping the security level of the transaction ;

  1. We restrict the types of automation tasks & the relevant pools that the signature could apply in the smart contract upon user’s selection;
  2. In order to automate execution, we utilize EIP-2612 to keep user’s signature alive for the selected automation task for a certain amount of time, say a couple of days. The user will be notified to provide his signature once again before the signature expires.

Additionally, we have 2 modes of automation available to users :

  1. Full automation: User authorize once, the signature will be valid for a preset term, within which every transaction will be executed automatically with notification to users through email/telegram;
  2. Semi-automation: The user will be notified of the triggering of a transaction through email/telegram, but he/she has to sign it before it could be executed.

This way,

  1. No risk of secret key exposure exists;
  2. Even if any security glitches were found, the worst case is user’s funds moving across his/her selected pools controlled by himself. No funds could be taken away.

Consequently, the smart account is completely decentralized and OnePiece does not act as custodian.

Useful Links

I see a very large number of projects seeking help from sushi, and now that sushi has revived its community communications team, I think sushi’s community communications team should be talking to these projects at the community level to move the proposals forward.
sushi needs to collaborate!
@pegbit , @maka , @rsk, @Trudahamzik @Zapacheenie

1 Like


Why should Sushi hand over its userbase?

you want the ABI files for sushiswap?

npm install @sushiswap/core-sdk
npm install @sushiswap/trident-sdk

Thank you very much for your support @shanjiefengyi. Feel free to join our discord to check on our upcoming releases this week. Also, OnePiece has established a reward system for early users/contributors. For this, you can apply for whitelisting.


Hey @sambacha,
I can understand your surprise based on the misunderstanding. I will gladly answer your question.
OnePiece operates as a middleware layer, in other words, we do not ‘‘steal’’ any userbase from integrated protocols, and do not have custody of users’ funds.

  • The normal process: EOA wallet (e.g. Metamask) to Sushi.
  • To use OnePiece: EOA wallet to OP’s smart account to Sushi.

OnePiece would allow Sushi users to automate their current investments with a set of tools such as (Auto-compound / Auto-borrow / Auto-repay / Position rebalancing / Flash repay / Position building).
Those tools are designed to increase users’ capital efficiency, without competing for TVL, since we only act as a Gateway for integrated protocols. In that sense, there are no downsides for Sushi. Sushi users would gain additional tools, while potentially gaining additional exposure from new users.

Thank you for your time, and hopefully, this answered your question.