Skip to content

Commit

Permalink
Merge pull request #451 from consensusnetworks/develop
Browse files Browse the repository at this point in the history
Promote develop to master
  • Loading branch information
shanejearley authored Nov 21, 2023
2 parents 338c1a7 + 84aef1a commit 6564b0b
Show file tree
Hide file tree
Showing 215 changed files with 9,801 additions and 5,835 deletions.
17 changes: 12 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@
"@typescript-eslint"
],
"rules": {
"indent": ["error", 4],
"semi": ["error", "never"],
"vue/multi-word-component-names": "off",
"quotes": ["error", "single"]
"quotes": ["error", "double"],
"max-len": ["error", { "code": 120, "ignoreStrings": true, "comments": 300, "ignoreTemplateLiterals": true }],
"space-before-blocks": ["error", "always"],
"object-curly-spacing": ["error", "always"],
"space-in-parens": ["error", "never"],
"keyword-spacing": ["error", { "before": true, "after": true }]
},
"ignorePatterns": [
"lib",
"cdk.out",
"*.js"
"**/node_modules/**",
"**/build/**",
"**/dist/**",
"**/lib/**",
"cdk.out"
]
}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
[submodule "services/oracle/lib/dkg"]
path = services/oracle/lib/dkg
url = https://github.com/consensusnetworks/ssv-dkg.git
branch = feature/operator-env
branch = update/makefile
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"css.lint.unknownAtRules": "ignore",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"vue",
"typescript"
],
"[html]": {
"editor.defaultFormatter": "Vue.volar"
},
Expand All @@ -14,10 +19,5 @@
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"eslint.validate": [
"vue",
"typescript"
],
"css.lint.unknownAtRules": "ignore",
"volar.inlayHints.eventArgumentInInlineHandlers": false
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ Test the Ethereum contracts.

```zsh
# From the root directory
npm run test:ethereum
npm run test --workspace @casimir/ethereum
```

Deploy the Ethereum contracts to local network and simulate events and oracle handling.
Fork the Ethereum contracts to local network and simulate events and oracle handling.

```zsh
# From the root directory
npm run dev:ethereum
npm run dev --workspace @casimir/ethereum
```

See the [@casimir/ethereum README.md](contracts/ethereum/README.md) for detailed documentation.
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/scripts/docgen.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import fs from 'fs'
import { run } from '@casimir/shell'
import fs from "fs"
import { run } from "@casimir/shell"

void async function () {
const referenceDir = `${process.cwd()}/src/reference`
const solidityTemplateDir = `${process.cwd()}/templates/solidity`
await run(`DOCS_OUTPUT_DIR=${referenceDir} DOCS_TEMPLATE_DIR=${solidityTemplateDir} npm run docgen --workspace @casimir/ethereum`)

const casimirOperatorReadmeUrl = 'https://raw.githubusercontent.com/consensusnetworks/casimir-operator/master/README.md'
const casimirOperatorReadmeUrl = "https://raw.githubusercontent.com/consensusnetworks/casimir-operator/master/README.md"
const casimirOperatorReadme = await fetch(casimirOperatorReadmeUrl)
const casimirOperatorReadmeText = await casimirOperatorReadme.text()

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/templates/solidity/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function notInternal(visibility: string) {
return visibility !== 'internal'
return visibility !== "internal"
}
34 changes: 34 additions & 0 deletions apps/landing/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:@typescript-eslint/recommended",
"@vue/eslint-config-typescript"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"ecmaVersion": "latest",
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"plugins": [
"vue",
"@typescript-eslint"
],
"rules": {
"max-len": ["error", { "code": 200, "ignoreStrings": true, "comments":300, "ignoreTemplateLiterals": true }],
"vue/multi-word-component-names": "off",
},
"ignorePatterns": [
"**/node_modules/**",
"**/build/**",
"**/dist/**",
"**/lib/**",
"cdk.out"
]
}
Binary file removed apps/landing/.parcel-cache/444ef4bdec166956
Binary file not shown.
Binary file removed apps/landing/.parcel-cache/data.mdb
Binary file not shown.
Binary file removed apps/landing/.parcel-cache/lock.mdb
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/landing/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
// Initalize blog here for least amount of fetch calls
import useBlog from '@/composables/blog'
import useBlog from "@/composables/blog"
useBlog()
</script>

Expand Down
106 changes: 53 additions & 53 deletions apps/landing/src/composables/QuestionsAndAnswers.ts
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
import { onMounted, onUnmounted, readonly, ref } from 'vue'
import { onMounted, onUnmounted, readonly, ref } from "vue"

const initializeComposable = ref(false)

const questionsAndAnswers = ref([
{
question: 'What’s the minimum I can stake?',
answer: 'There is no minimum! However, there is a point at which gas fees make very small amounts staked not worth it.',
link: ''
question: "What’s the minimum I can stake?",
answer: "There is no minimum! However, there is a point at which gas fees make very small amounts staked not worth it.",
link: ""
},
{
question: 'How are rewards generated?',
answer: 'Rewards are generated natively on the Ethereum beacon chain as if you were solo staking. Casimir pools users’ ETH into 32 ETH pools and builds a validator group of 4 operators using Distributed Validator Technology. Rewards are distributed to the users’ proportionate to their share of the 32 ETH in the pool. More information on how staking works here. Additionally, MEV and any other block rewards will be shared across validators. ',
link: 'https://ethereum.org/en/staking/#:~:text=Rewards%20are%20given%20for%20actions,keeps%20the%20chain%20running%20securely.'
question: "How are rewards generated?",
answer: "Rewards are generated natively on the Ethereum beacon chain as if you were solo staking. Casimir pools users’ ETH into 32 ETH pools and builds a validator group of 4 operators using Distributed Validator Technology. Rewards are distributed to the users’ proportionate to their share of the 32 ETH in the pool. More information on how staking works here. Additionally, MEV and any other block rewards will be shared across validators. ",
link: "https://ethereum.org/en/staking/#:~:text=Rewards%20are%20given%20for%20actions,keeps%20the%20chain%20running%20securely."
},
{
question: 'How does Casimir work? What does it mean to create an account?',
answer: 'Casimir utilizes distributed validator technology to pool users’ ETH into 32 ETH pools that are distributed across four node operators. Individual users (stakers) are able to maintain custody of their ETH because of our use of distributed key generation (DKG). Rewards are managed through Casimir’s open source manager contract and distributed back to users in native ETH proportionate to their share of the 32 ETH in the pool. ',
link: 'https://github.com/RockX-SG/rockx-dkg-cli'
question: "How does Casimir work? What does it mean to create an account?",
answer: "Casimir utilizes distributed validator technology to pool users’ ETH into 32 ETH pools that are distributed across four node operators. Individual users (stakers) are able to maintain custody of their ETH because of our use of distributed key generation (DKG). Rewards are managed through Casimir’s open source manager contract and distributed back to users in native ETH proportionate to their share of the 32 ETH in the pool. ",
link: "https://github.com/RockX-SG/rockx-dkg-cli"
},
{
question: 'What are the advantages of staking with Casimir over other protocols?',
answer: 'Casimir is a first of its kind pooled staking solution that allows users to stake any amount of ETH while maintaining custody of their ethereum and receiving rewards in native ETH (not a secondary liquid staking token). Staking with Casimir gives you the flexibility and ease of use of a liquid staking protocol with the decentralization benefits of solo staking, the reward upside of solo staking and additional security because your stake is distributed across multiple validators (DVT). Additionally, because you are staking native ETH, you will be able to use solutions, like Eigenlayer, that liquid stakers are limited in their ability to access.',
link: ''
question: "What are the advantages of staking with Casimir over other protocols?",
answer: "Casimir is a first of its kind pooled staking solution that allows users to stake any amount of ETH while maintaining custody of their ethereum and receiving rewards in native ETH (not a secondary liquid staking token). Staking with Casimir gives you the flexibility and ease of use of a liquid staking protocol with the decentralization benefits of solo staking, the reward upside of solo staking and additional security because your stake is distributed across multiple validators (DVT). Additionally, because you are staking native ETH, you will be able to use solutions, like Eigenlayer, that liquid stakers are limited in their ability to access.",
link: ""
},
{
question: 'What are the risks?',
answer: ' There is an inherent risk that Casimir could contain a smart contract vulnerability or bug. The Casimir code is open-sourced, audited, and covered by a bug bounty program to minimize this risk. To mitigate smart contract risks, all of the core Casimir contracts are audited. Validators/operators risk penalties, with up to 100% of staked funds at risk if validators/operators fail. To minimize this risk, Casimir utilizes Distributed Validator Technology (DVT) so that failure of a validator/operator will not result in slashed or lost funds.',
link: ''
question: "What are the risks?",
answer: " There is an inherent risk that Casimir could contain a smart contract vulnerability or bug. The Casimir code is open-sourced, audited, and covered by a bug bounty program to minimize this risk. To mitigate smart contract risks, all of the core Casimir contracts are audited. Validators/operators risk penalties, with up to 100% of staked funds at risk if validators/operators fail. To minimize this risk, Casimir utilizes Distributed Validator Technology (DVT) so that failure of a validator/operator will not result in slashed or lost funds.",
link: ""
},
{
question: 'Who is behind Casimir? Are the smart contracts audited and open source?',
answer: 'Casimir is being built by Consensus Networks, a US based team who have been active in crypto for several years. The team were early node operators in many PoS protocols and have been awarded grants from both Web3 and government grants for the development of digital asset management tools.',
link: ''
question: "Who is behind Casimir? Are the smart contracts audited and open source?",
answer: "Casimir is being built by Consensus Networks, a US based team who have been active in crypto for several years. The team were early node operators in many PoS protocols and have been awarded grants from both Web3 and government grants for the development of digital asset management tools.",
link: ""
},
{
question: 'What is Distributed Validator Technology (DVT)?',
answer: 'DVT supports Ethereum’s validation layer by distributing validator operations to the network’s multiple non-trusting nodes (a.k.a Operators). Clusters of operator nodes operate validators on behalf of the staker and simultaneously help solve the fundamental issues of centralization, redundancy, and security that exist within Ethereum’s PoS consensus.',
link: 'https://ssv.network/glossary/#operator'
question: "What is Distributed Validator Technology (DVT)?",
answer: "DVT supports Ethereum’s validation layer by distributing validator operations to the network’s multiple non-trusting nodes (a.k.a Operators). Clusters of operator nodes operate validators on behalf of the staker and simultaneously help solve the fundamental issues of centralization, redundancy, and security that exist within Ethereum’s PoS consensus.",
link: "https://ssv.network/glossary/#operator"
},
{
question: 'Why don’t you use a Liquid Staking Derivative or Token (LSD or LST)?',
answer: 'There are inherent risks with LSDs, most significantly counterparty risk. Since the LSD is functionally an IOU, if the issuer of the LSD were to become insolvent, the user’s ETH could be lost forever.',
link: ''
question: "Why don’t you use a Liquid Staking Derivative or Token (LSD or LST)?",
answer: "There are inherent risks with LSDs, most significantly counterparty risk. Since the LSD is functionally an IOU, if the issuer of the LSD were to become insolvent, the user’s ETH could be lost forever.",
link: ""
},
{
question: 'Are there ways I can use my staked ETH for additional yield?',
answer: 'Yes, although Casimir is not launching an LSD, there are opportunities for stakers to provide their native staked ETH to be used as a liquidity provider (to support a DAO, for example). Additionally, we will be onboarding restaking mechanisms like Eigenlayer that will allow users to natively restake their ETH to maximize their APR, if desired.',
link: ''
question: "Are there ways I can use my staked ETH for additional yield?",
answer: "Yes, although Casimir is not launching an LSD, there are opportunities for stakers to provide their native staked ETH to be used as a liquidity provider (to support a DAO, for example). Additionally, we will be onboarding restaking mechanisms like Eigenlayer that will allow users to natively restake their ETH to maximize their APR, if desired.",
link: ""
},
{
question: 'Am I giving up custody of my staked ETH?',
answer: 'No! You will always be able to withdraw your staked ETH from your smart contract.',
link: ''
question: "Am I giving up custody of my staked ETH?",
answer: "No! You will always be able to withdraw your staked ETH from your smart contract.",
link: ""
},
{
question: 'How frequently do I get my rewards? ',
answer: 'Rewards will be distributed as they are awarded by the Ethereum protocol, at least daily.',
link: ''
question: "How frequently do I get my rewards? ",
answer: "Rewards will be distributed as they are awarded by the Ethereum protocol, at least daily.",
link: ""
},
{
question: 'Where are my rewards distributed, is there a secondary token?',
answer: 'Your rewards will be distributed to your wallet, there is no need to deal with the hassle of swapping a token to get your rewards.',
link: ''
question: "Where are my rewards distributed, is there a secondary token?",
answer: "Your rewards will be distributed to your wallet, there is no need to deal with the hassle of swapping a token to get your rewards.",
link: ""
},
{
question: 'What Wallets are supported?',
answer: 'Today we support Metamask, Wallet Connect, Trezor, Ledger, Trust Wallet and Coinbase Wallet.',
link: ''
question: "What Wallets are supported?",
answer: "Today we support Metamask, Wallet Connect, Trezor, Ledger, Trust Wallet and Coinbase Wallet.",
link: ""
},
{
question: 'Is there a lockup period or waiting period for withdrawals? ',
answer: 'Since you are staking native ETH, there may be a wait time for a validator to exit to receive your withdrawal. If you desire a quicker exit, we will soon be launching a native ETH liquidity pool for those who wish for an instant withdrawal.',
link: ''
question: "Is there a lockup period or waiting period for withdrawals? ",
answer: "Since you are staking native ETH, there may be a wait time for a validator to exit to receive your withdrawal. If you desire a quicker exit, we will soon be launching a native ETH liquidity pool for those who wish for an instant withdrawal.",
link: ""
},
{
question: 'Where is my stake going, who is running the validators?',
answer: 'Casimir is launching with a small set of validators but will soon open a permissionless set so that anyone can join for a small (1ETH) collateral. Validator performance is monitored by a decentralized oracle network to ensure performance and validator performance specs are made available and used in evaluation for the selection of validator operators.',
link: ''
question: "Where is my stake going, who is running the validators?",
answer: "Casimir is launching with a small set of validators but will soon open a permissionless set so that anyone can join for a small (1ETH) collateral. Validator performance is monitored by a decentralized oracle network to ensure performance and validator performance specs are made available and used in evaluation for the selection of validator operators.",
link: ""
},
{
question: 'What is the fee?',
answer: 'There is a small fee, paid for by part of the block rewards to cover validator and other network payments to ensure Casimir keeps running.',
link: ''
question: "What is the fee?",
answer: "There is a small fee, paid for by part of the block rewards to cover validator and other network payments to ensure Casimir keeps running.",
link: ""
},
{
question: 'Can I run a validator?',
answer: 'If you have the technical ability and desire, you soon will be able to run a validator as part of our protocol. Today we are launching with a smaller set of white listed validators but will soon start opening to a permissionless set. Join our Discord for the latest updates.',
link: ''
question: "Can I run a validator?",
answer: "If you have the technical ability and desire, you soon will be able to run a validator as part of our protocol. Today we are launching with a smaller set of white listed validators but will soon start opening to a permissionless set. Join our Discord for the latest updates.",
link: ""
},
])


export default function useQuestionsAndAnswers() {
onMounted(() => {
if(!initializeComposable.value){
if (!initializeComposable.value) {
initializeComposable.value = true
}

Expand Down
12 changes: 6 additions & 6 deletions apps/landing/src/composables/blog.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { onMounted, onUnmounted, readonly, ref } from 'vue'
import snarkdown from 'snarkdown'
import { Article } from '@casimir/types'
import { onMounted, onUnmounted, readonly, ref } from "vue"
import snarkdown from "snarkdown"
import { Article } from "@casimir/types"

const initializeComposable = ref(false)

const blogUrl = import.meta.env.PUBLIC_BLOG_URL || 'http://localhost:4001'
const blogUrl = import.meta.env.PUBLIC_BLOG_URL || "http://localhost:4001"
const articles = ref([] as Article[])
const loadingArticles = ref(true)

Expand Down Expand Up @@ -33,15 +33,15 @@ export default function useBlog() {
title: title,
content: content,
timestamp: timestamp,
type: 'Blog',
type: "Blog",
id: id,
})
}

articles.value = articleList
loadingArticles.value = false
} catch (error) {
console.log('Error fetching articles', error)
console.log("Error fetching articles", error)
loadingArticles.value = false
}

Expand Down
Loading

0 comments on commit 6564b0b

Please sign in to comment.