-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat: Add recovery pallet in runtime. #1105
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for looking into this @nakul1010! I've left a few comments on the Interlay runtime but please also consider those for the Kintsugi runtime. It's good that you already ran the benchmarks. In the PR description can you describe a bit about the functionality of the recovery pallet? Specifically how it works and what the benefits are.
parameter_types! { | ||
pub const ConfigDepositBase: Balance = 5 * DOLLARS; | ||
pub const FriendDepositFactor: Balance = 50 * CENTS; | ||
pub const MaxFriends: u16 = 9; | ||
pub const RecoveryDeposit: Balance = 5 * DOLLARS; | ||
} |
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.
How did you decide on these parameters?
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.
I had taken reference from the frame config set, but after re-reviewing, I suggest setting one of the following configs defined below.
INTR Config based on KSM Config set
Current Market Price
1 KSM -> 25 USD
1 INTR -> 0.0159 USD
pub const ConfigDepositBase: Balance = 8 * Dollars; //0.0000000000125 USD
pub const FriendDepositFactor: Balance = 1 * Dollars; //0.00000000000125 USD
pub const MaxFriends: u16 = 9;
pub const RecoveryDeposit: Balance = 8 * Dollars; //0.0000000000125 USD
INTR Config based on Dollar, this
pub const ConfigDepositBase: Balance = 315 * Dollars; // if 1 INTR -> 0.0159 USD, this is equivalent to 5 Dollars
pub const FriendDepositFactor: Balance = 31 * Dollars; //this is equivalent to 0.5 Dollars
pub const MaxFriends: u16 = 9;
pub const RecoveryDeposit: Balance = 6300 * Dollars; // equivalent to 100 dollars, I recommend setting a larger value for the RecoveryDeposit compared to the ConfigDepositBase.
// While many para chains set the RecoveryDeposit equal to the ConfigDepositBase, I suggest using a higher amount, 100 Dollars.
// By increasing the RecoveryDeposit, we can ensure a more robust recovery process and mitigate the risk of unauthorized or malicious recoveries based on game theory.
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.
Note: Polkadot yet not have added the recovery pallet into the runtime.
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.
That makes sense to me!
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.
Aren't those values very very high? We require 250 vINTR for governance proposals and these would require a lot more INTR to actually use this feature. So only very few people could use this.
What's the downside of setting this to much lower values so that you could set this up with say max 500 INTR?
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.
@nud3l, I agree that we can reduce the value of ConfigDepositBase
to 100 INTR to make it more accessible. However, it is important to keep the RecoveryDeposit
at a sufficiently high level. This is because the RecoveryDeposit
amount is refunded if the recovery process is successful.
If we set the RecoveryDeposit
value too low, there is a risk that a malicious rescuer could attempt to recover the account, and if the account holder cancels the recovery process, the malicious rescuer would only lose a minimal amount due to the low RecoveryDeposit
value.
It's worth noting that the RecoveryDeposit
only needs to be reserved if the account recovery process is on and not when setting up the account recovery.
Done |
I'm in favor of including the pallet. @nakul1010 @gregdhill do you know other projects having a UI for this? I do think the security deposits are too aggressive though for the feature to be useful. Left an extra comment there so we can discuss. |
I couldn't find any team that has a dedicated user interface specifically for this pallet. However, you can find the flow documentation for the process on Polkadot's document website here. |
Ok, let me ask if somebody has already implemented a UI for this. |
@gregdhill updated parameters based on the comment. |
Closes #736
The Recovery Pallet in Substrate is a social recovery tool that allows users to regain account access through trusted friends' approval. It offers customizable configurations, safeguards, and efficient computational performance.
Key Points
For more detailed information, refer to the Substrate documentation on Pallet Recovery.
Note: To enhance the adoption of the pallet among Interlay users, the implementation of a dedicated web app page is essential.