diff --git a/apps/docs/src/introduction/architecture.md b/apps/docs/src/introduction/architecture.md index 8fbe64063..382c20e2d 100644 --- a/apps/docs/src/introduction/architecture.md +++ b/apps/docs/src/introduction/architecture.md @@ -4,18 +4,29 @@ This page is incomplete. # Architecture -The Casimir staking architecture consists of the following components: +Todo. Explain stakeholders and their entrypoints. Internal contracts, external contracts, operators, oracles, etc. -- An [Ethereum RPC Node](#ethereum-rpc-node) that connects the SSV DVT node to the Ethereum network. -- An [SSV Node](#ssv-node) that performs cluster duties for validators. -- An [SSV DKG server](#ssv-dkg-server) that participates in key generation and resharing ceremonies. +## Contracts + +Casimir deploys the following contracts: + +- A [Casimir factory](#casimir-factory) that configures and deploys staking strategies. +- For each staking strategy: + - A [Casimir manager](#casimir-manager) that is the entrypoint for stakers and deploys and distributes to validator pools. + - A [Casimir registry](#casimir-registry) that is the entrypoint for operators and binds collateral to validators pools. + - A [Casimir upkeep](#casimir-upkeep) that automates distributed consensus layer reports. + - A [Casimir views](#casimir-views) that provides a read-only interface to the strategy. + - For each validator pool: + - A [Casimir pool](#casimir-pool) that either serves as the withdrawal address for a validator or provides a proxy to the withdrawal address. +- A [Casimir oracle](#casimir-oracle) that executes operator selection, triggers DKG ceremonies, submits verifiable validator creation, resharing, and exit reports, and allocates reserved operational fees to operators. + +As we add new strategies and features leading up to our mainnet release, the contracts will require upgrades. Accordingly, the Casimir factory is deployed as a transparent proxy, while the other contracts are deployed as beacon proxies. ```mermaid %%{ init: { 'theme': 'base', 'themeVariables': { - 'fontFamily': 'Inter', 'lineColor': '#E2E2E3', 'primaryColor': '#F6F6F7', 'primaryTextColor': '#3C3C43', @@ -61,7 +72,11 @@ graph TB end ``` - diff --git a/apps/docs/src/introduction/what-is-casimir.md b/apps/docs/src/introduction/what-is-casimir.md index 0c1e10fe6..e2b592f7a 100644 --- a/apps/docs/src/introduction/what-is-casimir.md +++ b/apps/docs/src/introduction/what-is-casimir.md @@ -4,14 +4,4 @@ This page is incomplete. # What is Casimir? -## The Problem - -## Casimir Staking - - \ No newline at end of file +Casimir is a decentralized Ethereum staking platform that gives users intuitive access and control over their assets while their stake is attested by distributed validator technology (DVT). Casimir seamlessly connect stakers with any amount of Ether to a permissionless registry of high-performing node operators, who perform the duties of validators using shares created with distributed key generation (DKG). Stakers and operators can choose from multiple staking strategies, opening up a variety of new staking opportunities in addition to secure, simple staking. diff --git a/infrastructure/cdk/src/providers/docs.ts b/infrastructure/cdk/src/providers/docs.ts index 4219ea777..607fca5c4 100644 --- a/infrastructure/cdk/src/providers/docs.ts +++ b/infrastructure/cdk/src/providers/docs.ts @@ -18,7 +18,7 @@ import { Config } from './config' export class DocsStack extends cdk.Stack { public readonly name = pascalCase('docs') public readonly assetPath = '../../apps/docs/dist' - public readonly lambdaPath = '../../services/redirect/dist' + public readonly functionPath = '../../services/redirect/dist' constructor(scope: Construct, id: string, props: DocsStackProps) { super(scope, id, props) @@ -45,6 +45,12 @@ export class DocsStack extends cdk.Stack { }) })() + const redirectLambda = new cloudfront.experimental.EdgeFunction(this, config.getFullStackResourceName(this.name, 'redirect'), { + runtime: lambda.Runtime.NODEJS_18_X, + handler: 'index.handler', + code: lambda.Code.fromAsset(this.functionPath) + }) + const distribution = new cloudfront.Distribution(this, config.getFullStackResourceName(this.name, 'distribution'), { certificate: distributionCertificate, defaultRootObject: 'index.html', @@ -52,11 +58,7 @@ export class DocsStack extends cdk.Stack { edgeLambdas: [ { eventType: cloudfront.LambdaEdgeEventType.VIEWER_REQUEST, - functionVersion: new cloudfront.experimental.EdgeFunction(this, config.getFullStackResourceName(this.name, 'redirect'), { - runtime: lambda.Runtime.NODEJS_18_X, - handler: 'index.handler', - code: lambda.Code.fromAsset(this.lambdaPath) - }) + functionVersion: redirectLambda.currentVersion } ], viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,