Closed erin-koen closed 1 year ago
@exa256 we are generally in favour of this proposal but have a few questions. Our high level understanding is that you want to leverage external position architecture to build a "yearn-like strategies manager" We think this is an interesting idea but not sure what the AUM opportunity and use -case is. Is this something Exponent themselves would use for its own products? (I assume yes?) Also I assume this breadth of scoped covered here is only protocol work. Would you also eventually need a front-end to operate this or would you be using it directly from the contracts? If so, do you plan to build out that functionality as part of a second phase to this proposal ?
Look forward to hearing your comments!
I'm generally in favour of this proposal as an extension of external positions, however I would like to see more clarity on auditing of the smart contracts. Perhaps the MLN grant could be augmented to cover a 50:50 split of the audit costs.
It would also be good to understand how a fund is protected from price manipulation when holding a mix of assets and external positions on Sushiswap without price feeds.
Thanks for the questions!
@perhamgirl
Our high level understanding is that you want to leverage external position architecture to build a "yearn-like strategies manager"
yes, that's case for the implemented library which is around 50% of the codebase. However the grant proposal encompasses a larger scope which includes 1. the Sushiswap Lib and 2. our own external strategy proxy/parser. Latter which makes it significantly easier to add a more complex multi-steps strategy later on ie. a more complex options strategy or curve-convex style transactions
We think this is an interesting idea but not sure what the AUM opportunity and use -case is. Is this something Exponent themselves would use for its own products?
yeah at the moment yield opportunities across chains have become smaller. however the strategy lib itself is written once and deployable anywhere with a Masterchef + CFMM liquidity pairs like Sushiswap. This is something Exponent would like to start using to enable multi-strategy vaults. This would allow us to implement more strategies with a few hundred lines of code.
Given that this is deployed as smart contract and code is open sourced, any vault managers on Sulu vaults could use this integration. Or even rely on Exponent to service strategy automation via automate()
call
Also I assume this breadth of scoped covered here is only protocol work. Would you also eventually need a front-end to operate this or would you be using it directly from the contracts?
the first use case is that the contracts interactions will all be handled through our backend jobs w/o a UI. However I'm open for UI developments if other Sulu vault managers would like a way to interact with the position via MetaMask.
@salis
on auditing of the smart contracts. Perhaps the MLN grant could be augmented to cover a 50:50 split of the audit costs.
certainly. We can follow phased rollouts with this particular external position and ensure the contract is audited before substantial AUM/vault managers start using this set of contracts.
It would also be good to understand how a fund is protected from price manipulation when holding a mix of assets and external positions on Sushiswap without price feeds.
great question, in this case vault managers can individually configure their own swap parameters to ensure slippage tolerance, this would at least offer some mitigations against issues such as sandwich attacks
i'm in favour of this proposal, as per the "benefits to the Enzyme ecosystem"
especially for "holding assets that are not with a Chainlink price feed" -- even though i have the same question as @salis regarding the risk of price manipulation for such positions. is that something allowed by external positions in general?
i also think that the audit aspect needs to be clarified -- can it be included in the next iteration of the protocol? or given the timeline it has to be a separate audit that should come quite soon?
hey @teawaterwire thanks for the comments.
holding assets that are not with a Chainlink price feed
this is already the case for all external positions which reports back the assets and liability to the vault contract (which in turn is used to calculate NAV). Current EP models also makes trust assumptions between the shares holder vs. the vault manager in the case where they are not the same actor.
for worries about price feed manipulation, we could use TWAP price which should be made available on all Uniswap V2 Forks to prevent such manipulations.
audit
clarify here that the funding requirements here will be use to support the development cost. The expectation is that the audit must be done prior to the Exponent vault deploying non-trivial AUM onto this strategy.
Given that the Exponent team originally wants to run this strategy internally we can afford the audit cost for this plugin ourselves. If/when we would like to make the integration useable for other Enzyme vault managers- we can explore this in a different MFP (subsidize the cost post-audit) and potentially include a larger development scope ie. rebalance automation or client side integration.
Moving this from a PR to an issue...
MFP: External Strategy- Automated AMM LP Staking
Proposal
External Position for AMM DEX Staking Rewards Auto-Compound
Description of the project
Exponent submits a funding proposal for
External Strategy
, a modular approach to automate passive strategy on DeFi protocols utilizing external position on Enzyme’s Sulu framework. With External Strategy, vault managers can run complex DeFi interactions in one transaction, or even delegate the responsibility automate the strategy to a third party service provider. The first strategy will be to compound staking rewards on Sushiswap and Quickswap on Polygon blockchain, thus allowing all vaults to deploy their own Beefy Finance/ Autofarm-like liquidity mining strategies right on Enzyme without technical knowledge or operations overheads.Motivation
With the release of Sulu, a promising feature for vault manager is external position, which allows a fund managers the flexibility to interact with DeFi protocols without the need for external price feeds or asset fungibility, ie. Uniswap V3 or Compound debt position. However, running a complex DeFi strategy requires multiple sequential smart contract interactions which is still very difficult to achieve in the current form.
Exponent aims to create a general architecture for complex DeFi interactions while utilizing Sulu’s native external position feature
Benefits to the Enzyme ecosystem includes:
automate
which performs a single task as required in exchange for a bounty.Scope of work
The following are the deliverables that Exponent commit to as part of the proposal:
UniversalParser
: a generic parser for external positionExternalStrategyProxy
: a proxy contract strategy that cross-check for allowlist and delegate calls to a strategy lib for implementationExternalStrategyRegistry
: allowlist for pre-approved external strategiesSushiStrategyLib
: Sushiswap + Staking rewards strategy contract. Swap, provide liquidity and stake LP tokens in one atomic transaction.QuickswapStrategyLib
: Quickswap + Staking rewards strategy contract. Swap, provide liquidity and stake LP tokens in one atomic transaction.Working Prototype
the first version of a successful transaction flow has already been completed on Polygon with a real vault instance, FRAX and FXS liquidity pair on Sushiswap with SUSHI token reward.
Fund deployment from vault and strategy execution Enter() transaction hash
Automated task on behalf of the vault manager Automate() transaction hash
Example UniversalParser contract:
Example SushiswapStrategyLib contract:
Timeline
the work is to be completed in the next 4 weeks
Technical Details
the source code for the deliverables and the technical details can be found here:
https://github.com/exponent-cx/external-strategy
Team
Exponent is on a mission to facilitate treasury deployment at scale for web3 orgs that won’t compromise on trust. It achieves this objective with productized treasury services that are curated, automated and risk mitigated. Exponent already has experience building on top of the Sulu architecture with the upcoming release of its treasury product: Fennec Stash.
Other considerations
there are additional development and infrastructure discussion that must be taken into consideration which are currently not included in the scope of work.
Funding Required
1500 MLN vested on completion of the above deliverables under the scope of work.
Future Possibility
There are strong future candidates for future development work on external strategy. For instance:
automate
transaction on behalf of all registered Enzyme vault managers.Contact Information
for any further questions, please contact:
✉️ contact@exponent.ai
or dm us on twitter at @exponent_cx