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

Update vesting documentation #170

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ L2_VESTING_WALLET_OWNER_ADDRESS=0x394Ae9d48eeca1C69a989B5A8C787081595c55A7
L2_AIRDROP_OWNER_ADDRESS=0x394Ae9d48eeca1C69a989B5A8C787081595c55A7

# Airdrop wallet address where LSK tokens are transferred to after airdrop period ends
L2_AIRDROP_WALLET_ADDRESS=0x38eA61E8084E27a087cF5CdBC3f22584f18773e6
L2_AIRDROP_WALLET_ADDRESS=0x0c92121A7C15cF01041e1122483Bc173Baccd877

# Salt for deterministic smart contract address generation
DETERMINISTIC_ADDRESS_SALT="lisk_l2_token_deterministic_salt"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ broadcast/
slither-results.json

# Devnet deployment files
deployment/devnet/
deployment/artifacts/contracts/devnet/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ You may find the addresses of the deployed smart contracts (including vesting wa

| Name | Proxy | Implementation |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [`L2Airdrop`](src/L2/L2Airdrop.sol) | - | [0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC) |
| [`L2Claim`](src/L2/L2Claim.sol) | [0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994](https://blockscout.lisk.com/address/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994) | [0x60790Dc2d45BaA8B36282889569BbB301F4D0c41](https://blockscout.lisk.com/address/0x60790Dc2d45BaA8B36282889569BbB301F4D0c41) |
| [`L2Governor`](src/L2/L2Governor.sol) | [0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568](https://blockscout.lisk.com/address/0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568) | [0x18a0b8c653c291D69F21A6Ef9a1000335F71618e](https://blockscout.lisk.com/address/0x18a0b8c653c291D69F21A6Ef9a1000335F71618e) |
| [`L2LiskToken`](src/L2/L2LiskToken.sol) | - | [0xac485391EB2d7D88253a7F1eF18C37f4242D1A24](https://blockscout.lisk.com/address/0xac485391EB2d7D88253a7F1eF18C37f4242D1A24) |
Expand Down
1 change: 1 addition & 0 deletions deployment/addresses/mainnet/addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Below are the addresses of the deployed smart contracts on the Ethereum and Lisk

| Name | Address |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [`L2Airdrop`](../../../src/L2/L2Airdrop.sol) | [0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC) |
| [`L2Claim`](../../../src/L2/L2Claim.sol) | [0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994](https://blockscout.lisk.com/address/0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994) |
| [`L2ClaimImplementation`](../../../src/L2/L2Claim.sol) | [0x60790Dc2d45BaA8B36282889569BbB301F4D0c41](https://blockscout.lisk.com/address/0x60790Dc2d45BaA8B36282889569BbB301F4D0c41) |
| [`L2Governor`](../../../src/L2/L2Governor.sol) | [0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568](https://blockscout.lisk.com/address/0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568) |
Expand Down
1 change: 1 addition & 0 deletions deployment/addresses/sepolia/addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Below are the addresses of the deployed smart contracts on the Ethereum and Lisk

| Name | Address |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [`L2Airdrop`](../../../src/L2/L2Airdrop.sol) | [0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a](https://sepolia-blockscout.lisk.com/address/0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a) |
| [`L2ClaimContract`](../../../src/L2/L2Claim.sol) | [0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94](https://sepolia-blockscout.lisk.com/address/0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94) |
| [`L2ClaimImplementation`](../../../src/L2/L2Claim.sol) | [0xAE4A95E412d7d669AbE6bB23031Ae0250B832710](https://sepolia-blockscout.lisk.com/address/0xAE4A95E412d7d669AbE6bB23031Ae0250B832710) |
| [`L2Governor`](../../../src/L2/L2Governor.sol) | [0xf9181aaD773d423A2cc0155Cb4263E563D51B467](https://sepolia-blockscout.lisk.com/address/0xf9181aaD773d423A2cc0155Cb4263E563D51B467) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"L2Airdrop": "0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC",
"L2ClaimContract": "0xD7BE2Fd98BfD64c1dfCf6c013fC593eF09219994",
"L2ClaimImplementation": "0x60790Dc2d45BaA8B36282889569BbB301F4D0c41",
"L2Governor": "0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"L2Airdrop": "0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a",
"L2ClaimContract": "0x3D4190b08E3E30183f5AdE3A116f2534Ee3a4f94",
"L2ClaimImplementation": "0xAE4A95E412d7d669AbE6bB23031Ae0250B832710",
"L2Governor": "0xf9181aaD773d423A2cc0155Cb4263E563D51B467",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ This folder contains the following documents essential for understanding the dep
4. [Vesting Documentation](./vesting.md): This page explains the technical details concerning implementation, deployment and maintenance of vesting smart contracts that hold LSK tokens and release them according to predefined schedules.

5. [Migration Airdrop Documentation](./airdrop.md): This page explains the technical details concerning design and lifecycle of the migration airdrop smart contract that distributes LSK tokens as a reward to the users that migrated from the Lisk L1 network.

6. [Staking and Lisk DAO Documentation](./staking-governance.md): This page explains the technical details concerning Staking and Lisk DAO. The two topics are combined in one document as they are strongly linked to each other.
Binary file modified documentation/diagrams/delegating.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions documentation/privilege-roles-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ There are also additional actions that require the `owner` role, like setting a

The following are the privilege roles that are defined in the smart contracts:

- `owner`: The account that owns the contract. This account has the highest level of privilege and can perform all critical operations like upgrading the contract, setting DAO treasury address, setting emergency exit, etc. The owner of deployed smart contracts is a `Security council`. This is a multisignature account that requires the approval of the majority of the members to perform any operation. The multisignature account is controlled by different parties, which ensures that no single party has full control over the contract. Smart contract which have the `owner` role defined are [L1LiskToken](../src/L1/L1LiskToken.sol), [L1VestingWallet](../src/L1/L1VestingWallet.sol), [L2Airdrop](../src/L2/L2Airdrop.sol), [L2Claim](../src/L2/L2Claim.sol), [L2Governor](../src/L2/L2Governor.sol), [L2LockingPosition](../src/L2/L2LockingPosition.sol), [L2Reward](../src/L2/L2Reward.sol), [L2Staking](../src/L2/L2Staking.sol), [L2VestingWallet](../src/L2/L2VestingWallet.sol) and [L2VotingPower](../src/L2/L2VotingPower.sol).
- `owner`: The account that owns the contract. This account has the highest level of privilege and can perform all critical operations like upgrading the contract, setting DAO treasury address, setting emergency exit, etc. The owner of deployed smart contracts is a `Security council`. This is a multisignature account that requires the approval of the majority of the members to perform any operation. The multisignature account is controlled by different parties, which ensures that no single party has full control over the contract. Smart contract which have the `owner` role defined are [L1LiskToken](../src/L1/L1LiskToken.sol), [L1VestingWallet](../src/L1/L1VestingWallet.sol), [L2Airdrop](../src/L2/L2Airdrop.sol), [L2Claim](../src/L2/L2Claim.sol), [L2Governor](../src/L2/L2Governor.sol), [L2LockingPosition](../src/L2/L2LockingPosition.sol), [L2Reward](../src/L2/L2Reward.sol), [L2Staking](../src/L2/L2Staking.sol), [L2VestingWallet](../src/L2/L2VestingWallet.sol) and [L2VotingPower](../src/L2/L2VotingPower.sol), however in cases of [L1VestingWallet](../src/L1/L1VestingWallet.sol) and [L2VestingWallet](../src/L2/L2VestingWallet.sol) the `owner` does not have the authority to upgrade the smart contract (see `admin` role below).
- `burner`: The account that is allowed to burn LSK tokens. This role is defined in the [L1LiskToken](../src/L1/L1LiskToken.sol) smart contract.
- `creator`: The accounts (smart contracts) which are allowed to lock LSK tokens and manipulate with them on behalf of the users inside [L2StakingContract](../src/L2/L2Staking.sol) smart contract. It is expected that only one smart contract will be allowed to be a `creator` ([L2Reward](../src/L2/L2Reward.sol)) but in principle, there can be multiple `creators`. A security assumption is that the `creator` is a trusted smart contract that will not misuse the locked LSK tokens. This role is defined in the [L2Staking](../src/L2/L2Staking.sol) smart contract.
- `admin`: A special role existing exclusively for [L1VestingWallet](../src/L1/L1VestingWallet.sol) and [L2VestingWallet](../src/L2/L2VestingWallet.sol) smart contracts. For technical reasons, `admin` plays the role of `owner` for vesting wallets and is the only role that can upgrade the vesting wallet smart contracts.

## Smart Contracts and Their Privilege Roles

Expand All @@ -23,12 +24,12 @@ The following are the smart contracts that have privilege roles defined in their
- [L1LiskToken.sol](../src/L1/L1LiskToken.sol): This contract has the `owner` and `burner` roles defined. The `owner` role is required to add or remove the `burner` role to and from an account:
- `addBurner`: Assigns the `burner` role to an account.
- `renounceBurner`: Removes the `burner` role from an account.

The `burner` role is required to burn LSK tokens:
- `burn`: Burns LSK tokens from the caller's account.
- `burnFrom`: Burns LSK tokens from another account, deducting from the caller's allowance.

- [L1VestingWallet.sol](../src/L1/L1VestingWallet.sol): This contract has the `owner` role defined. The `owner` role is required to upgrade the contract.
- [L1VestingWallet.sol](../src/L1/L1VestingWallet.sol): This contract has the `owner` and `admin` roles defined. The `owner` does not have special authority and serves as the beneficiary of the vesting wallet. The `admin` role is required to upgrade the contract.

- [L2Airdrop.sol](../src/L2/L2Airdrop.sol): This contract has the `owner` role defined. The `owner` role is authorized to set the Merkle root to commence the airdrop period and transfer unclaimed airdrop LSK tokens to a designated airdrop wallet once the airdrop period concludes:
- `setMerkleRoot`: Sets the Merkle root to commence the airdrop period.
Expand Down Expand Up @@ -65,15 +66,15 @@ The following are the smart contracts that have privilege roles defined in their
- `pauseRemainingLockingDuration`: Pauses the countdown of the remaining locking duration of the given locking position.
- `resumeCountdown`: Resumes the remaining locking duration of the given locking position.

- [L2VestingWallet.sol](../src/L2/L2VestingWallet.sol): This contract has the `owner` role defined. The `owner` role is required to upgrade the contract.
- [L2VestingWallet.sol](../src/L2/L2VestingWallet.sol): This contract has the `owner` and `admin` roles defined. The `owner` does not have special authority and serves as the beneficiary of the vesting wallet. The `admin` role is required to upgrade the contract.

- [L2VotingPower.sol](../src/L2/L2VotingPower.sol): This contract has the `owner` role defined. The `owner` role is required to upgrade the contract.

## Operations and Their Required Roles

The following are the operations that are defined in the smart contracts and the roles that are required to perform them:

- `Upgrade Smart Contract`: The `owner` role is required to upgrade the contract code to a new version.
- `Upgrade Smart Contract`: The `owner` role is required to upgrade the contract code to a new version (`admin` role is required for [L1VestingWallet](../src/L1/L1VestingWallet.sol) and [L2VestingWallet](../src/L2/L2VestingWallet.sol) smart contracts).
- `Set DAO Treasury Address`: The `owner` role is required to set the DAO treasury address inside the contract.
- `Set Address to Another Contract`: The `owner` role is required to set the address of another contract inside the contract.
- `Set Merkle Root`: The `owner` role is required to set the Merkle root inside the [L2Airdrop](../src/L2/L2Airdrop.sol) smart contract.
Expand Down
Loading
Loading