-
Notifications
You must be signed in to change notification settings - Fork 323
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
CIP-0017: Cardano Delegation Portfolio #82
Conversation
Adafolio developer here! We are very excited to see this CIP submitted. We're happy to make any changes necessary to our portfolio JSON format to accommodate this specification, and we fully support what has been proposed here (for whatever that's worth). Our current JSON definition was only intended to be a placeholder until a spec was defined. If our involvement in any part of the implementation or testing of this feature would be helpful, please feel free to contact us! |
@KtorZ @wrmarchetto it's nice to see all this stuff finally coming together. Last September with #25 > Rationale I published a heap of use cases and was imagining a whole range of sites like Adafolio, with both curated & crowdsourced portfolios and some means of ranking, classifying and/or analysing them. Crowdsourced portfolios could be even more finely distributed through the Internet as URIs, in addition to being an easy link to wallets & other apps without the generating web site having to generate a JSON file and properly dispose that additional content from the web server. JSON in turn will provide stability, verification, and a product of pool set size * precision that the URIs cannot. It will be great for users & devs to have both options. Since the multi-pool aspect of that originally written CIP is now published as #86 I would be really happy for both your review & comment, since there are likely to be common elements between the two resulting CIPs. |
comments on CIP draft itself
It is true this is necessary for decentralisation, but not true about the lack of monetary incentive. For a vivid example, compare the following portfolio analyses (figures from the day of this posting) and also note the "High Performance" bar could be set even higher and still include a dependable pool set size:
It might even help the proposal to replace that statement with its opposite: e.g. that monetary incentives exist to maximise a user's delegation rewards by selecting portfolios based on performance, especially while contemporary pool ranking algorithms in the wallets continue not to do this.
Some users & developers will require decimals as the stake pool weights in order to build portfolios that match the following real world values (at some given time), without having to normalise the order of magnitude or suffer round-off error:
A security consideration suggested for URI delegation portfolios will also be applicable to JSON portfolios:
One possible solution is to scale all the pool weights so that the largest is 1, which obfuscates any literal ada or lovelace balance in the wallet which could also be publicly visible & link a portfolio creator's identity to their wallet (this was suggested here last year = "When exporting proportions"). |
@rphair Thanks for your extended comment(s)! Only going through it now and, I do agree about the framing w.r.t to the monetary incentive. It is true that for stakeholders with large enough stake, there's a monetary incentive to delegate to multiple pools. I'll rephrase that. On the topic of decimals in weights now. The weights are purposely plain integers because of all the complication coming with floating arithmetic and float number parsing with IEEE-754 compliant systems. Using weights as such really defines them as ratio of two numbers which can always be represented without ambiguity. I'll make that clearer in the specification because it may not be obvious to the reader. |
Just let me repeat first for the record & for new visitors that I have never suggested using floating point notation for the stake pool weights. And as you know there is no more ambiguity with decimal ratios than there is with integer ratios. So remaining question is why the precision of either representation is likely to be real rather than a false suggestion. Foremost we should include @SebastienGllmt since the last information I've seen presented to the public about multi-pool delegation options, in this interview with him, suggested out of a number of approaches that precise staking ratios implemented in the protocol itself would be "cleaner" and "better" than having to "juggle UTxO's around" (I'm quoting from memory) or to go on as you say above with only rough approximations of the portfolio proportions: https://www.youtube.com/watch?v=H_Map7ncsWc If Sebastien's or anyone's road map for delegation portfolio support has been developed or confirmed anywhere else since then, we should link to it here. Until then we have to assume that precision of multiple significant figures will eventually be supported in the protocol and therefore:
Since I've heard the "better way" of protocol ratio staking scheduled as a "long way off" in meetings and private discussions and then used as a justification for the multi- Stake Pool URI proposal being slow-tracked, it would be a double standard for the developers not to see "ratio staking" as the preferred method. But if an earlier "crude" implementation with one-time UTxO balancing (and then allowing "drift") is what it takes to get these portfolios implemented sooner in the wallets, then other portfolio advocates & I would be happy to see it. Yet since those wallets will eventually move to protocol-supported precise stake ratios (until proven otherwise), the URI & JSON portfolio standards need to include precision support from the beginning, by whatever means users and developers choose to implement that precision (while avoiding the tricky & ambiguous floats). The final arguments for enforcing integers might be of the "it's cleaner" variety (cleaner parsing, simpler variable types, etc.). I don't see that it would be cleaner overall in terms of the user, since people have already been seeing decimal values and proportions in Cardano since Day 1. Foremost example: the 6 figures of lovelace on top of the whole number ada, now part of the Cardano community's conditioning for years.
|
This was again discussed at the last Editor meeting (22), please refer to the notes to catchup on the conversation. |
This was discussed at the last Editor meeting (23), please refer to the notes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed at last Editors meeting (24) - see notes. (conversation might be ahead of meeting notes at this point, this is a reference)
The conversation was further opened up with two SPO meeting.
(Adding this PR as a "Discussion" for tomorrow's CIP Editors Meeting (25 - in contrast to PR86 in the hope of consolidating)
Comments-URI: https://github.com/cardano-foundation/CIPs/wiki/Comments:CIP-0017 | ||
Status: Active | ||
Type: Standards | ||
Created: 2020-04-02 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021?
6/29 Editors meeting (25) discussed this PR - see notes. (conversation might be ahead of meeting notes at this point, this is a reference) => PR is now in 'Last Check': it will get another look at next week's meeting (26) and should be merged in after that - consider attending the meeting if relevant to you. |
Abstract
This document details a common format for sharing Cardano delegation portfolio across various tools and wallets.
Motivation
Stakeholders have indicated the desire to split their stake in various sizes and delegate to n pools from a single wallet/mnemonic. Albeit there are no monetary incentive for users to do this, the desire to drive decentralisation is sufficiently prevalent to justify it. Furthermore, stakeholders want to introduce a certain social element to this activity by sharing their delegation portfolio with other stakeholders. This specification should help to standardize the representation of portfolios across tools for more interoperability.
Specification
Overview
We'll use JSON as a data format for it is commonly used and supported across many programming languages, and is also relatively readable on itself. Portfolios should abide by the JSON schema given in appendix.
At minima, a portfolio should cover a list of delegation choices (pools and weights) and have a human-readable name for easier identification.
Weights
For each pool, we demand a
weight
which can capture a certain stake proportion within the portfolio. The value is an integer, and relative to other weights in the portfolio. For example, a portfolio with two pools and respective weights of1
and2
means that we expect users to assign twice more stake to the second pool than the first. Fundamentally, this means that for every 3 Ada, 1 Ada should go to the first pool, and 2 Ada should go to the second. Note that this is equivalent to having weights of10
/20
or14
/28
. Weights are ultimately interpreted as fractions.Portfolios which treat all stake pools equally should use the same weight (e.g.
1
) for each pool.Rationale
JSON is widely used, widely supported and quite lightweight. Makes for a reasonable choice of data format.
Using JSON schema for validation is quite common when dealing with JSON and it's usually sufficiently precise to enable good interoperability.
The portfolio should only capture information that are not subject to radical change. That is, stake pools parameters like pledge or fees are excluded since they can be changed fairly easily using on-chain certificate updates.
The JSON schema doesn't enforce any
additionalProperties: false
for neither the top-level object definition nor each stake pool objects. This allows for open extension of the objects with custom fields at the discretion of applications implementing this standard. The semantic of well-known properties specified in this document is however fixed.Since the portfolio format isn't immediately user-facing, we favor base16 over bech32 for the pool id's encoding for there's better support and tooling for the former.
Backwards Compatibility
Adafolio (https://adafolio.com)
The format used by Adafolio share a lot of similarities with the proposed format in this CIP. In order to power its frontend user interface, Adafolio contains however several fields which we consider too volatile and unnecessary to the definition of a portfolio. This doesn't preclude the format used by Adafolio as a valid portfolio format (see also point (4). in the rationale above).
The only point of incompatibility regards the
pool_id
field (in Adafolio) vs theid
field (in this proposal) which we deem more consistent with regards to other field.Reference Implementation(s)
Examples
Copyright
CC-BY-4.0