Code Monkey home page Code Monkey logo

Comments (1)

gregdhill avatar gregdhill commented on May 24, 2024

Changes

I am expecting the VaultId to contain the AccountId for the stash key, the control key will be defined separately.

Since the VaultId will comprise the stash account (to minimize changes and since the control account may change) any function which checks the validity of the origin for the control account should require either a stash_id parameter for lookup and comparison or we may decide instead to define a separate storage map in the vault-registry.

Migration

Follow this implementation to iterate through all Vaults in storage and set the control key as the stash (VaultId) key.

Other Notes

Extrinsics which target nomination / staking & rewards will use the stash key by default, if we want a running Vault (signing with the control key) to be able to claim rewards on behalf of the stack account we may want to consider an alternate approach.

Related reading: https://docs.substrate.io/v3/concepts/account-abstractions/

Client Changes

I would expect the client changes to be largely incidental to most users. That is for auto-registration, the current Vault should use the same key for both control and stash. The front-end Vault dashboard should allow advanced registration for the stash account to explicitly set the control key.

from interbtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.