From 59944e4ad08e2f627581ea732dddd5d87f7536d6 Mon Sep 17 00:00:00 2001 From: jelle Date: Wed, 22 May 2024 14:49:56 +0200 Subject: [PATCH 1/3] update2 --- docs/deposits-and-withdrawals.md | 2 +- docs/parameters.md | 101 +++++++++++++++++-------------- 2 files changed, 58 insertions(+), 45 deletions(-) diff --git a/docs/deposits-and-withdrawals.md b/docs/deposits-and-withdrawals.md index c6d3b792..7bc3cdde 100644 --- a/docs/deposits-and-withdrawals.md +++ b/docs/deposits-and-withdrawals.md @@ -1,5 +1,5 @@ -# Deposists and Withdrawals +# Deposits and Withdrawals Hats finance provides crowd-sourced bug bounties. Parties that are interested in helping protect a project can deposit funds in the Vault. diff --git a/docs/parameters.md b/docs/parameters.md index 4d70b372..241044ab 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -1,48 +1,61 @@ ## Parameters - | parameter name | owner| scope | default | limits | setter | comments | +The following parameters are settable in the protocol. The various roles are described [here](roles.md) + + +By default, all the these roles, except the `committee`, are assigned to the Hats DAO, which controls some of these settings directly, and others through a timelock [HatTimelockController.sol](../../contracts/HatTimelockController.sol) + + + | parameter name | description | owner| scope | default | limits | setter | |---|---|---|---|---|---|---| -| `HAT` | `registry.owner` | global | - | `registry.setSwapToken` | the token for which bounties for HAts will be traded -| `isEmergencyPaused` | `registry.owner`| global | false | | `setEmergencyPaused` | -| `defaultBountyGovernanceHAT` | `registry.owner`| global | | +defaultBountyHackerHatVested <= 20% | `registry.setDefaultHATBountySplit` | -| `bountyGovernanceHAT` | `registry.owner`| vault | | +bountyHackerHatVested <= 20% | `vault.setHATBountySplit` | -| `defaultBountyHackerHATVested` | `registry.owner`| global | | +defaultBountyGovernanceHAT <= 20% | `registry.setDefaultHATBountySplit` | -| `bountyHackerHATVested`| `registry.owner` | vault | | +bountyGovernanceHAT <= 20% | `vault.setHATBountySplit` | -| `defaultArbitrator` | `registry.owner` | global | registry.owner | | `registry.setDefaultArbitrator` | -| `arbitrator` | `registry.owner`| vault | | | `vault.setArbitrator` | -| `defaultChallengePeriod` | `registry.owner`| global | 3 days | >= 1 days, <= 5 days | `registry.setDefaultChallengePeriod` | -| `challengePeriod` | `registry.owner`| vault | 3 days | >= 1 days, <= 5 days | `vault.setChallengePeriod` | -| `defaultChallengeTimeOutPeriod` | `registry.owner`| global | 5 weeks | >= 2 days, <= 85 days | `registry.setDefaultChallengeTimeOutPeriod` | -| `challengeTimeOutPeriod` | `registry.owner`| vault | 5 weeks | >= 2 days, <= 85 days | `vault.setChallengeTimeOutPeriod` | -| `arbitratorCanChangeBounty` | `registry.owner`| vault | | | `vault.setArbitratorOptions` | -| `arbitratorCanChangeBeneficiary` | `registry.owner`| vault | | | `vault.setArbitratorOptions` | -| `arbitratorCanSubmitClaims` | `registry.owner`| vault | | | `vault.setArbitratorOptions` | -| `isVaultVisible` | `registry.owner`| vault | false | | `registry.setVaultVisibility(_vault, _visible)` | -| `feeSetter` | `registry.owner`| global |zero address | | `registry.setFeeSetter` | -| `withdrawRequestPendingPeriod` | `registry.owner`| global | 7 days | <= 90 days | `registry.setWithdrawRequestParams` | -| `withdrawRequestEnablePeriod` | `registry.owner`| global | 7 days | >= 6 hours, <= 100 days | `registry.setWithdrawRequestParams` | -| `claimFee` | `registry.owner`| global | 0 | - | `registry.setClaimFee` | -| `withdrawPeriod` | `registry.owner`| global | 11 hours | >= 1 hours | `registry.setWithdrawSafetyPeriod` | -| `safetyPeriod` | `registry.owner`| global | 1 hours | <= 6 hours | `registry.setWithdrawSafetyPeriod` | -| `hatVestingDuration` | `registry.owner`| global | 90 days | < 180 days | `registry.setHatVestingParams` | -| `hatVestingPeriods` | `registry.owner`| global | 90 | > 0, <= hatVestingDuration | `registry.setHatVestingParams` | -| `setMaxBountyDelay` | `registry.owner`| global | 2 days | >= 2 days | `registry.setMaxBountyDelay` | -| `rewardController` | `registry.owner`| vault | | | `vault.addRewardController` | noActiveClaim | -|registry.`owner` | `registry.owner`| global | _hatGovernance | | `registry.transferOwnership`, `registry.renounceOwnership` | -| `vaultDescription` | `registry.owner`| vault | | | `vault.setVaultDescription` | only an event | -| `feeSetter` | `withdrawalFee`| `feeSetter` | vault | 0 | <= 2% | `vault.setWithdrawalFee` | -| `committee` | | `vault.owner` vault | | | `vault.setCommittee` | if committee has not checked in yet | -| `vestingPeriods` | `vault.owner` | vault | | > 0 | `vault.setVestingParams` | -| `vestingDuration` | `vault.owner` | vault | | <= 120 days, > `vestingPeriods` | `vault.setVestingParams` | -| `bountySplit.hacker` | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | -| `bountySplit.hackerVested` | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | -| `bountySplit.committee` | `vault.owner` | vault | | sum(bountySplit) = 100%, max 10% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | -| `maxBounty` | `vault.owner` | vault | | <= 90% | `vault.setPendingMaxBounty`, `vault.setMaxBounty` | noActiveClaim | -| `depositPause` | `vault.owner` | vault | | | `vault.setDepositPause` | -| `owner` | `vault.owner` | vault | _hatGovernance | | `vault.transferOwnership`, `vault.renounceOwnership` | -| `committee` | `vault.committee` | vault | | | `vault.setCommittee` | after `committeeCheckIn` | -| `committeeCheckedIn` | `vault.committee` | vault | | | `vault.committeeCheckIn()` | -| vault's `allocPoint` | `rewardController.owner` | vault | 0 | | `rewardController.setAllocPoint(_vault, _allocPoint)` | -| `epochRewardPerBlock` | `rewardController.owner` | global | | | `rewardController.setEpochRewardPerBlock` | -| `rewardController.owner` | `rewardController.owner` | global | | | `rewardController.transferOwnership`, `rewardController.renounceOwnership` | +| **PROTOCOL SETTINGS** | +|registry.`owner` | | `registry.owner`| global | _hatGovernance | | `registry.transferOwnership`, `registry.renounceOwnership` | +| `HAT` | the token for which bounties will be traded | `registry.owner` | global | | | `registry.setSwapToken` +| `isEmergencyPaused` | | `registry.owner`| global | false | | `setEmergencyPaused` | +| `setMaxBountyDelay` |time that must pass to change to max bounty |`registry.owner`| global | 2 days | >= 2 days | `registry.setMaxBountyDelay` | +| **VAULT CONFIGURATION** | +| `owner` | controls certain vault settings | `vault.owner` | vault | | | | `vault.transferOwnership`, `vault.renounceOwnership` | +| `committee` | proposes payouts |`vault.committee` | vault | || `vault.setCommittee` | after `committeeCheckIn` | +| `isVaultVisible` | | `registry.owner`| vault | false | | `registry.setVaultVisibility(_vault, _visible)` | +| `vaultDescription` | | `registry.owner`| vault | | | `vault.setVaultDescription` | only an event | + `depositPause` | pause deposits in the vault | `vault.owner` | vault | | | `vault.setDepositPause` | +| **WITHDRAWAL** | +| `withdrawalFee` | | `feeSetter` |vault | 0 | <= 2% | `vault.setWithdrawalFee` +| `feeSetter` |sets the withdrawal fee | `registry.owner`| global |zero address | | `registry.setFeeSetter` | +| `withdrawPeriod` | period during which users can withdraw funds [more info](deposits-and-withdrawals.md##Withdrawal) | `registry.owner`| global | 11 hours | >= 1 hours | `registry.setWithdrawSafetyPeriod` | +| `safetyPeriod` | period during which a vault is locked for withdrawals | `registry.owner`| global | 1 hours | <= 6 hours | `registry.setWithdrawSafetyPeriod` | +| `withdrawRequestPendingPeriod`| period between withdraw request and withdrawal ([more info](deposits-and-withdrawals.md##Withdrawal)) | `registry.owner`| global | 7 days | <= 90 days | `registry.setWithdrawRequestParams` | +| `withdrawRequestEnablePeriod`| | `registry.owner`| global | 7 days | >= 6 hours, <= 100 days | `registry.setWithdrawRequestParams` | +| **SUBMISSION** | + `claimFee` | fee to be paid when submitting a claim | `registry.owner`| global | 0 | - | `registry.setClaimFee` | +| **PAYOUT** see [payout](payout.md) for details| +| `committee` | arbitrates claims and initiates payouts |`vault.owner` | vault | ||`vault.setCommittee` (only if committee has not checked in yet) | +| `committeeCheckedIn` | |`vault.committee` | vault | | | `vault.committeeCheckIn()` | +| `maxBounty` |maximum amountthat can be paid out for a claim| `vault.owner` | vault | | <= 90% | `vault.setPendingMaxBounty`, `vault.setMaxBounty` | noActiveClaim | +| `bountySplit.hacker` | part of the payout that goes directly to the submitter | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | +| `bountyHackerHATVested`| part of the payout that is converted to HATs and vested to the user|`registry.owner` | vault | | +bountyGovernanceHAT <= 20% | `vault.setHATBountySplit` | +| `defaultBountyHackerHATVested` | protocol-level default value | `registry.owner`| global | | +defaultBountyGovernanceHAT <= 20% | `registry.setDefaultHATBountySplit` | +| `bountySplit.hackerVested` | part | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | +| `bountyGovernanceHAT` | percentage of the payout that goes to HATs governance |`registry.owner`| vault | | +bountyHackerHatVested <= 20% | `vault.setHATBountySplit` | +| `defaultBountyGovernanceHAT` | protocol-level default value| `registry.owner`| global | | +defaultBountyHackerHatVested <= 20% | `registry.setDefaultHATBountySplit` | +| `bountySplit.committee` | part of the payout that goes to the committee| `vault.owner` | vault | | sum(bountySplit) = 100%, max 10% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | +| `hatVestingDuration` | | `registry.owner`| global | 90 days | < 180 days | `registry.setHatVestingParams` | +| `hatVestingPeriods` ||`registry.owner`| global | 90 | > 0, <= hatVestingDuration | `registry.setHatVestingParams` | +| `vestingPeriods` || `vault.owner` | vault | | > 0 | `vault.setVestingParams` | +| `vestingDuration` || `vault.owner` | vault ||<= 120 days, > `vestingPeriods` | [`vault.setVestingParams`](./dodoc/interfaces/IHATClaimsManager.md#setvestingparams) | +| **ARBITRATION** | +| `arbitrator` | contract responsible for arbitration in case of conflicts |`registry.owner`| vault | `defaultArbitrator` | | `vault.setArbitrator` | +| `defaultArbitrator` | | `registry.owner` | global | registry.owner | | `registry.setDefaultArbitrator` | +| `challengePeriod` | |`registry.owner`| vault | 3 days (defaultChallengePeriod) | >= 1 days, <= 5 days | `vault.setChallengePeriod` | +| `defaultChallengePeriod` || `registry.owner`| global | 3 days | >= 1 days, <= 5 days | `registry.setDefaultChallengePeriod` | +| `challengeTimeOutPeriod` | |`registry.owner`| vault | 5 weeks | >= 2 days, <= 85 days | `vault.setChallengeTimeOutPeriod` | +| `defaultChallengeTimeOutPeriod` || `registry.owner`| global | 5 weeks | >= 2 days, <= 85 days | `registry.setDefaultChallengeTimeOutPeriod` | +| `arbitratorCanChangeBounty` | |`registry.owner`| vault | | | `vault.setArbitratorOptions` | +| `arbitratorCanChangeBeneficiary` || `registry.owner`| vault | | | `vault.setArbitratorOptions` | +| `arbitratorCanSubmitClaims` | |`registry.owner`| vault | | | `vault.setArbitratorOptions` | +| **INCENTIVES**| +| `rewardController` || `registry.owner`| vault | | | `vault.addRewardController` | noActiveClaim | +| vault's `allocPoint` ||`rewardController.owner` | vault | 0 | | `rewardController.setAllocPoint(_vault, _allocPoint)` | +| `rewardController.owner` || `rewardController.owner` | global | | | `rewardController.transferOwnership`, `rewardController.renounceOwnership` | +| `epochRewardPerBlock` || `rewardController.owner` | global | | | `rewardController.setEpochRewardPerBlock` | From 7f9a15565483e9d372618f53ad93e798b15723e3 Mon Sep 17 00:00:00 2001 From: jelle Date: Fri, 31 May 2024 14:26:28 +0200 Subject: [PATCH 2/3] doc change --- docs/parameters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/parameters.md b/docs/parameters.md index 241044ab..c90d2a6f 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -28,7 +28,7 @@ By default, all the these roles, except the `committee`, are assigned to the Hat | `withdrawRequestEnablePeriod`| | `registry.owner`| global | 7 days | >= 6 hours, <= 100 days | `registry.setWithdrawRequestParams` | | **SUBMISSION** | `claimFee` | fee to be paid when submitting a claim | `registry.owner`| global | 0 | - | `registry.setClaimFee` | -| **PAYOUT** see [payout](payout.md) for details| +| **PAYOUT** see [payout](payout.md) for details|| | | `committee` | arbitrates claims and initiates payouts |`vault.owner` | vault | ||`vault.setCommittee` (only if committee has not checked in yet) | | `committeeCheckedIn` | |`vault.committee` | vault | | | `vault.committeeCheckIn()` | | `maxBounty` |maximum amountthat can be paid out for a claim| `vault.owner` | vault | | <= 90% | `vault.setPendingMaxBounty`, `vault.setMaxBounty` | noActiveClaim | From be2e764e139df608bc31daec11749e9b14762b6d Mon Sep 17 00:00:00 2001 From: jelle Date: Thu, 4 Jul 2024 12:09:51 +0200 Subject: [PATCH 3/3] update doc --- docs/parameters.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/parameters.md b/docs/parameters.md index c90d2a6f..bd1bf92c 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -33,11 +33,11 @@ By default, all the these roles, except the `committee`, are assigned to the Hat | `committeeCheckedIn` | |`vault.committee` | vault | | | `vault.committeeCheckIn()` | | `maxBounty` |maximum amountthat can be paid out for a claim| `vault.owner` | vault | | <= 90% | `vault.setPendingMaxBounty`, `vault.setMaxBounty` | noActiveClaim | | `bountySplit.hacker` | part of the payout that goes directly to the submitter | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | -| `bountyHackerHATVested`| part of the payout that is converted to HATs and vested to the user|`registry.owner` | vault | | +bountyGovernanceHAT <= 20% | `vault.setHATBountySplit` | -| `defaultBountyHackerHATVested` | protocol-level default value | `registry.owner`| global | | +defaultBountyGovernanceHAT <= 20% | `registry.setDefaultHATBountySplit` | +| `bountyHackerHATVested`| part of the payout that is converted to HATs and vested to the user|`registry.owner` | vault | | +bountyGovernanceHAT <= 35% | `vault.setHATBountySplit` | +| `defaultBountyHackerHATVested` | protocol-level default value | `registry.owner`| global | | +defaultBountyGovernanceHAT <= 35% | `registry.setDefaultHATBountySplit` | | `bountySplit.hackerVested` | part | `vault.owner` | vault | | sum(bountySplit) = 100% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | -| `bountyGovernanceHAT` | percentage of the payout that goes to HATs governance |`registry.owner`| vault | | +bountyHackerHatVested <= 20% | `vault.setHATBountySplit` | -| `defaultBountyGovernanceHAT` | protocol-level default value| `registry.owner`| global | | +defaultBountyHackerHatVested <= 20% | `registry.setDefaultHATBountySplit` | +| `bountyGovernanceHAT` | percentage of the payout that goes to HATs governance |`registry.owner`| vault | | +bountyHackerHatVested <= 35% | `vault.setHATBountySplit` | +| `defaultBountyGovernanceHAT` | protocol-level default value| `registry.owner`| global | | +defaultBountyHackerHatVested <= 35% | `registry.setDefaultHATBountySplit` | | `bountySplit.committee` | part of the payout that goes to the committee| `vault.owner` | vault | | sum(bountySplit) = 100%, max 10% | `vault.setBountySplit` | noActiveClaim noSafetyPeriod | | `hatVestingDuration` | | `registry.owner`| global | 90 days | < 180 days | `registry.setHatVestingParams` | | `hatVestingPeriods` ||`registry.owner`| global | 90 | > 0, <= hatVestingDuration | `registry.setHatVestingParams` |