-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,61 @@ | ||
# Proxy DReps | ||
|
||
A validator to provide hot/cold account management to DReps. The scripts provides an authentication mecanism around an administrator multisig script (m-of-n type), itself granting powers to two sub-scripts to manage stake in two contexts: | ||
<p align="center"> | ||
<img width="500" src=".github/logo.png" /> | ||
<p align="center"> | ||
<a href="https://github.com/CardanoSolutions/zhuli/releases"><img src="https://img.shields.io/github/release/CardanoSolutions/zhuli?style=for-the-badge" /></a> | ||
<a href="https://github.com/CardanoSolutions/zhuli/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/actions/workflow/status/CardanoSolutions/zhuli/continuous-integration.yml?style=for-the-badge" /></a> | ||
<a href="https://github.com/CardanoSolutions/zhuli/blob/main/LICENSE"><img src="https://img.shields.io/github/license/CardanoSolutions/zhuli?style=for-the-badge" /></a> | ||
</p> | ||
</p> | ||
|
||
- For block-production; or specifically delegation to stake pools and withdrawal of rewards. | ||
- For governance; or specifically voting on governance action and management of DReps metadata. | ||
## Overview | ||
|
||
This is achieved through the use of receipt tokens that are minted alongside the publication of certificates. The minting (resp. burning) of those tokens is tied to the registration (resp. unregistration) of their corresponding certificates. | ||
A validator & companion comman-line tool to provide hot/cold account management to delegate representatives (a.k.a DReps) on Cardano. The on-chain validator provides an authentication mecanism for an administrator multisig script (m-of-n type), itself granting powers to multisig-like delegate to manage voting stake rights. | ||
|
||
### Features | ||
|
||
- [x] Fixed DRep ID for unlimited delegates, entirely defined by the administrator configuration. | ||
- [x] Delegation of voting rights as a single transaction. | ||
- [x] Revokation of a delegate as a single transaction. | ||
- [x] Revokation & redelegation possible as a single transaction. | ||
- [x] No datum, the state is fully captured in minted assets trapped in the validator. | ||
|
||
### Todo | ||
|
||
- [ ] Extend the setup to also support a second type of delegate for block production rights. | ||
|
||
## Configuration | ||
|
||
The validator itself is bound to a particular administrator which can be configured directly in the `aiken.toml`. | ||
The administrator script can be configured direction in the `aiken.toml` as follows: | ||
|
||
```toml | ||
[config.default] | ||
threshold = 1 # How many administrors signatories are required to approve actions | ||
quorum = 1 # How many administrors signatories are required to approve actions | ||
|
||
# List of administators (verification key hashes) | ||
[[config.default.administrators]] | ||
bytes = "00000000000000000000000000000000000000000000000000000000" | ||
bytes = "000000000000000000000000000000000000000000000000000a11ce" | ||
encoding = "base16" | ||
|
||
[[config.default.administrators]] | ||
bytes = "00000000000000000000000000000000000000000000000000000001" | ||
bytes = "00000000000000000000000000000000000000000000000000000b0b" | ||
encoding = "base16" | ||
``` | ||
|
||
> [!TIP] | ||
> Different keys can be configured for different environments. Instead of `default`, use whatever environment name suits you and re-compile the contract accordingly using aiken's cli. For example, you can define custom keys for an environment `foo` as: | ||
> | ||
> ```toml | ||
> [config.foo] | ||
> quorum = 1 | ||
> | ||
> [[config.foo.administrators]] | ||
> bytes = "0000000000000000000000000000000000000000000000000000f00" | ||
> encoding = "base16" | ||
> ``` | ||
> | ||
> Then, using `aiken`, simply do: | ||
> | ||
> ``` | ||
> aiken build --env foo | ||
> ``` |