Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPEC ONLY]: Gather requirements for fund accounts #866

Open
5 tasks
gordsport opened this issue Feb 11, 2022 · 1 comment · May be fixed by #1505 or #1663
Open
5 tasks

[SPEC ONLY]: Gather requirements for fund accounts #866

gordsport opened this issue Feb 11, 2022 · 1 comment · May be fixed by #1505 or #1663

Comments

@gordsport
Copy link
Contributor

gordsport commented Feb 11, 2022

In order to be ready for Comsic Elevator development we need to agree upon the scope for the engineering team to deliver in this release.

Notion Board

Market making and trading in general require a high level of expertise which means that only a small subset of potential users can engage with these activities. Finance solves for this with the existence of funds (of which there are many types) that allow someone with capital (usually after paying a fee/price) deposit that capital with someone else who will trade on their behalf. This has the benefit of allow more and different types of participants in the marketplace and also of increasing the amount of capital available, for example, to provide liquidity. This increased capital and liquidity benefits all participants through lower spread, reduced slippage, and more viable products/markets.

In addition to people/entities doing this "off-chain" with traditional structures and risks, the blockchain enables funds to be created that are non-custodial, not give their operators direct access to funds, and that enforce certain rules and transparency around trading activities. Vega intends to support such a feature to enable on-chain fund creation.

Any MVP of this feature must enable deplyoment of funds for liquidity provision on Vega, including the fund account making and keeping to an LP commitment. This will enable participants in the network to deploy liquidity to markets without trading expertise.

How do we know when we are done:

  • A fund account spec has been written
  • The specification contains acceptance criteria with IDs that reflect the scope of work required for Cosmic Elevator
  • The engineering team has reviewed the specifications and understand the scope
  • The QA team has reviewed and understands the specification and approves or has added to the set of ACs
  • The spec is merged into the specs repo before engineering start development/test work
@gordsport gordsport added this to the ☄️ Cosmic Elevator milestone Feb 11, 2022
@gordsport gordsport changed the title Update 0013-ACCT-accounts.md (and other LP specs?) to add fund accounts Update 0013-ACCT-accounts.md (and other LP specs?) to add fund accounts Feb 11, 2022
@davidsiska-vega davidsiska-vega changed the title Update 0013-ACCT-accounts.md (and other LP specs?) to add fund accounts Fund account spec Feb 14, 2022
@barnabee
Copy link
Member

barnabee commented Aug 25, 2022

As this topic is getting more discussion I am adding fund account notes below for visibility:

Fund accounts

Feature: an account can be a multisig

  • m of n
  • can replace a signer
  • can add or remove signers to make m of n → k of p
  • any signer can also be a multisig
  • any transaction can use a multisig (== provide the multisig ID plus valid signature(s)) or a normal account

Feature: an account can be a fund account

  • any transaction can use a fund account (== provide fund account ID plus valid signature(s) from an allowed signer for the txn type) but will fail if the fund account + signer combo don't have permission for that txn type
  • specifies a set of assets the fund account can hold and deploy
  • can have a close date (all positions auto close and all funds returned)
  • specifies a set/sets of account IDs/pubkeys with permissions to administer the fund account and deploy capital and their deployment permissions:
    • permissions to update various parameters
    • permission to set a fund close date (all positions auto close and all funds returned)
    • permissions can be for trading, liquidity provision/commitment, allocation to other fund accounts
    • permissions can be restricted by sets of settlement asset, product, market ID, and account ID (as appropriate)
    • permissions can set a maximum amount of the fund (%) that can be deployed to any single of set of market, product, fund account
  • specifies a set of deposit/redemption rules
    • fund max size cap per asset (can be unlimited)
    • redemption rules (redemption delay, max redemption per period, redemption costs,…)
    • fees, all of which may be zero (fixed mgmt fee, % mgmt fee, % fee on profits, period for fee evaluation)
  • optional ability to auto-deploy new funds pro-rata (e.g. particularly important for allocating to other fund accounts

Feature: can create or update a fund account

  • create and set properties above
  • update properties above
  • updates that are “material” only take effect after min redemption period plus some network parameter notification period

Feature: can deposit to a fund account

  • subject to the max limit if set and only in the assets the fund accepts

Feature: can initiate a redemption

  • rules and waiting etc. applied automatically
  • can only redeem/withdraw your share of the NAV after fees etc.

Feature: restrict access to funds for account managers/traders

  • fund account managers cannot withdraw or transfer away funds in the FA, only deploy to other FAs or into markets for trading / liquidity provision

Feature: apply permissions to trading

  • fund account management, trading, LP, and fund account deposit/redeem txns can be made by fund account only if the permissions match

Feature: APIs

  • can list fund accounts and properties (total NAV, historic P&L performance, historic NAV change, historic deposits/redemptions inc. future redemptions, all permissions and signers, count of capital deployed…. by market, deployed vs max)
  • can filter the above by assets, markets, other FAs invested in, signers
  • can list all positions for an FA (+filter)
  • can list all FA positions (all Vega, for an asset, for a market)
  • can list all FA transfers (filter by type = fee revenue, MTM, settlement, etc. and market and signer)
  • can list all FA trades/orders (filter by market, asset, signer - which trader made them, etc.)
  • can list all FA parameter/rule changes

Feature (stretch): can make decisions by vote

  • fund account managers/traders can make any transaction as a proposal and the fund’s members vote (weighted by % holding) to approve
  • each FA has thresholds for voting participation and success in its parameters
  • fund account can optionally enabled (by tx type) for transactions themselves to be proposed by their members (perhaps not allowed for some FA admin functions)
  • new members have some cooling off period before voting (prevent exploitation)

NB: DAO like management can be achieved using:

  • multisigs for signers
  • layers of FAs investing in other FAs
  • voting feature

NB: Eth investments into and probably redemptions from FAs can be taken directly over the bridge fairly easily, need two way bridge to read the value back on chain though

Questions:

  • what is MVP?
  • should it be possible to give transfer permissions (i.e. allow an FA to invest outside Vega) - these could be wildcard or to specific addresses/keys
  • should it be possible (as a stretch goal, and possibly alongside 2 way bridge) to allow transfers out to ethereum addresses / Ethereum contract interactions to also be specified as deployment targets and given permissions (this would allow deploying funds to Etc based strategies too)

@gordsport gordsport changed the title Fund account spec Fund account / account abstraction spec Jan 4, 2023
@gordsport gordsport linked a pull request Jan 9, 2023 that will close this issue
@gordsport gordsport linked a pull request Apr 19, 2023 that will close this issue
@gordsport gordsport linked a pull request Apr 28, 2023 that will close this issue
@gordsport gordsport changed the title Fund account / account abstraction spec [SPEC]: Fund account / account abstraction spec Jan 29, 2024
@gordsport gordsport changed the title [SPEC]: Fund account / account abstraction spec [SPEC]: Create a fund account / account abstraction MVP spec Jan 29, 2024
@gordsport gordsport changed the title [SPEC]: Create a fund account / account abstraction MVP spec [SPEC ONLY]: Create a fund account / account abstraction MVP spec Jan 29, 2024
@gordsport gordsport changed the title [SPEC ONLY]: Create a fund account / account abstraction MVP spec [SPEC ONLY]: Gather requirements for fund accounts Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants