Skip to content

Commit

Permalink
Start docs on staking strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Oct 26, 2023
1 parent 9c531df commit 319ddb5
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 42 deletions.
1 change: 1 addition & 0 deletions apps/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default withMermaid({
outDir: './dist',
themeConfig: {
nav: [
{ text: 'App', link: process.env.APP_URL || 'https://app.dev.casimir.co' },
{ text: 'Website', link: process.env.WEBSITE_URL || 'https://dev.casimir.co' },
],
logo: '/casimir.svg',
Expand Down
5 changes: 5 additions & 0 deletions apps/docs/src/introduction/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ This page is incomplete.
:::

# Architecture

<!-- The Casimir staking system consists of the following components:
- A [factory contract](#factory-contract) that manages the creation of [staking strategies](#staking-strategies), each with a distinct [manager contract](#manager-contract), [registry contract](#registry-contract), [upkeep contract](#upkeep-contract), and [views contract](#views-contract).
- -->
8 changes: 7 additions & 1 deletion apps/docs/src/introduction/staking-strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
This page is incomplete.
:::

# Staking Strategies
# Staking Strategies

The standard Casimir staking strategy provides secure and reliable defaults for native ETH rewards. We also plan to provide alterative (DAO-curated) staking strategies, for stakers and operators to enable when depositing stake or collateral, respectively. The first of these opt-in features is EigenLayer, which allows stakers and operators to participate in creating and managing native EigenPods with less than 32 ETH.

## Standard Strategy

## EigenLayer Strategy
5 changes: 3 additions & 2 deletions apps/landing/src/pages/blog/Blog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import VueFeather from 'vue-feather'
import useBlog from '@/composables/blog'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL
const appUrl = import.meta.env.PUBLIC_APP_URL || 'https://app.dev.casimir.co'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL || 'https://docs.dev.casimir.co'
const {
articles,
loadingArticles,
Expand Down Expand Up @@ -35,7 +36,7 @@ const {
</li>
</ul>
<a
href="https://app.dev.casimir.co"
:href="appUrl"
class="btn-primary-sm"
>
Launch App
Expand Down
16 changes: 6 additions & 10 deletions apps/landing/src/pages/blog/components/Article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import useBlog from '@/composables/blog'
import router from '@/composables/router'
import { Article } from '@casimir/types'
const appUrl = import.meta.env.PUBLIC_APP_URL || 'https://app.dev.casimir.co'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL || 'https://docs.dev.casimir.co'
const {
articles,
loadingArticles,
Expand Down Expand Up @@ -47,9 +49,6 @@ watch([articles, loadingArticles], () => {
>
</a>
<ul class="nav__links">
<li>
<a href="https://github.com/consensusnetworks/casimir#casimir">API Reference</a>
</li>
<li>
<a href="/blog">Blog</a>
</li>
Expand All @@ -59,9 +58,12 @@ watch([articles, loadingArticles], () => {
<li>
<a href="https://consensusnetworks.com">Company</a>
</li>
<li>
<a :href="docsUrl">Docs</a>
</li>
</ul>
<a
href="https://app.dev.casimir.co"
:href="appUrl"
class="btn-primary-sm"
>
Launch App
Expand Down Expand Up @@ -127,12 +129,6 @@ watch([articles, loadingArticles], () => {
<div class="footer__container">
<span class="c">© 2023 Casimir. All rights reserved.</span>
<ul>
<li>
<a
href="https://api.casimir.co"
target="_blank"
>API Reference</a>
</li>
<li>
<a
href="/"
Expand Down
41 changes: 27 additions & 14 deletions apps/landing/src/pages/changelog/Changelog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
<script lang="ts" setup>
import snarkdown from 'snarkdown'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL
const appUrl = import.meta.env.PUBLIC_APP_URL || 'https://app.dev.casimir.co'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL || 'https://docs.dev.casimir.co'
type Release = {
htmlURL: string
tagName: string
publishedAt: string
body: string
author: {
name: string
avatar: string
htmlURL: string
}
}
async function getReleases() {
const url = 'https://api.github.com/repos/consensusnetworks/casimir/releases'
Expand All @@ -12,7 +25,7 @@ async function getReleases() {
const json = await response.json()
if (!Array.isArray(json) || json.length === 0) {
return null
return []
}
const releases = json.map((r) => {
Expand All @@ -24,15 +37,15 @@ async function getReleases() {
author: {
name: r.author.login,
avatar: r.author.avatar_url,
htmlURL: r.author.html_url,
},
}
htmlURL: r.author.html_url
}
} as Release
})
return releases
}
async function displayReleases(releases) {
async function displayReleases(releases: Release[]) {
releases.shift()
const changelogs = document.querySelector('.vupdate__container')
releases.forEach((r) => {
Expand Down Expand Up @@ -63,7 +76,7 @@ async function displayReleases(releases) {
vupdate.appendChild(title)
vupdate.appendChild(body)
vupdate.appendChild(releaseURL)
changelogs.appendChild(vupdate)
changelogs?.appendChild(vupdate)
})
}
Expand Down Expand Up @@ -104,7 +117,7 @@ document.addEventListener('DOMContentLoaded', async () => {
</li>
</ul>
<a
href="https://app.dev.casimir.co"
:href="appUrl"
class="btn-primary-sm"
>
Launch App
Expand All @@ -127,12 +140,6 @@ document.addEventListener('DOMContentLoaded', async () => {
<div class="footer__container">
<span class="c">© 2023 Casimir. All rights reserved.</span>
<ul>
<li>
<a
href="https://api.casimir.co"
target="_blank"
>API Reference</a>
</li>
<li>
<a
href="/"
Expand All @@ -151,6 +158,12 @@ document.addEventListener('DOMContentLoaded', async () => {
target="_blank"
>Contact Us</a>
</li>
<li>
<a
:href="docsUrl"
target="_blank"
>Docs</a>
</li>
</ul>
</div>
</section>
Expand Down
23 changes: 9 additions & 14 deletions apps/landing/src/pages/landing/Landing.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script lang="ts" setup>
import { ref } from 'vue'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL
const appUrl = import.meta.env.PUBLIC_APP_URL || 'https://app.dev.casimir.co'
const docsUrl = import.meta.env.PUBLIC_DOCS_URL || 'https://docs.dev.casimir.co'
const faqItems = ref(
[
{
Expand Down Expand Up @@ -39,13 +40,13 @@ const faqItems = ref(
open: false,
},
{
question: 'Who is running the validators?',
answer: 'Casimir validators are run with a diverse group of independently owned operators using distributed validator technology (DVT). We are launching with a small set of vetted operator partners, but we will soon allow anyone with at least 1 ETH collateral to run an operator. Operator performance is overseen by a decentralized oracle network with performance specs used in operator selection.',
question: 'What are the staking fees?',
answer: 'The Casimir smart contract charges a user a 5% fee on deposits and rewards to cover operational expenses including oracle gas fees and payments to the distributed set of independently owned operators.',
open: false,
},
{
question: 'What are the staking fees?',
answer: 'The Casimir smart contract charges a user a 5% fee on deposits and rewards to cover operational expenses including oracle gas fees and payments to the distributed set of independently owned operators.',
question: 'Who is running the validators?',
answer: 'Casimir validators are run with a diverse group of independently owned operators using distributed validator technology (DVT). We are launching with a small set of vetted operator partners, but we will soon allow anyone with at least 1 ETH collateral to run an operator. Operator performance is overseen by a decentralized oracle network with performance specs used in operator selection.',
open: false,
},
{
Expand Down Expand Up @@ -110,7 +111,7 @@ const toggleQuestionItem = (index: number) => {
</div>
<div class="cta__container">
<a
href="https://app.dev.casimir.co"
:href="appUrl"
class="btn-primary"
>
Launch App
Expand Down Expand Up @@ -165,7 +166,7 @@ const toggleQuestionItem = (index: number) => {
<span class="text-7 bold">Non-Custodial (DKG)</span>
</div>
<span class="text-r">
Keys created and held across validators with distributed key
Validator keys created and held across operators with distributed key
generation (DKG).
</span>
</div>
Expand Down Expand Up @@ -196,7 +197,7 @@ const toggleQuestionItem = (index: number) => {
<span class="text-7 bold">Incentives Drive Rewards</span>
</div>
<span class="text-r">
Validators are incentivized to provide the best service to earn your
Operators are incentivized to provide the best service to earn your
stake.
</span>
</div>
Expand Down Expand Up @@ -334,12 +335,6 @@ const toggleQuestionItem = (index: number) => {
<div class="footer__container">
<span class="c">© 2023 Casimir. All rights reserved.</span>
<ul>
<li>
<a
:href="docsUrl"
target="_blank"
>Documentation</a>
</li>
<li>
<a
href="/"
Expand Down
3 changes: 3 additions & 0 deletions scripts/cdk/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ void async function () {
await loadCredentials()
process.env.AWS_ACCOUNT = await getSecret('casimir-aws-account')

// Hardcode app url to dev in prod to link goerli testnet
process.env.APP_URL = process.env.STAGE === 'prod' ? /*'https://app.casimir.co'*/'https://app.dev.casimir.co' : `https://app.${process.env.STAGE}.casimir.co`
process.env.BLOG_URL = process.env.STAGE === 'prod' ? 'https://blog.casimir.co' : `https://blog.${process.env.STAGE}.casimir.co`
process.env.DOCS_URL = process.env.STAGE === 'prod' ? 'https://docs.casimir.co' : `https://docs.${process.env.STAGE}.casimir.co`
process.env.USERS_URL = process.env.STAGE === 'prod' ? 'https://users.casimir.co' : `https://users.${process.env.STAGE}.casimir.co`
Expand All @@ -25,6 +27,7 @@ void async function () {
process.env.SSV_NETWORK_ADDRESS = ETHEREUM_CONTRACTS[networkKey]?.SSV_NETWORK_ADDRESS
process.env.SSV_VIEWS_ADDRESS = ETHEREUM_CONTRACTS[networkKey]?.SSV_VIEWS_ADDRESS

process.env.PUBLIC_APP_URL = process.env.APP_URL
process.env.PUBLIC_BLOG_URL = process.env.BLOG_URL
process.env.PUBLIC_DOCS_URL = process.env.DOCS_URL
process.env.PUBLIC_USERS_URL = process.env.USERS_URL
Expand Down
1 change: 0 additions & 1 deletion scripts/cdk/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ void async function () {

await loadCredentials()
process.env.AWS_ACCOUNT = await getSecret('casimir-aws-account')
process.env.USERS_URL = `https://users.${process.env.STAGE}.casimir.co`

await run('npm run build --workspace @casimir/ethereum')
await run('npm run docgen --workspace @casimir/docs')
Expand Down

0 comments on commit 319ddb5

Please sign in to comment.