├── public ├── bifrost-uvp.jpeg ├── bifrost-xcm.jpeg ├── onchain-summer.png ├── arrival-of-spring.png ├── bifrost-features.jpeg ├── bifrost-mechanism.png ├── bifrost-minting.png ├── bifrost-mono-img.png ├── bifrost-solution.jpeg ├── bifrost-vision.jpeg ├── bifrost-developers.png ├── bifrost-multichain.png ├── interstellar-odyssey.png ├── bifrost-slpx-architecture.jpeg ├── bifrost-builder-program-x-post.png └── bifrost-vdot-vs-nomination-pools.jpeg ├── postcss.config.mjs ├── app ├── global.css ├── (home) │ ├── layout.tsx │ └── page.tsx ├── api │ └── search │ │ └── route.ts ├── llms-full.txt │ └── route.ts ├── docs │ ├── layout.tsx │ └── [[...slug]] │ │ └── page.tsx ├── og │ └── docs │ │ └── [...slug] │ │ └── route.tsx ├── layout.tsx └── icon.svg ├── content └── docs │ ├── builder-programs │ ├── meta.json │ ├── rsp.mdx │ ├── interstellar-odyssey.mdx │ └── index.mdx │ ├── integration │ ├── meta.json │ ├── index.mdx │ ├── base.mdx │ ├── soneium.mdx │ ├── arbitrum.mdx │ ├── bnbchain.mdx │ ├── ethereum.mdx │ ├── moonbeam.mdx │ └── manta.mdx │ ├── vtokens │ ├── meta.json │ ├── index.mdx │ ├── vmanta.mdx │ ├── vbnc.mdx │ ├── vdot.mdx │ ├── vksm.mdx │ ├── veth.mdx │ └── vastr.mdx │ ├── hackathons │ ├── meta.json │ ├── index.mdx │ ├── consensus-hongkong-2025.mdx │ ├── ethdenver-webzero-2025.mdx │ ├── polkadot-hackathon-encode-2025.mdx │ ├── hackcamp-danang-openguild-2025.mdx │ └── dot-your-future-oneblock-2025.mdx │ ├── meta.json │ ├── audits.mdx │ ├── unique-value-propositions.mdx │ ├── index.mdx │ ├── slpx-protocol.mdx │ └── protocol-security.mdx ├── lib ├── layout.shared.tsx └── source.ts ├── next.config.mjs ├── .gitignore ├── mdx-components.tsx ├── source.config.ts ├── eslint.config.mjs ├── SECURITY.md ├── README.md ├── tsconfig.json ├── package.json ├── LICENSE ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md /public/bifrost-uvp.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-uvp.jpeg -------------------------------------------------------------------------------- /public/bifrost-xcm.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-xcm.jpeg -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /public/onchain-summer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/onchain-summer.png -------------------------------------------------------------------------------- /public/arrival-of-spring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/arrival-of-spring.png -------------------------------------------------------------------------------- /public/bifrost-features.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-features.jpeg -------------------------------------------------------------------------------- /public/bifrost-mechanism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-mechanism.png -------------------------------------------------------------------------------- /public/bifrost-minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-minting.png -------------------------------------------------------------------------------- /public/bifrost-mono-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-mono-img.png -------------------------------------------------------------------------------- /public/bifrost-solution.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-solution.jpeg -------------------------------------------------------------------------------- /public/bifrost-vision.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-vision.jpeg -------------------------------------------------------------------------------- /public/bifrost-developers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-developers.png -------------------------------------------------------------------------------- /public/bifrost-multichain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-multichain.png -------------------------------------------------------------------------------- /public/interstellar-odyssey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/interstellar-odyssey.png -------------------------------------------------------------------------------- /app/global.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | @import 'fumadocs-ui/css/purple.css'; 3 | @import 'fumadocs-ui/css/preset.css'; 4 | -------------------------------------------------------------------------------- /public/bifrost-slpx-architecture.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-slpx-architecture.jpeg -------------------------------------------------------------------------------- /public/bifrost-builder-program-x-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-builder-program-x-post.png -------------------------------------------------------------------------------- /content/docs/builder-programs/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "interstellar-odyssey", 4 | "rsp" 5 | ], 6 | "defaultOpen": false 7 | } -------------------------------------------------------------------------------- /public/bifrost-vdot-vs-nomination-pools.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bifrost-io/developers/HEAD/public/bifrost-vdot-vs-nomination-pools.jpeg -------------------------------------------------------------------------------- /content/docs/integration/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "ethereum", 4 | "arbitrum", 5 | "base", 6 | "bnbchain", 7 | "manta", 8 | "moonbeam", 9 | "soneium" 10 | ], 11 | "defaultOpen": false 12 | } -------------------------------------------------------------------------------- /content/docs/vtokens/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "veth", 4 | "vdot", 5 | "vbnc", 6 | "vksm", 7 | "vglmr", 8 | "vmovr", 9 | "vmanta", 10 | "vastr" 11 | ], 12 | "defaultOpen": false 13 | } -------------------------------------------------------------------------------- /lib/layout.shared.tsx: -------------------------------------------------------------------------------- 1 | import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; 2 | 3 | export function baseOptions(): BaseLayoutProps { 4 | return { 5 | nav: { 6 | title: 'Bifrost Developers', 7 | }, 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | import { createMDX } from 'fumadocs-mdx/next'; 2 | 3 | const withMDX = createMDX(); 4 | 5 | /** @type {import('next').NextConfig} */ 6 | const config = { 7 | reactStrictMode: true, 8 | }; 9 | 10 | export default withMDX(config); 11 | -------------------------------------------------------------------------------- /app/(home)/layout.tsx: -------------------------------------------------------------------------------- 1 | import { HomeLayout } from 'fumadocs-ui/layouts/home'; 2 | import { baseOptions } from '@/lib/layout.shared'; 3 | 4 | export default function Layout({ children }: LayoutProps<'/'>) { 5 | return {children}; 6 | } 7 | -------------------------------------------------------------------------------- /app/api/search/route.ts: -------------------------------------------------------------------------------- 1 | import { source } from '@/lib/source'; 2 | import { createFromSource } from 'fumadocs-core/search/server'; 3 | 4 | export const { GET } = createFromSource(source, { 5 | // https://docs.orama.com/docs/orama-js/supported-languages 6 | language: 'english', 7 | }); 8 | -------------------------------------------------------------------------------- /content/docs/hackathons/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "dot-your-future-oneblock-2025", 4 | "hackcamp-danang-openguild-2025", 5 | "consensus-hongkong-2025", 6 | "ethdenver-webzero-2025", 7 | "polkadot-hackathon-encode-2025" 8 | ], 9 | "defaultOpen": false 10 | } -------------------------------------------------------------------------------- /content/docs/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "index", 4 | "unique-value-propositions", 5 | "slpx-protocol", 6 | "protocol-security", 7 | "vtokens", 8 | "integration", 9 | "builder-programs", 10 | "hackathons", 11 | "audits" 12 | ], 13 | "defaultOpen": false 14 | } -------------------------------------------------------------------------------- /app/llms-full.txt/route.ts: -------------------------------------------------------------------------------- 1 | import { getLLMText, source } from '@/lib/source'; 2 | 3 | export const revalidate = false; 4 | 5 | export async function GET() { 6 | const scan = source.getPages().map(getLLMText); 7 | const scanned = await Promise.all(scan); 8 | 9 | return new Response(scanned.join('\n\n')); 10 | } 11 | -------------------------------------------------------------------------------- /content/docs/vtokens/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vTokens 3 | description: Understanding vTokens 4 | --- 5 | 6 | vToken (Voucher Token) is Bifrost's liquid staking token (LST), which is minted through Bifrost's Liquid Staking Module (SLP). 7 | 8 | For detailed information about each vToken and their resilience, please refer to the following sections. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # deps 2 | /node_modules 3 | 4 | # generated content 5 | .source 6 | 7 | # test & build 8 | /coverage 9 | /.next/ 10 | /out/ 11 | /build 12 | *.tsbuildinfo 13 | 14 | # misc 15 | .DS_Store 16 | *.pem 17 | /.pnp 18 | .pnp.js 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | # others 24 | .env*.local 25 | .vercel 26 | next-env.d.ts -------------------------------------------------------------------------------- /content/docs/hackathons/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hackathons 3 | description: Information about current and past hackathons 4 | --- 5 | 6 | Bifrost team frequently participates or organizes hackathons. Check out the list below to see what's coming up: 7 | 8 | ## Upcoming hackathons 9 | 10 | 11 | 12 | ## Past hackathons 13 | 14 | - [Hackathon 1](https://hackathon1.com) -------------------------------------------------------------------------------- /app/docs/layout.tsx: -------------------------------------------------------------------------------- 1 | import { source } from '@/lib/source'; 2 | import { DocsLayout } from 'fumadocs-ui/layouts/docs'; 3 | import { baseOptions } from '@/lib/layout.shared'; 4 | 5 | export default function Layout({ children }: LayoutProps<'/docs'>) { 6 | return ( 7 | 8 | {children} 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /mdx-components.tsx: -------------------------------------------------------------------------------- 1 | import { ImageZoom } from 'fumadocs-ui/components/image-zoom'; 2 | import defaultMdxComponents from 'fumadocs-ui/mdx'; 3 | import type { MDXComponents } from 'mdx/types'; 4 | 5 | export function getMDXComponents(components?: MDXComponents): MDXComponents { 6 | return { 7 | ...defaultMdxComponents, 8 | img: (props) => , 9 | ...components, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /content/docs/integration/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Integration 3 | description: Super hands on and concise technical documentation for Bifrost protocol 4 | --- 5 | 6 | ## Integration 7 | 8 | Depending on the integration requirements, a developer may or may not need to interact with Bifrost Parachain directly. Most of the time, developers can interact with Bifrost SLPx protocol contracts on many other chains. For example, Bifrost SLPx contracts are deployed on Ethereum, Arbitrum, Base, BNB Chain, Moonbeam, Manta, Soneium, and so on. 9 | 10 | ## Developer toolings 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /source.config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | defineConfig, 3 | defineDocs, 4 | frontmatterSchema, 5 | metaSchema, 6 | } from 'fumadocs-mdx/config'; 7 | 8 | // You can customise Zod schemas for frontmatter and `meta.json` here 9 | // see https://fumadocs.dev/docs/mdx/collections 10 | export const docs = defineDocs({ 11 | dir: 'content/docs', 12 | docs: { 13 | schema: frontmatterSchema, 14 | postprocess: { 15 | includeProcessedMarkdown: true, 16 | }, 17 | }, 18 | meta: { 19 | schema: metaSchema, 20 | }, 21 | }); 22 | 23 | export default defineConfig({ 24 | mdxOptions: { 25 | // MDX options 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from 'path'; 2 | import { fileURLToPath } from 'url'; 3 | import { FlatCompat } from '@eslint/eslintrc'; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [ 13 | ...compat.extends('next/core-web-vitals', 'next/typescript'), 14 | { 15 | ignores: [ 16 | 'node_modules/**', 17 | '.next/**', 18 | 'out/**', 19 | 'build/**', 20 | '.source/**', 21 | 'next-env.d.ts', 22 | ], 23 | }, 24 | ]; 25 | 26 | export default eslintConfig; -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | Kaia Foundation and community take security bugs in our repositories seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. 4 | 5 | To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/bifrost-io/developers/security/advisories/new) tab. 6 | 7 | Kaia Foundation will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. 8 | -------------------------------------------------------------------------------- /lib/source.ts: -------------------------------------------------------------------------------- 1 | import { docs } from 'fumadocs-mdx:collections/server'; 2 | import { type InferPageType, loader } from 'fumadocs-core/source'; 3 | import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons'; 4 | 5 | // See https://fumadocs.dev/docs/headless/source-api for more info 6 | export const source = loader({ 7 | baseUrl: '/docs', 8 | source: docs.toFumadocsSource(), 9 | plugins: [lucideIconsPlugin()], 10 | }); 11 | 12 | export function getPageImage(page: InferPageType) { 13 | const segments = [...page.slugs, 'image.png']; 14 | 15 | return { 16 | segments, 17 | url: `/og/docs/${segments.join('/')}`, 18 | }; 19 | } 20 | 21 | export async function getLLMText(page: InferPageType) { 22 | const processed = await page.data.getText('processed'); 23 | 24 | return `# ${page.data.title} 25 | 26 | ${processed}`; 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![banner image](/bifrost-mono-img.png) 2 | # Bifrost Developers Docs 3 | > Comprehensive documentation for developers building with Bifrost protocol 4 | 5 | **Bifrost Developers** takes an unopinionated approach to developer development. Instead of forcing you to adopt our tech stack of choice, we provide you with code snippets, guidance, references, samples, public projects contributed by the community, bounty that you can leverage into whichever framework/technical stack/project that you are using or building. 6 | 7 | The included resources aim to provide you with everything you need to launch a proof of concept, minimal viable product or even completed product. Comes with additional tools, documentation, and tricks for building onchain. 8 | 9 | Whether you're a hackathon participant or an ambitious entrepreneur looking to launch the next unicorn protocol, this monorepo is designed with you in mind. -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "target": "ESNext", 5 | "lib": ["dom", "dom.iterable", "esnext"], 6 | "allowJs": true, 7 | "skipLibCheck": true, 8 | "strict": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "noEmit": true, 11 | "esModuleInterop": true, 12 | "module": "esnext", 13 | "moduleResolution": "bundler", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "jsx": "react-jsx", 17 | "incremental": true, 18 | "paths": { 19 | "@/*": ["./*"], 20 | "fumadocs-mdx:collections/*": [".source/*"] 21 | }, 22 | "plugins": [ 23 | { 24 | "name": "next" 25 | } 26 | ] 27 | }, 28 | "include": [ 29 | "next-env.d.ts", 30 | "**/*.ts", 31 | "**/*.tsx", 32 | ".next/types/**/*.ts", 33 | ".next/dev/types/**/*.ts" 34 | ], 35 | "exclude": ["node_modules"] 36 | } 37 | -------------------------------------------------------------------------------- /app/og/docs/[...slug]/route.tsx: -------------------------------------------------------------------------------- 1 | import { getPageImage, source } from '@/lib/source'; 2 | import { notFound } from 'next/navigation'; 3 | import { ImageResponse } from 'next/og'; 4 | import { generate as DefaultImage } from 'fumadocs-ui/og'; 5 | 6 | export const revalidate = false; 7 | 8 | export async function GET( 9 | _req: Request, 10 | { params }: RouteContext<'/og/docs/[...slug]'>, 11 | ) { 12 | const { slug } = await params; 13 | const page = source.getPage(slug.slice(0, -1)); 14 | if (!page) notFound(); 15 | 16 | return new ImageResponse( 17 | , 22 | { 23 | width: 1200, 24 | height: 630, 25 | }, 26 | ); 27 | } 28 | 29 | export function generateStaticParams() { 30 | return source.getPages().map((page) => ({ 31 | lang: page.locale, 32 | slug: getPageImage(page).segments, 33 | })); 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bifrost-developers", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "build": "next build", 7 | "dev": "next dev --port 3020", 8 | "start": "next start", 9 | "types:check": "fumadocs-mdx && tsc --noEmit", 10 | "postinstall": "fumadocs-mdx", 11 | "lint": "eslint" 12 | }, 13 | "dependencies": { 14 | "fumadocs-core": "16.2.2", 15 | "fumadocs-mdx": "14.0.4", 16 | "fumadocs-ui": "16.2.2", 17 | "lucide-react": "^0.552.0", 18 | "next": "16.0.7", 19 | "react": "^19.2.1", 20 | "react-dom": "^19.2.1" 21 | }, 22 | "devDependencies": { 23 | "@tailwindcss/postcss": "^4.1.16", 24 | "@types/mdx": "^2.0.13", 25 | "@types/node": "^24.10.0", 26 | "@types/react": "^19.2.2", 27 | "@types/react-dom": "^19.2.2", 28 | "postcss": "^8.5.6", 29 | "tailwindcss": "^4.1.16", 30 | "typescript": "^5.9.3", 31 | "eslint-config-next": "16.0.1", 32 | "eslint": "^9.39.1", 33 | "@eslint/eslintrc": "^3.3.3" 34 | } 35 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2025 Bifrost 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /app/(home)/page.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | 3 | export default function HomePage() { 4 | return ( 5 |
6 |
7 |

8 | The crosschain staking layer 9 |

10 |

11 | Bifrost Developer Documentation 12 |

13 |
14 | 18 | Getting started 19 | 20 | 25 | Videos 26 | 27 |
28 |
29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import { RootProvider } from 'fumadocs-ui/provider/next'; 2 | import './global.css'; 3 | import { JetBrains_Mono } from 'next/font/google'; 4 | import type { Metadata } from "next"; 5 | 6 | const jetBrainsMono = JetBrains_Mono({ 7 | subsets: ['latin'], 8 | }); 9 | 10 | export const metadata: Metadata = { 11 | title: "Bifrost Developers", 12 | description: "Comprehensive documentation for developers building with Bifrost protocol", 13 | metadataBase: new URL("https://developers.bifrost.io"), 14 | openGraph: { 15 | title: "Bifrost Developers", 16 | description: "Comprehensive documentation for developers building with Bifrost protocol", 17 | url: "https://developers.bifrost.io", 18 | siteName: "Bifrost Developers", 19 | images: [ 20 | { 21 | url: "/bifrost-developers.png", 22 | width: 1200, 23 | height: 630, 24 | alt: "og-image", 25 | }, 26 | ], 27 | locale: "en_US", 28 | type: "website", 29 | }, 30 | twitter: { 31 | card: "summary_large_image", 32 | title: "Bifrost Developers", 33 | description: "Comprehensive documentation for developers building with Bifrost protocol", 34 | creator: "@bifrost", 35 | images: ["/bifrost-developers.png"], 36 | }, 37 | }; 38 | 39 | export default function Layout({ children }: LayoutProps<'/'>) { 40 | return ( 41 | 42 | 43 | {children} 44 | 45 | 46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /app/docs/[[...slug]]/page.tsx: -------------------------------------------------------------------------------- 1 | import { getPageImage, source } from '@/lib/source'; 2 | import { 3 | DocsBody, 4 | DocsDescription, 5 | DocsPage, 6 | DocsTitle, 7 | } from 'fumadocs-ui/layouts/docs/page'; 8 | import { notFound } from 'next/navigation'; 9 | import { getMDXComponents } from '@/mdx-components'; 10 | import type { Metadata } from 'next'; 11 | import { createRelativeLink } from 'fumadocs-ui/mdx'; 12 | 13 | export default async function Page(props: PageProps<'/docs/[[...slug]]'>) { 14 | const params = await props.params; 15 | const page = source.getPage(params.slug); 16 | if (!page) notFound(); 17 | 18 | const MDX = page.data.body; 19 | 20 | return ( 21 | 22 | {page.data.title} 23 | {page.data.description} 24 | 25 | 31 | 32 | 33 | ); 34 | } 35 | 36 | export async function generateStaticParams() { 37 | return source.generateParams(); 38 | } 39 | 40 | export async function generateMetadata( 41 | props: PageProps<'/docs/[[...slug]]'>, 42 | ): Promise { 43 | const params = await props.params; 44 | const page = source.getPage(params.slug); 45 | if (!page) notFound(); 46 | 47 | return { 48 | title: page.data.title, 49 | description: page.data.description, 50 | openGraph: { 51 | images: getPageImage(page).url, 52 | }, 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /content/docs/audits.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Audits 3 | description: Audit reports for Bifrost protocol 4 | --- 5 | 6 | ## SlowMist Audit Report - Bifrost Protocol 7 | 8 | [Report](https://github.com/bifrost-finance/bifrost-wiki/blob/master/slowmist-rep-bifrost-2022-02.pdf) 9 | 10 | ## Certik Security Assessment - Bifrost Protocol 11 | 12 | [Report](https://github.com/bifrost-finance/bifrost-wiki/blob/master/certik-rep-bifrost-2022-01.pdf) 13 | 14 | ## SlowMist Audit Report - Bifrost vETH 2.0 15 | 16 | [Report](https://github.com/bifrost-finance/bifrost-vETH-2.0/blob/main/audit/SlowMist%20Audit%20Report%20-%20Bifrost%20vETH%202.0.pdf) 17 | 18 | ## SlowMist Audit Report - Bifrost SLP 19 | 20 | [Report](https://github.com/bifrost-finance/bifrost-wiki/blob/master/slowmist-rep-bifrost-slp-2022-08.pdf) 21 | 22 | ## Bifrost Security Evaluation 23 | 24 | [Report](https://drive.google.com/file/d/1jjASLFLc-G56fDrtHBAXME1C5M9-LPLJ/view?usp=sharing) 25 | 26 | ## Common Prefix Audit Report - SLPx 27 | 28 | [Report](https://docs.google.com/document/d/1HPMcVXQuOn_Y3HpxIrRWh4DgGbZXbvWocmZYuoasNHg/edit#heading=h.7i34j32dfki6) 29 | 30 | ## Beosin Audit Report - Stable Swap 31 | 32 | [Report](https://beosin.com/audits/Stable-swap_202309291700.pdf) 33 | 34 | ## Beosin Audit Report - vToken Minting 35 | 36 | [Report](https://beosin.com/audits/Bifrost_vtoken-voting_202310121750.pdf) 37 | 38 | ## OAK Audit Report - Loopstake (Leveraged Staking) 39 | 40 | [Report](https://github.com/oak-security/audit-reports/blob/main/Bifrost/2024-03-11%20Audit%20Report%20-%20Bifrost%20Finance%20Leveraged%20Staking%20v1.0.pdf) 41 | 42 | ## BlockDeep Audit Report - bbBNC 43 | 44 | [Report](https://drive.google.com/file/d/186kOlHTB2krP6Rqa4uyb_bvuJKpV8GpA/view?usp=drive_link) 45 | 46 | ## Beosin Audit Report - vToken Minting & SLP V2 47 | 48 | [Report](https://beosin.com/audits/Bifrost(vtoken-minting&&slp-v2)_202509251121.pdf) 49 | 50 | ## Beosin Audit Report - vETH 3.0 & SLPx V2 51 | 52 | [Report](https://beosin.com/audits/Bifrost(veth-3.0&&slpx-v2)_202509251035.pdf) 53 | -------------------------------------------------------------------------------- /content/docs/builder-programs/rsp.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reward-Share program 3 | description: Revenue sharing program for builders building with Bifrost protocol 4 | --- 5 | 6 | ## Overview 7 | 8 | The program aims to promote cooperation with blockchain communities, ecosystem products, platforms, and partners. This will increase Bifrost's exposure and vToken growth through our key partners and their diverse user base and popularity. 9 | 10 | Bifrost's goal is to share a portion of its vToken reward with these partners to foster long-term strategic cooperation and stimulate the continuous growth and adoption of Bifrost's services. 11 | 12 | Whether individuals or project parties, anyone is welcome to apply to the RSP. Applicants are not limited to: 13 | 14 | - Wallets 15 | - Dapps 16 | - Protocols 17 | - App Chains 18 | - Crypto Data Platforms and Dashboards 19 | - Communities and KOLs 20 | 21 | ## Why RSP? 22 | 23 | ### Long-term, Stable Reward Sharing 24 | 25 | 26 | As an RSP member, you will receive a share of the rewards for each vToken successfully minted by the staker you invited. 27 | 28 | 29 | Joining RSP will bring you the following benefits: 30 | 31 | ### Achieve a higher yield than running Validator Commission 32 | 33 | 34 | For instance, the protocol revenue rate of vDOT is 10% (equivalent to 10% of the Validator Commission). If you receive 60% of this, which equals to you are obtaining 6% of the Validator Commission. 35 | 36 | 37 | View the detailed calculation formula at ... 38 | 39 | ### Sustainable Stable Long-Term Returns 40 | 41 | Compared to running a Validator, you won't need to worry about maintenance, income suspension due to Inactive status, or other related issues. 42 | 43 | ### Receive Shared Rewards at Any Time 44 | 45 | You can claim your Shared Reward at any time, refer to ... 46 | 47 | ### A Dedicated Data Dashboard 48 | 49 | A dedicated data page for you that records all effective vToken minting achieved through your Dapp, website, or referral link, which contains several important data points like: 50 | 51 | - Total valid minting with curve (Effective minted) 52 | - Total shared reward (commission) 53 | - Daily/historical minting 54 | - Your contributor list 55 | - More detailed data 56 | 57 | [RSP Data Dashboard](https://rsp.bifrost.io/). 58 | 59 | ### Long-Term Partnership with Bifrost 60 | 61 | From a marketing and community perspective, what can we provide you? 62 | 63 | - RSP onboarding community welcome announcement across all Bifrost official channels (global and regional). 64 | - Retweet RSP partner content related to our collaboration. 65 | - Online and offline event and campaign cooperation (e.g., joint sponsorships, panel invitations, and co-hosting). 66 | - Network support via ecosystem partners, communities, and media outlets. 67 | - And more. 68 | -------------------------------------------------------------------------------- /content/docs/unique-value-propositions.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Unique Value Propositions 3 | description: Understanding Bifrost Protocol Unique Value Propositions 4 | --- 5 | 6 | ## What are Bifrost's Unique Value Propositions? 7 | 8 | 9 | Have a look to the blog article: [The Feedback and Growth Potential of Bifrost](https://bifrost.io/blog/the-feedback-and-growth-potential-of-bifrost) 10 | 11 | 12 | Bifrost, as a blockchain, can provide LSTs with a more diverse omni-chain adaptation scenario: 13 | 14 | ![Bifrost's UVP](/bifrost-uvp.jpeg) 15 | 16 | 17 | - Standardized RPC to be integrated by different consensus. 18 | - Concentrate liquidity on a single spot to support omni-chain applications. 19 | - Retain governance rights. 20 | - All types of tokens can be staked through Bifrost DApp. 21 | - Bifrost LST can be set as Gas Fee. 22 | - Leverage staking 23 | 24 | ![Bifrost's Unique Features](/bifrost-features.jpeg) 25 | 26 | ## Bifrost's vDOT vs Nomination pools 27 | 28 | ![Bifrost's vDOT vs Nomination pools](/bifrost-vdot-vs-nomination-pools.jpeg) 29 | 30 | By using intelligent node filtering, Bifrost can provide a Token base APY that is more competitive than other products. The Defi use case scenario of LSTs makes it easier for users to compound more profits. 31 | 32 | > Many liquid staking projects on the same track directly deploy contracts on other chains without having their own chains. Why does Bifrost build a chain? 33 | 34 | To answer this question, it is necessary to clarify the concept of vTokens in the architectural design: most liquid staking protocol are built on the original chain. 35 | 36 | Lido's ETH liquidity staking protocol is an Ethereum contract implemented in the Solidity language, while Lido's SOL liquidity staking protocol is a Solana contract implemented in the Rust language. Thus, the native chain for Lido staking derivative, stETH, Ethereum derivative, and its native format is ERC-20. Lido's SOL (native chain) staking derivative is Solana, while the native format is SPL. 37 | 38 | The vToken adopts a cross-chain minting scheme. 39 | 40 | ![Bifrost's vToken architecture](/bifrost-vision.jpeg) 41 | 42 | All vTokens are minted on the Bifrost chain. That is to say, all vTokens are on Bifrost chain. Since Bifrost is a Kusama/Polkadot parachain, all vTokens are native assets of the Dotsama ecosystem. 43 | 44 | > The future is omni-chain! 45 | 46 | This is one of our fundamental judgement. Based on this, we believe that cross-chain applications will be the main form of dApps in the future, and that cross-chain calls between different applications on different chains will be the norm. 47 | 48 | Therefore, Bifrost has designed many of its DeFi products, including the **SLPx protocol**, with the ease of crosschain integration in mind. And we believe that the entire ecosystem (including the heterogeneous chain ecosystem that bridges into it) and XCM-based communications will further **enable crosschain integration between applications**. -------------------------------------------------------------------------------- /content/docs/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting started 3 | description: Comprehensive documentation for developers building with Bifrost protocol 4 | --- 5 | 6 |
7 |
8 | 9 |
10 |
11 | 12 | Bifrost is a **staking yield layer** that establishes a standardized multi-chain liquid staking rewards infrastructure, delivering composable crypto-native yields for stablecoins, RWAs, and DeFi across various blockchains. Its modular design allows developers to tap into multi-chain staking rewards with one integration, greatly lowering development costs and enhancing user simplicity. 13 | 14 | ## Understanding Bifrost 15 | 16 | ![Bifrost's vision](/bifrost-vision.jpeg) 17 | 18 | The easiest way to understand Bifrost is to see it as a derivative issuer that provides liquidity for all pledged assets, issuing corresponding shadow assets during the bonding period of the original assets. At the same time, the shadow asset is a fungible Token that can be circulated in different DEXs, pools, protocols and across chains. 19 | 20 | As a DeFi protocol, Bifrost is aiming to solve the following issues in PoS ecosystems: 21 | - The paradox between staking rewards and DeFi yields 22 | - The balance between staking/circulating tokens and security of PoS chains 23 | - Staking rewards in cross-chain scenario 24 | 25 | According to the questions above, Bifrost's solution vToken (liquid staking voucher Token) enables users to convert their PoS tokens into vTokens in order to obtain staking liquidity and staking rewards synchronously, without barriers in cross-chain scenarios. 26 | 27 | ![Bifrost solution](/bifrost-solution.jpeg) 28 | 29 | ## Why choose Bifrost? 30 | 31 | Have a look to the blog article: [A Deep Dive into Bifrost App Chain Liquid Staking Strategy](https://bifrost.io/blog/article-9) 32 | 33 | ### Liquid-Staking 34 | Mint vTokens on Bifrost (equals stake through Bifrost), you can control your underlying staking assets during the locked period. 35 | 36 | ### Automatic Staking Management 37 | Bifrost Staking protocols run under the Bifrost pallets, earning staking rewards every era, without centralized risks. 38 | 39 | ### Reduced Unstaking Period 40 | Bifrost SLP helps users to realize the possibility of early redemption by matching the real-time staking quantity with the redemption quantity at the protocol layer in the form of a queue. Theoretically, it can achieve faster redemption. 41 | 42 | ### Extra Staking Returns + DeFi Yields 43 | Bifrost offers delegate staking for users by selecting a set of validators and rebalancing the rewards to give more profitable solutions. By holding vTokens, you will have chances to head into a world of yield scenarios. -------------------------------------------------------------------------------- /content/docs/builder-programs/interstellar-odyssey.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Interstellar Odyssey 3 | description: Large liquidity incentive campaign for builders on various ecosystems 4 | --- 5 | 6 | ## Overview 7 | 8 | [DeFi Singularity](https://defisingularity.com) is an upcoming incentive program for Liquidity Providers (LP) in selected pools on Ethereum, Base, Arbitrum and BNB Chain. Total 765,000 DOT (to be paid out in vDOT) as rewards for LPs. 9 | 10 | ## Ideas 11 | 12 | | Project Type | Description | Examples | 13 | |-------------|-------------|-----------| 14 | | LP management tool | | Beefy | 15 | 16 | ## Requirements 17 | 18 | - Fully open source is a requirement so please include all the relevant repos in your submission. 19 | - You can submit multiple times for the same project but each submission should have a key improvement to core features. 20 | - Your project should be deployed on a compatible testnet or mainnet. Check the list here. 21 | 22 | 23 | ## Bounty Lifecycle 24 | 25 | - Go to the Issue section for this GItHub repo: https://github.com/bifrost-io/mono/issues 26 | - Use the proposal template to create a proposal describing your idea. 27 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 28 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 29 | - Bounty will be evaluated by the Bounty Committee 30 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 31 | - Re-submission and adjustments could be required. 32 | - We will assign a bounty amount based on the quality of the submission. 33 | - The Bounty Committee will vote to approve payment of the proposal. 34 | - The committee can decide to accept the application in whole / partially or reject it. 35 | - The Bounty Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 36 | - Accepted bounty applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 37 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 38 | - Create a repository in your GitHub account named `bifrost-io`. 39 | - Create a file inside the repository named `funding.json`. 40 | - Add the following JSON to the file: 41 | ``` 42 | { 43 | "bifrost": "your_bifrost_wallet_address" 44 | } 45 | ``` 46 | - An example can be found here [https://github.com/zxstim/bifrost-io/blob/main/funding.json](https://github.com/zxstim/bifrost-io/blob/main/funding.json) 47 | - Wait for payout 48 | 49 | ## Resources 50 | 51 | **Read me first :** 52 | 53 | - [The Bifrost omni-chain liquid staking vision.](https://forum.polkadot.network/t/slpx-the-omni-chain-liquid-staking-vision-via-xcm/3836) 54 | - [SLPx - The revolution begins](https://bifrost-finance.medium.com/slpx-pallet-a-further-step-into-the-omni-chain-liquid-staking-68cb4d99c82f). 55 | - [SLPx - Integration for Builders](https://docs.bifrost.finance/builders/liquid-staking-x-slpx/overview). 56 | - [Omni LS DApp - Building on top of SLPx.](https://bifrost-finance.medium.com/omni-ls-dapp-the-easiest-fastest-and-most-secure-way-to-access-bifrost-liquid-staking-tokens-21ee080b03cd) -------------------------------------------------------------------------------- /content/docs/vtokens/vmanta.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vMANTA 3 | description: Understanding vMANTA 4 | --- 5 | 6 | ## What is vMANTA? 7 | 8 | vMANTA (voucher MANTA) is a shadow token of staked MANTA, with fully underlying MANTA reserve and yield-bearing feature of MANTA staking reward. Users can deposit MANTA into Bifrost SLP protocol and get vMANTA as return, vMANTA can be traded in the open market or be redeemed back to MANTA. Holding vMANTA equals to holding the MANTA staking position, staking rewards appreciate the exchange price of vMANTA. 9 | 10 | 11 | Staking rewards automatically add to the vMANTA exchange price, no manual claim. The longer vMANTA postion holding, the greater amount of MANTA will be exchanged back when redemption. 12 | 13 | 14 | ## Why vMANTA? 15 | 16 | 17 | **Liquid Staking** 18 | 19 | 20 | The product allows users to delegate MANTA for liquid vToken, (vMANTA). vMANTA will keep receiving staking rewards and can continue to be used in Bifrost and Polkadot-based DeFi for additional rewards. 21 | 22 | 23 | **Automatically Staking rewards capturing without scenario limitations** 24 | 25 | 26 | SLP will issue Staking rewards to vMANTA by adjusting the price of vMANTA / MANTA upwards. vMANTA Rate = SLP Staking MANTA (SUM) / vMANTA Total Issuance. 27 | 28 | 29 | **Floating redemption period, vMANTA ≤ 168 hours** 30 | 31 | 32 | While Manta’s original chain Staking has a fixed revoke period, Bifrost SLP helps users to realize the possibility of **early vMANTA redemption** by matching the real-time vMANTA minting quantity with the redemption quantity at the protocol layer in form of a queue. 33 | 34 | 35 | **Higher Staking Yield** 36 | 37 | 38 | In the SLP protocol, the protocol screens **verified nodes** through governance (subsequently increasing with the overall staking volume) and adds multiple filters such as the **number of nominees and** **history of blocks out to maximize the return of this verifier portfolio** while ensuring that none of the nodes have experienced slashes. 39 | 40 | 41 | **Multi-environment Compatibility** 42 | 43 | 44 | vMANTA is one of Substrate assets in Bifrost parachain, by using the [HRMP](https://wiki.polkadot.network/docs/learn-crosschain#xcmp-cross-chain-message-passing) channels between Bifrost and others, it can be easily utilized in EVM, WASM and Substarte competiable parachains. 45 | 46 | ## How it works? 47 | 48 | vMANTA is issued on Bifrost chain, but it can be directlyminted on Ethereum - powered by SLPx 2.0. 49 | 50 | ### Mint vMANTA 51 | 52 | 1. User mints vMANTA by interact with vMANTA Vault contract; 53 | 2. Bifrost receives MANTA and bridge to Ethereum mainnet Vault contract; 54 | 3. The Vault contract stakes MANTA to Symbiotic. 55 | 56 | ### Redeem vMANTA 57 | 58 | 1. User bridges vMANTA back to Ethereum mainnet and interact with vMANTA Vault contract; 59 | 2. The Vault contract unstakes MANTA from Symbiotic; 60 | 3. User receives redeemed MANTA. 61 | 62 | ### MANTA Reward 63 | 64 | The MANTA reward will be reinvested on Manta, and the Oracle will transmit the reward data to the MANTA Ready Pool to adjust the vMANTA exchange rate. 65 | 66 | $$ 67 | vMANTA rate=(StakedMANTA+StakingReward)/vMANTA Allocation 68 | $$ 69 | 70 | 💡 Read more detailed info in the following sections. 71 | 72 | *** 73 | -------------------------------------------------------------------------------- /content/docs/slpx-protocol.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: SLPx Protocol 3 | description: Understanding Bifrost SLPx Protocol 4 | --- 5 | 6 | ## Crosschain architecture and SLPx 7 | 8 | ### Bifrost's Unique Approach 9 | Unlike Ethereum's liquid staking protocols, Bifrost from inception has supported Polkadot's Omni-chain ecosystem. This strategic choice allows Bifrost to address the cross-chain friction users face when minting and using vTokens across the Omni-chain. 10 | 11 | ### Why use a crosschain architecture? 12 | To understand the need for cross-chain architecture, consider a user who intends to mint vGLMR. They must first transfer GLMR from Moonbeam to the Bifrost-Polkadot chain. After minting, if the user wishes to use it on Moonbeam, they must transfer the vGLMR back to Moonbeam. This complex process requires multiple transactions, making it cumbersome for the user. 13 | 14 | However, Bifrost's cross-chain architecture and SLPx module simplify these complexities. They offer users a seamless experience by combining all vToken minting processes into one transaction on a single chain. 15 | 16 | ![SLPx architecture](/bifrost-slpx-architecture.jpeg) 17 | 18 | #### Simplified Process 19 | 20 | Under the crosschain architecture, instead of deploying SLP modules on multiple chains, Bifrost allows other chains to utilize the existing SLP modules on the Bifrost-Polkadot, Bifrost-Kusama, and Ethereum chains through crosschain remote calls. 21 | 22 | For instance, to mint vGLMR, users only need to initiate a minting request on Moonbeam. The remote call module on Moonbeam will cross-chain transfer the user's GLMR to the Bifrost-Polkadot chain, where it is minted into vGLMR. After minting, vGLMR is transferred back to the Moonbeam chain. 23 | 24 | Throughout this process, users do not perceive the underlying crosschain operations; they only experience the seamless minting of GLMR into vGLMR on Moonbeam. 25 | 26 | ![Bifrost minting process](/bifrost-minting.png) 27 | 28 | The redemption of vGLMR to GLMR and swaps follows a similar mechanism. 29 | 30 | Like a chain franchise, this structure resembles a "headquarters + branch" system. Users interact with the branches on different chains. These branches communicate with the headquarters to obtain results, which are then presented to the users. This abstraction allows users to interact with the branches without being aware of the underlying crosschain operations. 31 | 32 | ![Bifrost multichain](/bifrost-multichain.png) 33 | 34 | ## Advantages of Cross-chain Architecture 35 | 36 | ### Unified Liquidity 37 | 38 | Bifrost eliminates the need to bootstrap the liquidity of vTokens on multiple chains by consolidating liquidity onto a single chain. This optimization reduces user transaction fees and improves overall efficiency. 39 | 40 | For example, when users want to swap vGLMR to GLMR, they can utilize the unified liquidity pool on the Bifrost-Polkadot chain via remote calls. This approach ensures better transaction prices and execution, avoiding the additional costs associated with bootstrapping liquidity on other chains like Moonbeam. 41 | 42 | ### Crosschain composability 43 | 44 | 45 | Have a look to the blog article: [Bifrost Tokenomics and vTokens Application Scenarios](https://bifrost.io/blog/bifrost-tokenomics-and-vtokens-application-scenarios) 46 | 47 | 48 | Furthermore, when a DeFi project seeks to integrate vTokens, it no longer needs to integrate SLP modules from different chains separately. Instead, the project only needs to communicate with the primary SLP protocol on a single chain (or a few selected chains). 49 | 50 | The SLP modules on Bifrost-Polkadot, Bifrost-Kusama, and Ethereum maintain the global and comprehensive status of vTokens. Ideally, in a fully interoperable blockchain ecosystem, the SLP module on Bifrost-Polkadot will hold the global and comprehensive status of vTokens, streamlining the integration process for various DeFi projects. -------------------------------------------------------------------------------- /content/docs/hackathons/consensus-hongkong-2025.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Consensus HongKong Hackathon 3 | description: Bifrost Consensus HongKong Hackathon challenge 4 | --- 5 | 6 | ## Context 7 | Bifrost is a Liquid Staking app-chain tailored for all blockchains, utilizing decentralized cross-chain interoperability to empower users to earn staking rewards and DeFi yields with flexibility, liquidity, and high security across multiple chains. 8 | 9 | ## Challenge details 10 | **Create a unique and optimal UX for interacting with Bif rost Liquid Staking Tokens available on many chains** 11 | 12 | To achieve this, you can: 13 | - Create a new frontend experience for mint/redeem/track with Bifrost Liquid Staking Tokens 14 | - Create a new mobile app for mint/redeem/track with Bifrost Liquid Staking Tokens 15 | - Create an AI agent that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 16 | - Create an intent system that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 17 | - ... and more 18 | 19 | ## Judging criteria 20 | - **Originality**: How unique and innovative is the UX approach? 21 | - **User Experience**: How easy is the UX to use? 22 | - **Technical Implementation**: How well is the UX implemented? 23 | - **Community integration**: How well integrated is the UX with the Bifrost community? 24 | 25 | 26 | ## Engage with the community 27 | - Join the Bifrost Community on X: [https://x.com/i/communities/1866708831591600383](https://x.com/i/communities/1866708831591600383) 28 | - Post about your idea and get instant feedback. Admins will help sharing to other groups. 29 | 30 | ## Requirements 31 | - Fully open source is a requirement so please include all the relevant repos in your submission. 32 | - You can submit multiple times for the same project for additional grants but each submission should have a key improvement to core features. 33 | - Your project should be deployed on a compatible testnet or mainnet. Check the [list](https://docs.bifrost.io/for-builders/build-with-slpx/supported-networks) here. 34 | 35 | ## Submission guidelines 36 | - Go to the Issue section for this GitHub repo: https://github.com/bifrost-io/mono/issues 37 | - Use the proposal template to create a proposal describing your idea. 38 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 39 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 40 | - Grant will be evaluated by the Grant Committee 41 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 42 | - Re-submission and adjustments could be required. 43 | - We will assign a grant amount based on the quality of the submission. 44 | - The grant Committee will vote to approve payment of the proposal. 45 | - The committee can decide to accept the application in whole / partially or reject it. 46 | - The Grant Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 47 | - Accepted grant applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 48 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 49 | - Create a repository in your GitHub account named `bifrost-io`. 50 | - Create a file inside the repository named `funding.json`. 51 | - Add the following JSON to the file: 52 | ``` 53 | { 54 | "bifrost": "your_bifrost_wallet_address" 55 | } 56 | ``` 57 | - Wait for payout 58 | 59 | ## Resources 60 | - Docs for human: [https://docs.bifrost.io](https://docs.bifrost.io) 61 | - Mono repo: [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) 62 | - Builder program: [https://github.com/bifrost-io/mono/tree/main/builder-program](https://github.com/bifrost-io/mono/tree/main/builder-program) 63 | - AI friendly docs: [https://github.com/bifrost-io/mono/blob/main/docs](https://github.com/bifrost-io/mono/blob/main/docs) 64 | - Testnet kit: [https://github.com/buildstationorg/bifrost-testnetkit](https://github.com/buildstationorg/bifrost-testnetkit) 65 | 66 | ## Prizes 67 | - $300 - $1000+ depending on the submission quality 68 | 69 | ## Post hackathon resources 70 | For Bifrost track participants, we will be giving more grants, technical support and a marketing intern to help you launch your project; plus we have a revenue share program for you to create a sustainable revenue stream from day one. 71 | -------------------------------------------------------------------------------- /content/docs/hackathons/ethdenver-webzero-2025.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: ETHDenver WebZero Hackerhouse 3 | description: Bifrost ETHDenver WebZero Hackerhouse challenge 4 | --- 5 | 6 | ## Context 7 | Bifrost is a Liquid Staking app-chain tailored for all blockchains, utilizing decentralized cross-chain interoperability to empower users to earn staking rewards and DeFi yields with flexibility, liquidity, and high security across multiple chains. 8 | 9 | ## Challenge details 10 | **Create a unique and optimal UX for interacting with Bifrost Liquid Staking Tokens available on many chains** 11 | 12 | To achieve this, you can: 13 | - Create a new frontend experience for mint/redeem/track with Bifrost Liquid Staking Tokens 14 | - Create a new mobile app for mint/redeem/track with Bifrost Liquid Staking Tokens 15 | - Create an AI agent that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 16 | - Create an intent system that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 17 | - ... and more 18 | 19 | ## Judging criteria 20 | - **Originality**: How unique and innovative is the UX approach? 21 | - **User Experience**: How easy is the UX to use? 22 | - **Technical Implementation**: How well is the UX implemented? 23 | - **Community integration**: How well integrated is the UX with the Bifrost community? 24 | 25 | 26 | ## Engage with the community 27 | - Join the Bifrost Community on X: [https://x.com/i/communities/1866708831591600383](https://x.com/i/communities/1866708831591600383) 28 | - Post about your idea and get instant feedback. Admins will help sharing to other groups. 29 | 30 | ## Requirements 31 | - Fully open source is a requirement so please include all the relevant repos in your submission. 32 | - You can submit multiple times for the same project for additional grants but each submission should have a key improvement to core features. 33 | - Your project should be deployed on a compatible testnet or mainnet. Check the [list](https://docs.bifrost.io/for-builders/build-with-slpx/supported-networks) here. 34 | 35 | ## Submission guidelines 36 | - Go to the Issue section for this GitHub repo: https://github.com/bifrost-io/mono/issues 37 | - Use the proposal template to create a proposal describing your idea. 38 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 39 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 40 | - Grant will be evaluated by the Grant Committee 41 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 42 | - Re-submission and adjustments could be required. 43 | - We will assign a grant amount based on the quality of the submission. 44 | - The grant Committee will vote to approve payment of the proposal. 45 | - The committee can decide to accept the application in whole / partially or reject it. 46 | - The Grant Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 47 | - Accepted grant applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 48 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 49 | - Create a repository in your GitHub account named `bifrost-io`. 50 | - Create a file inside the repository named `funding.json`. 51 | - Add the following JSON to the file: 52 | ``` 53 | { 54 | "bifrost": "your_bifrost_wallet_address" 55 | } 56 | ``` 57 | - Wait for payout 58 | 59 | ## Resources 60 | - Docs for human: [https://docs.bifrost.io](https://docs.bifrost.io) 61 | - Mono repo: [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) 62 | - Builder program: [https://github.com/bifrost-io/mono/tree/main/builder-program](https://github.com/bifrost-io/mono/tree/main/builder-program) 63 | - AI friendly docs: [https://github.com/bifrost-io/mono/blob/main/docs](https://github.com/bifrost-io/mono/blob/main/docs) 64 | - Testnet kit: [https://github.com/buildstationorg/bifrost-testnetkit](https://github.com/buildstationorg/bifrost-testnetkit) 65 | 66 | ## Prizes 67 | - $300 - $1000+ depending on the submission quality 68 | 69 | ## Post hackathon resources 70 | For Bifrost track participants, we will be giving more grants, technical support and a marketing intern to help you launch your project; plus we have a revenue share program for you to create a sustainable revenue stream from day one. 71 | -------------------------------------------------------------------------------- /content/docs/hackathons/polkadot-hackathon-encode-2025.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Polkadot Hackathon By Encode 2025 3 | description: Bifrost Polkadot Hackathon by Encode challenge 4 | --- 5 | 6 | ## Context 7 | Bifrost is a Liquid Staking app-chain tailored for all blockchains, utilizing decentralized cross-chain interoperability to empower users to earn staking rewards and DeFi yields with flexibility, liquidity, and high security across multiple chains. 8 | 9 | ## Challenge details 10 | **Create a unique and optimal UX for interacting with Bifrost Liquid Staking Tokens available on many chains** 11 | 12 | To achieve this, you can: 13 | - Create a new frontend experience for mint/redeem/track with Bifrost Liquid Staking Tokens 14 | - Create a new mobile app for mint/redeem/track with Bifrost Liquid Staking Tokens 15 | - Create an AI agent that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 16 | - Create an intent system that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 17 | - ... and more 18 | 19 | ## Judging criteria 20 | - **Originality**: How unique and innovative is the UX approach? 21 | - **User Experience**: How easy is the UX to use? 22 | - **Technical Implementation**: How well is the UX implemented? 23 | - **Community integration**: How well integrated is the UX with the Bifrost community? 24 | 25 | 26 | ## Engage with the community 27 | - Join the Bifrost Community on X: [https://x.com/i/communities/1866708831591600383](https://x.com/i/communities/1866708831591600383) 28 | - Post about your idea and get instant feedback. Admins will help sharing to other groups. 29 | 30 | ## Requirements 31 | - Fully open source is a requirement so please include all the relevant repos in your submission. 32 | - You can submit multiple times for the same project for additional grants but each submission should have a key improvement to core features. 33 | - Your project should be deployed on a compatible testnet or mainnet. Check the [list](https://docs.bifrost.io/for-builders/build-with-slpx/supported-networks) here. 34 | 35 | ## Submission guidelines 36 | - Go to the Issue section for this GItHub repo: https://github.com/bifrost-io/mono/issues 37 | - Use the proposal template to create a proposal describing your idea. 38 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 39 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 40 | - Grant will be evaluated by the Grant Committee 41 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 42 | - Re-submission and adjustments could be required. 43 | - We will assign a grant amount based on the quality of the submission. 44 | - The grant Committee will vote to approve payment of the proposal. 45 | - The committee can decide to accept the application in whole / partially or reject it. 46 | - The Grant Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 47 | - Accepted grant applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 48 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 49 | - Create a repository in your GitHub account named `bifrost-io`. 50 | - Create a file inside the repository named `funding.json`. 51 | - Add the following JSON to the file: 52 | ``` 53 | { 54 | "bifrost": "your_bifrost_wallet_address" 55 | } 56 | ``` 57 | - Wait for payout 58 | 59 | ## Resources 60 | - Docs for human: [https://docs.bifrost.io](https://docs.bifrost.io) 61 | - Mono repo: [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) 62 | - Builder program: [https://github.com/bifrost-io/mono/tree/main/builder-program](https://github.com/bifrost-io/mono/tree/main/builder-program) 63 | - AI friendly docs: [https://github.com/bifrost-io/mono/blob/main/docs](https://github.com/bifrost-io/mono/blob/main/docs) 64 | - Testnet kit: [https://github.com/buildstationorg/bifrost-testnetkit](https://github.com/buildstationorg/bifrost-testnetkit) 65 | 66 | ## Prizes 67 | - $300 - $1000+ depending on the submission quality 68 | 69 | ## Post hackathon resources 70 | For Bifrost track participants, we will be giving more grants, technical support and a marketing intern to help you launch your project; plus we have a revenue share program for you to create a sustainable revenue stream from day one. -------------------------------------------------------------------------------- /content/docs/builder-programs/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Builder programs 3 | description: Supporting builders to adopt Bifrost protocol 4 | --- 5 | 6 | Open Bounties, RFPs for ideas that are identified by Bifrost core contributors. If you have the skills, expertise and experience to create, develop and deliver, we want to hear from you! 7 | 8 | **Its time to join the DeFi Revolution!** 9 | 10 | ## Ideas 11 | 12 | | Project Type | Description | Examples | 13 | |-------------|-------------|-----------| 14 | | DeFi LST Data Dashboard | An interactive tool that compares yield and LP opportunities on Bifrost vs other LST protocols. This tool would show current yield, historical yield, and other metrics. | - | 15 | | LST Yield Trading Protocol | Build a permissionless yield-trading protocol where users can execute various yield management strategies for their vTokens - fixed yield (i.e. earn fixed yield on vDOT), long yield (i.e. bet on vDOT yield going up by purchasing more yield). | Pendle Finance, Spectra, Flashstake | 16 | | Project LaunchPad | Build a project launchpad where projects obtain bootstrap funds by raising and locking vTokens to receive Staking Rewards. In return, vToken stakers will receive the project's Native Token. After the vToken lock-up period ends, it will be automatically returned to the stakers. | - | 17 | | Lossless Prediction Market | Build a Lossless Prediction Market for vToken, where users accumulate a fund pool using vToken's Staking Reward, and periodically earn rewards from the fund pool by predicting token prices or real-world assets or events. | - | 18 | | LST Backed Stablecoin | Build a decentralised yield bearing stablecoin backed by Bifrost vToken. | Prisma Finance, Lybra Finance | 19 | | LST Index | Build a dedicated swap and yield optimization platform for all Bifrost ecosystem vTokens. Deposit any Bifrost vToken and in return receive an index token. | UnshETH | 20 | | Asymmetric Staking Yield Distribution Protocol | Build a decentralised, non custodial protocol for asymmetric yields distribution generating from staking. Staking yield is periodically distributed by the protocol between pool participants randomly and asymmetrically making staking more fun. | Asymetrix Protocol | 21 | | LST Yield Strategies Integration | Implement LST leveraged yield strategies in yield farming protocols. | Yearn, InstaDapp, DeFi Saver, Harvest | 22 | | On-chain Game via LSTs | Create a simple fully onchain game PvP like "Rock, Paper, Scissors" allowing players to wager vTokens staking rewards and play against each other. | - | 23 | 24 | ## Requirements 25 | 26 | - Fully open source is a requirement so please include all the relevant repos in your submission. 27 | - You can submit multiple times for the same project but each submission should have a key improvement to core features. 28 | - Your project should be deployed on a compatible testnet or mainnet. Check the list here. 29 | 30 | 31 | ## Bounty Lifecycle 32 | 33 | - Go to the Issue section for this GItHub repo: https://github.com/bifrost-io/developers/issues 34 | - Use the proposal template to create a proposal describing your idea. 35 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 36 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 37 | - Bounty will be evaluated by the Bounty Committee 38 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 39 | - Re-submission and adjustments could be required. 40 | - We will assign a bounty amount based on the quality of the submission. 41 | - The Bounty Committee will vote to approve payment of the proposal. 42 | - The committee can decide to accept the application in whole / partially or reject it. 43 | - The Bounty Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 44 | - Accepted bounty applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 45 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 46 | - Create a repository in your GitHub account named `bifrost-io`. 47 | - Create a file inside the repository named `funding.json`. 48 | - Add the following JSON to the file: 49 | ``` 50 | { 51 | "bifrost": "your_bifrost_wallet_address" 52 | } 53 | ``` 54 | - An example can be found here [https://github.com/zxstim/bifrost-io/blob/main/funding.json](https://github.com/zxstim/bifrost-io/blob/main/funding.json) 55 | - Wait for payout -------------------------------------------------------------------------------- /content/docs/hackathons/hackcamp-danang-openguild-2025.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: HackCamp Danang OpenGuild 2025 3 | description: Bifrost HackCamp Danang OpenGuild 2025 challenge 4 | --- 5 | 6 | ## Context 7 | Bifrost is a Liquid Staking app-chain tailored for all blockchains, utilizing decentralized cross-chain interoperability to empower users to earn staking rewards and DeFi yields with flexibility, liquidity, and high security across multiple chains. 8 | 9 | ## Challenge details 10 | **Create a unique and optimal UX for interacting with Bifrost Liquid Staking Tokens available on many chains** 11 | 12 | To achieve this, you can: 13 | - Create a new frontend experience for mint/redeem/track with Bifrost Liquid Staking Tokens 14 | - Create a new mobile app for mint/redeem/track with Bifrost Liquid Staking Tokens 15 | - Create an AI agent that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 16 | - Create an intent system that can help users mint/redeem/track with Bifrost Liquid Staking Tokens 17 | - ... and more 18 | 19 | ## Judging criteria 20 | - **Originality**: How unique and innovative is the UX approach? 21 | - **User Experience**: How easy is the UX to use? 22 | - **Technical Implementation**: How well is the UX implemented? 23 | - **Community integration**: How well integrated is the UX with the Bifrost community? 24 | 25 | 26 | ## Engage with the community 27 | - Join the Bifrost Community on X: [https://x.com/i/communities/1866708831591600383](https://x.com/i/communities/1866708831591600383) 28 | - Post about your idea and get instant feedback. Admins will help sharing to other groups. 29 | 30 | ## Requirements 31 | - Fully open source is a requirement so please include all the relevant repos in your submission. 32 | - You can submit multiple times for the same project for additional grants but each submission should have a key improvement to core features. 33 | - Your project should be deployed on a compatible testnet or mainnet. Check the [list](https://docs.bifrost.io/for-builders/build-with-slpx/supported-networks) here. 34 | 35 | ## Submission guidelines 36 | - Go to the Issue section for this GitHub repo: https://github.com/bifrost-io/mono/issues 37 | - Use the proposal template to create a proposal describing your idea. 38 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. 39 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 40 | - Grant will be evaluated by the Grant Committee 41 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 42 | - Re-submission and adjustments could be required. 43 | - We will assign a grant amount based on the quality of the submission. 44 | - The grant Committee will vote to approve payment of the proposal. 45 | - The committee can decide to accept the application in whole / partially or reject it. 46 | - The Grant Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 47 | - Accepted grant applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 48 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 49 | - Create a repository in your GitHub account named `bifrost-io`. 50 | - Create a file inside the repository named `funding.json`. 51 | - Add the following JSON to the file: 52 | ``` 53 | { 54 | "bifrost": "your_bifrost_wallet_address" 55 | } 56 | ``` 57 | - Wait for payout 58 | 59 | ## Resources 60 | - Docs for human: [https://docs.bifrost.io](https://docs.bifrost.io) 61 | - Mono repo: [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) 62 | - Builder program: [https://github.com/bifrost-io/mono/tree/main/builder-program](https://github.com/bifrost-io/mono/tree/main/builder-program) 63 | - AI friendly docs: [https://github.com/bifrost-io/mono/blob/main/docs](https://github.com/bifrost-io/mono/blob/main/docs) 64 | - Testnet kit: [https://github.com/buildstationorg/bifrost-testnetkit](https://github.com/buildstationorg/bifrost-testnetkit) 65 | - Workshop presentation video: [https://youtu.be/LCEPFVbm7YQ?si=pknjO90dzJC-Gsy1](https://youtu.be/LCEPFVbm7YQ?si=pknjO90dzJC-Gsy1) 66 | 67 | ## Prizes 68 | - $300 - $1000+ depending on the submission quality 69 | 70 | ## Post hackathon resources 71 | For Bifrost track participants, we will be giving more grants, technical support and a marketing intern to help you launch your project; plus we have a revenue share program for you to create a sustainable revenue stream from day one. -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Welcome to Bifrost Developers contributing guide 2 | 3 | Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) :sparkles:. 4 | 5 | Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. 6 | 7 | In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. 8 | 9 | Use the table of contents icon Table of contents icon on the top left corner of this document to get to a specific section of this guide quickly. 10 | 11 | ## New contributor guide 12 | 13 | To get an overview of the project, read the [README](../README.md) file. Here are some resources to help you get started with open source contributions: 14 | 15 | - [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) 16 | - [Set up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git) 17 | - [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) 18 | - [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) 19 | 20 | ## Getting started 21 | 22 | To navigate our codebase with confidence, see [Getting Started section](./README.md/#getting-started) :confetti_ball:. For more information on how we write our markdown files, see "[Using Markdown and Liquid in GitHub Docs](https://docs.github.com/en/contributing/writing-for-github-docs/using-markdown-and-liquid-in-github-docs)." 23 | 24 | Check to see what [types of contributions](./CONTRIBUTING.md/#types-of-contributions) we accept before making changes. Some of them don't even require writing a single line of code :sparkles:. 25 | 26 | ### Issues 27 | 28 | #### Create a new issue 29 | 30 | If you spot a problem with the repository or want to suggest some changes, you can open an `issue` in the [Issue tab](https://github.com/bifrost-io/mono/issues) 31 | 32 | 33 | ### Make Changes 34 | 35 | #### Make changes locally 36 | 37 | 1. Fork the repository. 38 | - Using GitHub Desktop: 39 | - [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop. 40 | - Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)! 41 | 42 | - Using the command line: 43 | - [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them. 44 | 45 | 2. Create a working branch (preferably a branch with your GitHub username) and start with your changes! 46 | 47 | ### Commit your update 48 | 49 | Commit the changes once you are happy with them :zap:. 50 | 51 | ### Pull Request 52 | 53 | When you're finished with the changes, create a pull request, also known as a PR. 54 | - Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request. 55 | - Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one. 56 | - Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. 57 | Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request additional information. 58 | - We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. 59 | - As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). 60 | - If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues. 61 | 62 | ### Your PR is merged! 63 | 64 | Congratulations :tada::tada: Kaia Foundation thanks you :sparkles:. 65 | 66 | Once your PR is merged, your contributions will be publicly visible on the [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono). 67 | 68 | Now that you are part of the Kaia OSS community, see how else you can [contribute to the OSS ecosystem](./CONTRIBUTING.md/#types-of-contributions). 69 | 70 | 71 | ## Types of contributions -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | 0x.stim@klaytn.foundation. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /content/docs/hackathons/dot-your-future-oneblock-2025.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dot Your Future OneBlock Hackathon 2025 3 | description: Bifrost Dot Your Future Hackathon challenge 4 | --- 5 | 6 | ## Context 7 | Bifrost is a Liquid Staking app-chain tailored for all blockchains, utilizing decentralized cross-chain interoperability to empower users to earn staking rewards and DeFi yields with flexibility, liquidity, and high security across multiple chains. 8 | 9 | ## Challenge details 10 | **Design and implement a novel and high-quality user experience for interacting with Bifrost’s widely used liquid staking tokens in a multi-chain environment on Polkadot.** 11 | 12 | We encourage participating teams to prioritize a user-centric perspective, creating smooth and intuitive front-end interaction flows that support functions such as minting, redeeming, and real-time status tracking of liquid staking tokens. 13 | 14 | To achieve this, you can: 15 | - Building a new front-end interaction interface to optimize the overall user journey of Bifrost liquid staking 16 | - Enabling visual monitoring and management of staked assets across multiple chains 17 | - Designing clear and user-friendly data display and operation feedback mechanisms 18 | 19 | ## Judging criteria 20 | - **Originality**: Whether the solution demonstrates innovation and differentiated design 21 | - **User Experience**: Smoothness of interaction, clarity of visuals, and ease of use of functions 22 | - **Technical Implementation**: Code completeness, architectural rationality, and functional stability 23 | 24 | **Note:** AI-assisted development is allowed. However, please note that AI-generated content may have potential issues. Use it cautiously and conduct your own code review. 25 | 26 | ## Requirements 27 | - The project must be fully open-source. All relevant code repository links must be provided upon submission. 28 | - The same project may be submitted multiple times with optimized versions, but each submission must demonstrate key functional improvements. 29 | - The project must be deployed on a Bifrost-compatible testnet or mainnet. In essence, Passet Hub and Moonbase Alpha (Moonbeam Testnet). 30 | 31 | ## Submission guidelines 32 | - Go to the Issue section for this GitHub repo: https://github.com/bifrost-io/mono/issues 33 | - Use the proposal template to create a proposal describing your idea. Include this short sentence at the end of your proposal title "- Dot Your Future: Create, Connect, Transform". 34 | - Upon receiving the `approved` tag for your issue, you can start working on the submission. Should be within 2-3 hours. 35 | - Once you are done with your submission, submit the open source GitHub repo links and deployed links for your submission in the previously created Issue. 36 | - Grant will be evaluated by the Grant Committee 37 | - Initial evaluation & feedback will be communicated with applicants as soon as possible from the date of submission. 38 | - Re-submission and adjustments could be required. 39 | - We will assign a grant amount based on the quality of the submission. 40 | - The grant Committee will vote to approve payment of the proposal. 41 | - The committee can decide to accept the application in whole / partially or reject it. 42 | - The Grant Committee will communicate their decision (approval or rejection) to the applicant. Your issue will be marked `cleared` after payout has been approved and `paid` after payout has been transferred. 43 | - Accepted grant applications will be published on the [Bifrost forum](https://bifrost.subsquare.io/). 44 | - For receiving the grant, you need to provide your Bifrost wallet address. Follow these steps: 45 | - Create a repository in your GitHub account named `bifrost-io`. 46 | - Create a file inside the repository named `funding.json`. 47 | - Add the following JSON to the file: 48 | ``` 49 | { 50 | "bifrost": "your_bifrost_wallet_address" 51 | } 52 | ``` 53 | - Wait for payout 54 | 55 | ## Resources 56 | - Short video explainer: [Youtube](https://youtu.be/44ZAQX2FwNs?si=pzhHUiQQ-_tUJegF) 57 | - Docs for human: [https://docs.bifrost.io](https://docs.bifrost.io) 58 | - Mono repo: [https://github.com/bifrost-io/mono](https://github.com/bifrost-io/mono) 59 | - Builder program: [https://github.com/bifrost-io/mono/tree/main/builder-program](https://github.com/bifrost-io/mono/tree/main/builder-program) 60 | - AI friendly docs: [https://github.com/bifrost-io/mono/blob/main/docs](https://github.com/bifrost-io/mono/blob/main/docs) 61 | - Bifrost UI kit: [https://github.com/buildstationorg/bifrost-ui-kit](https://github.com/buildstationorg/bifrost-ui-kit) 62 | - Bifrost Dev Kit: [https://github.com/buildstationorg/bifrost-dev-kit](https://github.com/buildstationorg/bifrost-dev-kit) 63 | - Ask any questions by tagging [@FrostyLst](https://x.com/FrostyLst) on X. 64 | 65 | ## Prizes 66 | - Individual awards range from $300 to $1000, with specific amounts determined based on project quality. 67 | - Exceptional projects may receive higher rewards. 68 | - For reference of previously funded projects, see: [Closed Issues](https://github.com/bifrost-io/mono/issues?q=is%3Aissue%20state%3Aclosed) 69 | - Total prize pool status: [Mimir Bifrost Grant Fund](https://app.mimir.global/?address=136qTNfobHieiT4CHYLwNcrjUj92YBYV8BViaj49LCx5AW5z&network=bifrost-polkadot&tab=asset) 70 | ### 🪧 Hackathon Special Awards (Sponsored by Bifrost: 2500 USDT in BNC) 71 | - 🌟 Best Innovation Award: 500U × 1 winner 72 | - ⚙️ Best Technical Implementation Award: 500U × 1 winner 73 | - 🎯 Potential Award: 300U × 5 winners 74 | 75 | ## Post-Hackathon Incubation Support 76 | - Bifrost will provide ongoing support for outstanding projects, including: 77 | - Additional project funding and technical guidance 78 | - Matching with marketing interns to assist promotion 79 | - Revenue sharing program to support sustainable business models 80 | 81 | ## Timeline 82 | ⏰ Sep 11 —— Hackathon registration begins 83 | ⏳ Oct 20 —— Early-bird registration deadline 84 | 📅 Oct 27 —— Code submission deadline ` 85 | 💻 Oct 30 —— Demo Day(Online) -------------------------------------------------------------------------------- /content/docs/protocol-security.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Protocol Security 3 | description: Understanding Bifrost Protocol Security 4 | --- 5 | 6 | ## Bifrost security model 7 | In the world of DeFi, Liquid Staking has surpassed decentralized exchanges (DEXs) to achieve the highest Total Value Locked (TVL). Liquid Staking Token (LST) protocols manage substantial assets, significantly impacting the security and functionality of their underlying Proof-of-Stake (PoS) chains. 8 | 9 | [Bifrost's crosschain architecture](https://bifrost.io/blog/a-deep-dive-into-crosschain-architecture-and-slpx) enhances the interoperability and efficiency of DeFi applications. However, effective cross-chain communication and seamless user experiences require a robust security framework. Bifrost addresses this need with a comprehensive security model that protects staked assets and maintains network integrity. 10 | 11 | ## Key Aspects of Bifrost's Security Model 12 | 13 | ### Polkadot's Shared Security 14 | The Bifrost Polkadot and Bifrost Kusama chains are parachains of Polkadot and Kusama, respectively. **Their security and resistance to reorganization are protected by the relay chain.** 15 | 16 | As widely known, Polkadot employs a shared architecture where the relay chain randomly assigns validators to parachains and verifies their blocks. The blocks of the relay chain will include the blocks of the parachain, providing data availability for the parachains. This mechanism is the foundation of Polkadot's shared security. 17 | 18 | Parachains do not require running validators, nor do they need to increase validator numbers to promote decentralization. Instead, they operate with a limited number of collator nodes. The role of collator nodes functions similarly to the Sequencer in Ethereum L2, which is responsible for collecting and ordering transactions in the parachains. The number of collators does not need to be excessive; it only needs to ensure network availability and make transactions less prone to censorship. Currently, the Bifrost Polkadot chain has over 32 collator nodes, which is more than sufficient to maintain robust network performance. 19 | 20 | ### Crosschain Communication Based on XCMP and XCM 21 | 22 | In Bifrost's cross-chain architecture, there's a significant involvement of cross-chain communication. The security of cross-chain bridges is a well-known challenge in the blockchain space. So, how does Bifrost ensure the security of cross-chain communication? The answer lies in the cross-chain communication mechanism of Polkadot. Polkadot aims not only to create a platform for shared security but also to achieve seamless cross-chain interoperability. Polkadot accomplishes this through the Cross-Chain Message Passing (XCMP) protocol and the Cross-Consensus Message (XCM) format. 23 | 24 | ### How XCMP works 25 | 26 | - Cross-chain messages enter the Egress (exit queue) of the sending chain. 27 | - Collators of the target chain collect these messages from the Egress of other chains and place them into their Ingress (entry queue). 28 | 29 | - Messages are included in the relay chain's blocks and finalized, then executed by the target chain. 30 | 31 | In summary, XCMP ensures fast, secure, ordered, and cost-effective cross-chain message delivery between Polkadot parachains. 32 | 33 | ### How XCM works: 34 | - XCM is a message format for cross-chain communication between Polkadot parachains. 35 | - XCM messages are included in the relay chain's blocks and finalized, then executed by the target chain. 36 | - XCM messages are executed by the target chain's consensus mechanism. 37 | 38 | In summary, XCM ensures fast, secure, ordered, and cost-effective cross-chain message delivery between Polkadot parachains. 39 | 40 | ![Bifrost XCM](/bifrost-xcm.jpeg) 41 | 42 | When XCMP is used for communication between parachains, XCM is used to ensure that these chains can understand each other's messages and know how to execute them. Polkadot's vision for XCM extends beyond the cross-chain communication within Polkadot. It aims to be adopted by a broader range of heterogeneous blockchains. Therefore, it is named the Cross-Consensus Message format. 43 | 44 | For a more in-depth interpretation of the operational mechanisms of XCMP and XCM, Bifrost provides detailed insights in this article: [How Bifrost Supports vMOVR and vGLMR Based on XCM](https://bifrost.io/blog/how-bifrost-supports-v-movr-and-v-glmr-based-on-xcm). 45 | 46 | However, Bifrost also acknowledges that heterogeneous cross-chain infrastructure is currently not mature. Therefore, it has not opted for a radical approach to fully implement the cross-chain architecture but instead retained the SLP modules on Ethereum and Kusama. Nevertheless, as the cryptocurrency industry develops, secure and reliable heterogeneous cross-chain solutions are expected to emerge. 47 | 48 | ### Non-custodial Mechanism and Rigorously Audited Code 49 | 50 | Bifrost adopts a fully decentralized approach to manage staked assets. All processes are completed through decentralized contracts or runtime, without any human intervention and the need to trust any third party, including the Bifrost development team. 51 | 52 | ![Bifrost non-custodial mechanism](/bifrost-mechanism.png) 53 | 54 | Furthermore, Bifrost's on-chain code is open source, allowing for public scrutiny and vulnerability reporting. The code has been rigorously audited by multiple security firms, including Beosin, Slowmist, and TokenInsight. Since its inception in 2019, Bifrost has maintained a flawless security record, demonstrating its resilience in terms of code security. 55 | 56 | ### Secure Validator Set and Slash Protection 57 | Apart from the risks of intentional misconduct and code vulnerabilities, users' staked assets may also face the risk of slashing. Staked assets essentially serve as collateral for running nodes. If a node engages in improper behavior that disrupts the network, a portion or all of the malicious node's staked funds may be slashed by the network. 58 | 59 | An LST protocol that selects validators irresponsibly can expose LST asset holders to slashing losses, which could manifest as a decrease in the exchange rate between LST and the original token. 60 | 61 | To minimize users' exposure to slashing losses, Bifrost has implemented several measures: 62 | 63 | - **Rigorous Validator Selection**: Bifrost evaluates validators not only based on profitability but also by considering factors such as the node's leverage ratio (self-staking ratio) and historical credibility. Detailed criteria and methods for selecting validators will be discussed in the next chapter. 64 | - **Proactive Node Switching**: In the event of a slashing risk, Bifrost can immediately switch nodes to prevent further losses, a capability that individual stakers typically lack. 65 | - **vToken Vault**: Bifrost has established an insurance pool called the vToken Vault, allocating 5% of the protocol's income to it. If slashing occurs, this pool compensates users for their losses. If no slashing occurs, the amount in the vToken Vault accumulates over time. The more funds accumulated, the stronger the compensation capability. 66 | 67 | For a more detailed explanation of how Bifrost distributes, mitigates, and compensates for slashing risks, refer to [How Bifrost provides an insurance mechanism for vToken holders against the Slash risk](https://bifrost.io/blog/how-bifrost-provides-an-insurance-mechanism-for-v-token-holders-against-the-slash-risk). -------------------------------------------------------------------------------- /content/docs/integration/base.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Base 3 | description: Integrate SLPx protocol on Base 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Soneium Network | 14 | | Description | The public mainnet for Soneium Network. | 15 | | Network URL | https://soneium.org/ | 16 | | Explorer URL | https://soneium.blockscout.com/ | 17 | | RPC URL | https://rpc.soneium.org/ | 18 | | Chain ID | 1868 | 19 | | Currency Symbol | ETH | 20 | 21 | 22 | ### `xcASTR` token 23 | 24 | | Name | Value | 25 | |---|---| 26 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 27 | | Name | xcASTR | 28 | | Symbol | `xcASTR` | 29 | | Decimals | 18 | 30 | 31 | 32 | ### `MoonbeamSlpx.sol` contract 33 | 34 | | Name | Value | 35 | |---|---| 36 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 37 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 38 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 39 | 40 | ## Integration 41 | 42 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 43 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 44 | 45 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 46 | 47 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 48 | 49 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 50 | ```solidity 51 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 52 | ``` 53 | 54 | Sample call 55 | 56 | ```solidity 57 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 58 | ``` 59 | 60 | Sample return 61 | 62 | ```bash 63 | currencyId bytes2 : 0x0801 64 | operationalMin uint256 : 5000000000000000000 65 | ``` 66 | 67 | 68 | 69 | `create_order` 70 | ```solidity 71 | /** 72 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 73 | * @param assetAddress The address of the asset to mint or redeem 74 | * @param amount The amount of the asset to mint or redeem 75 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 76 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 77 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 78 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 79 | **/ 80 | function create_order( 81 | address assetAddress, 82 | uint128 amount, 83 | uint64 dest_chain_id, 84 | bytes memory receiver, 85 | string memory remark, 86 | uint32 channel_id 87 | ) external payable; 88 | ``` 89 | 90 | | Variable | Input value | Definition | 91 | |---|---|---| 92 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 93 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 94 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 95 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 96 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 97 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 98 | 99 | 100 | **Token address list** 101 | 102 | | Token | Address | 103 | |---|---| 104 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 105 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 106 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 107 | 108 | 109 | **Asset Info List** 110 | 111 | | Token | currencyId | operationalMin | 112 | |---|---|---| 113 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 114 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 115 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 116 | 117 | **Waiting time** 118 | 119 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 120 | 121 | ### Example Wagmi integration 122 | 123 | `addressToAssetInfo` 124 | 125 | ```ts 126 | const { data: assetInfo } = useReadContract({ 127 | ...wagmiContractConfig, 128 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 129 | abi: moonbeamSLPxAbi, 130 | functionName: "addressToAssetInfo", 131 | args: ["0x0000000000000000000000000000000000000802"], 132 | }); 133 | console.log("assetInfo", assetInfo); 134 | 135 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 136 | ``` 137 | 138 | `create_order` 139 | 140 | **for ERC20 token** 141 | ```ts 142 | const { 143 | data: hash, 144 | error, 145 | isPending, 146 | writeContract 147 | } = useWriteContract() 148 | 149 | async function approveLstContract() { 150 | writeContract({ 151 | account: currentAddress, // connected address 152 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 153 | abi: erc20Abi, 154 | functionName: "approve", 155 | args: [ 156 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 157 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 158 | ], 159 | }) 160 | } 161 | 162 | async function mintLst() { 163 | writeContract({ 164 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 165 | abi: moonbeamSLPxAbi, 166 | functionName: "create_order", 167 | args: [ 168 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 169 | parseUnits(1, 10), // amount 170 | 1284, // Moonbeam chain id 171 | receiverAddress, // receiver 172 | "bifrost", // sample remark 173 | 0, // sample channel_id 174 | ], 175 | }) 176 | } 177 | 178 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 179 | useWaitForTransactionReceipt({ 180 | hash, 181 | }) 182 | ``` 183 | 184 | **for GLMR token** 185 | ```ts 186 | const { 187 | data: hash, 188 | error, 189 | isPending, 190 | writeContract 191 | } = useWriteContract() 192 | 193 | async function mintLst() { 194 | writeContract({ 195 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 196 | abi: moonbeamSLPxAbi, 197 | functionName: "create_order", 198 | args: [ 199 | "0x0000000000000000000000000000000000000802", // xcDOT token address 200 | parseUnits(5, 18), // amount 201 | 1284, // Moonbeam chain id 202 | receiverAddress, // receiver 203 | "bifrost", // sample remark 204 | 0, // sample channel_id 205 | ], 206 | value: parseUnits(5, 18) // 5 GLMR 207 | }) 208 | } 209 | 210 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 211 | useWaitForTransactionReceipt({ 212 | hash, 213 | }) 214 | ``` -------------------------------------------------------------------------------- /content/docs/integration/soneium.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Soneium 3 | description: Integrate SLPx protocol on Soneium 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Soneium Network | 14 | | Description | The public mainnet for Soneium Network. | 15 | | Network URL | https://soneium.org/ | 16 | | Explorer URL | https://soneium.blockscout.com/ | 17 | | RPC URL | https://rpc.soneium.org/ | 18 | | Chain ID | 1868 | 19 | | Currency Symbol | ETH | 20 | 21 | 22 | ### `xcASTR` token 23 | 24 | | Name | Value | 25 | |---|---| 26 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 27 | | Name | xcASTR | 28 | | Symbol | `xcASTR` | 29 | | Decimals | 18 | 30 | 31 | 32 | ### `MoonbeamSlpx.sol` contract 33 | 34 | | Name | Value | 35 | |---|---| 36 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 37 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 38 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 39 | 40 | ## Integration 41 | 42 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 43 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 44 | 45 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 46 | 47 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 48 | 49 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 50 | ```solidity 51 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 52 | ``` 53 | 54 | Sample call 55 | 56 | ```solidity 57 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 58 | ``` 59 | 60 | Sample return 61 | 62 | ```bash 63 | currencyId bytes2 : 0x0801 64 | operationalMin uint256 : 5000000000000000000 65 | ``` 66 | 67 | 68 | 69 | `create_order` 70 | ```solidity 71 | /** 72 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 73 | * @param assetAddress The address of the asset to mint or redeem 74 | * @param amount The amount of the asset to mint or redeem 75 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 76 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 77 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 78 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 79 | **/ 80 | function create_order( 81 | address assetAddress, 82 | uint128 amount, 83 | uint64 dest_chain_id, 84 | bytes memory receiver, 85 | string memory remark, 86 | uint32 channel_id 87 | ) external payable; 88 | ``` 89 | 90 | | Variable | Input value | Definition | 91 | |---|---|---| 92 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 93 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 94 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 95 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 96 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 97 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 98 | 99 | 100 | **Token address list** 101 | 102 | | Token | Address | 103 | |---|---| 104 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 105 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 106 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 107 | 108 | 109 | **Asset Info List** 110 | 111 | | Token | currencyId | operationalMin | 112 | |---|---|---| 113 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 114 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 115 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 116 | 117 | **Waiting time** 118 | 119 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 120 | 121 | ### Example Wagmi integration 122 | 123 | `addressToAssetInfo` 124 | 125 | ```ts 126 | const { data: assetInfo } = useReadContract({ 127 | ...wagmiContractConfig, 128 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 129 | abi: moonbeamSLPxAbi, 130 | functionName: "addressToAssetInfo", 131 | args: ["0x0000000000000000000000000000000000000802"], 132 | }); 133 | console.log("assetInfo", assetInfo); 134 | 135 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 136 | ``` 137 | 138 | `create_order` 139 | 140 | **for ERC20 token** 141 | ```ts 142 | const { 143 | data: hash, 144 | error, 145 | isPending, 146 | writeContract 147 | } = useWriteContract() 148 | 149 | async function approveLstContract() { 150 | writeContract({ 151 | account: currentAddress, // connected address 152 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 153 | abi: erc20Abi, 154 | functionName: "approve", 155 | args: [ 156 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 157 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 158 | ], 159 | }) 160 | } 161 | 162 | async function mintLst() { 163 | writeContract({ 164 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 165 | abi: moonbeamSLPxAbi, 166 | functionName: "create_order", 167 | args: [ 168 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 169 | parseUnits(1, 10), // amount 170 | 1284, // Moonbeam chain id 171 | receiverAddress, // receiver 172 | "bifrost", // sample remark 173 | 0, // sample channel_id 174 | ], 175 | }) 176 | } 177 | 178 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 179 | useWaitForTransactionReceipt({ 180 | hash, 181 | }) 182 | ``` 183 | 184 | **for GLMR token** 185 | ```ts 186 | const { 187 | data: hash, 188 | error, 189 | isPending, 190 | writeContract 191 | } = useWriteContract() 192 | 193 | async function mintLst() { 194 | writeContract({ 195 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 196 | abi: moonbeamSLPxAbi, 197 | functionName: "create_order", 198 | args: [ 199 | "0x0000000000000000000000000000000000000802", // xcDOT token address 200 | parseUnits(5, 18), // amount 201 | 1284, // Moonbeam chain id 202 | receiverAddress, // receiver 203 | "bifrost", // sample remark 204 | 0, // sample channel_id 205 | ], 206 | value: parseUnits(5, 18) // 5 GLMR 207 | }) 208 | } 209 | 210 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 211 | useWaitForTransactionReceipt({ 212 | hash, 213 | }) 214 | ``` -------------------------------------------------------------------------------- /content/docs/integration/arbitrum.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Arbitrum 3 | description: Integrate SLPx protocol on Arbitrum 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Soneium Network | 14 | | Description | The public mainnet for Soneium Network. | 15 | | Network URL | https://soneium.org/ | 16 | | Explorer URL | https://soneium.blockscout.com/ | 17 | | RPC URL | https://rpc.soneium.org/ | 18 | | Chain ID | 1868 | 19 | | Currency Symbol | ETH | 20 | 21 | 22 | ### `xcASTR` token 23 | 24 | | Name | Value | 25 | |---|---| 26 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 27 | | Name | xcASTR | 28 | | Symbol | `xcASTR` | 29 | | Decimals | 18 | 30 | 31 | 32 | ### `MoonbeamSlpx.sol` contract 33 | 34 | | Name | Value | 35 | |---|---| 36 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 37 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 38 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 39 | 40 | ## Integration 41 | 42 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 43 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 44 | 45 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 46 | 47 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 48 | 49 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 50 | ```solidity 51 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 52 | ``` 53 | 54 | Sample call 55 | 56 | ```solidity 57 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 58 | ``` 59 | 60 | Sample return 61 | 62 | ```bash 63 | currencyId bytes2 : 0x0801 64 | operationalMin uint256 : 5000000000000000000 65 | ``` 66 | 67 | 68 | 69 | `create_order` 70 | ```solidity 71 | /** 72 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 73 | * @param assetAddress The address of the asset to mint or redeem 74 | * @param amount The amount of the asset to mint or redeem 75 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 76 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 77 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 78 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 79 | **/ 80 | function create_order( 81 | address assetAddress, 82 | uint128 amount, 83 | uint64 dest_chain_id, 84 | bytes memory receiver, 85 | string memory remark, 86 | uint32 channel_id 87 | ) external payable; 88 | ``` 89 | 90 | | Variable | Input value | Definition | 91 | |---|---|---| 92 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 93 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 94 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 95 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 96 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 97 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 98 | 99 | 100 | **Token address list** 101 | 102 | | Token | Address | 103 | |---|---| 104 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 105 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 106 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 107 | 108 | 109 | **Asset Info List** 110 | 111 | | Token | currencyId | operationalMin | 112 | |---|---|---| 113 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 114 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 115 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 116 | 117 | **Waiting time** 118 | 119 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 120 | 121 | ### Example Wagmi integration 122 | 123 | `addressToAssetInfo` 124 | 125 | ```ts 126 | const { data: assetInfo } = useReadContract({ 127 | ...wagmiContractConfig, 128 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 129 | abi: moonbeamSLPxAbi, 130 | functionName: "addressToAssetInfo", 131 | args: ["0x0000000000000000000000000000000000000802"], 132 | }); 133 | console.log("assetInfo", assetInfo); 134 | 135 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 136 | ``` 137 | 138 | `create_order` 139 | 140 | **for ERC20 token** 141 | ```ts 142 | const { 143 | data: hash, 144 | error, 145 | isPending, 146 | writeContract 147 | } = useWriteContract() 148 | 149 | async function approveLstContract() { 150 | writeContract({ 151 | account: currentAddress, // connected address 152 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 153 | abi: erc20Abi, 154 | functionName: "approve", 155 | args: [ 156 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 157 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 158 | ], 159 | }) 160 | } 161 | 162 | async function mintLst() { 163 | writeContract({ 164 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 165 | abi: moonbeamSLPxAbi, 166 | functionName: "create_order", 167 | args: [ 168 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 169 | parseUnits(1, 10), // amount 170 | 1284, // Moonbeam chain id 171 | receiverAddress, // receiver 172 | "bifrost", // sample remark 173 | 0, // sample channel_id 174 | ], 175 | }) 176 | } 177 | 178 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 179 | useWaitForTransactionReceipt({ 180 | hash, 181 | }) 182 | ``` 183 | 184 | **for GLMR token** 185 | ```ts 186 | const { 187 | data: hash, 188 | error, 189 | isPending, 190 | writeContract 191 | } = useWriteContract() 192 | 193 | async function mintLst() { 194 | writeContract({ 195 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 196 | abi: moonbeamSLPxAbi, 197 | functionName: "create_order", 198 | args: [ 199 | "0x0000000000000000000000000000000000000802", // xcDOT token address 200 | parseUnits(5, 18), // amount 201 | 1284, // Moonbeam chain id 202 | receiverAddress, // receiver 203 | "bifrost", // sample remark 204 | 0, // sample channel_id 205 | ], 206 | value: parseUnits(5, 18) // 5 GLMR 207 | }) 208 | } 209 | 210 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 211 | useWaitForTransactionReceipt({ 212 | hash, 213 | }) 214 | ``` -------------------------------------------------------------------------------- /content/docs/integration/bnbchain.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: BNB Chain 3 | description: Integrate SLPx protocol on BNB Chain 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Soneium Network | 14 | | Description | The public mainnet for Soneium Network. | 15 | | Network URL | https://soneium.org/ | 16 | | Explorer URL | https://soneium.blockscout.com/ | 17 | | RPC URL | https://rpc.soneium.org/ | 18 | | Chain ID | 1868 | 19 | | Currency Symbol | ETH | 20 | 21 | 22 | ### `xcASTR` token 23 | 24 | | Name | Value | 25 | |---|---| 26 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 27 | | Name | xcASTR | 28 | | Symbol | `xcASTR` | 29 | | Decimals | 18 | 30 | 31 | 32 | ### `MoonbeamSlpx.sol` contract 33 | 34 | | Name | Value | 35 | |---|---| 36 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 37 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 38 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 39 | 40 | ## Integration 41 | 42 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 43 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 44 | 45 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 46 | 47 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 48 | 49 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 50 | ```solidity 51 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 52 | ``` 53 | 54 | Sample call 55 | 56 | ```solidity 57 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 58 | ``` 59 | 60 | Sample return 61 | 62 | ```bash 63 | currencyId bytes2 : 0x0801 64 | operationalMin uint256 : 5000000000000000000 65 | ``` 66 | 67 | 68 | 69 | `create_order` 70 | ```solidity 71 | /** 72 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 73 | * @param assetAddress The address of the asset to mint or redeem 74 | * @param amount The amount of the asset to mint or redeem 75 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 76 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 77 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 78 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 79 | **/ 80 | function create_order( 81 | address assetAddress, 82 | uint128 amount, 83 | uint64 dest_chain_id, 84 | bytes memory receiver, 85 | string memory remark, 86 | uint32 channel_id 87 | ) external payable; 88 | ``` 89 | 90 | | Variable | Input value | Definition | 91 | |---|---|---| 92 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 93 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 94 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 95 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 96 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 97 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 98 | 99 | 100 | **Token address list** 101 | 102 | | Token | Address | 103 | |---|---| 104 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 105 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 106 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 107 | 108 | 109 | **Asset Info List** 110 | 111 | | Token | currencyId | operationalMin | 112 | |---|---|---| 113 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 114 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 115 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 116 | 117 | **Waiting time** 118 | 119 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 120 | 121 | ### Example Wagmi integration 122 | 123 | `addressToAssetInfo` 124 | 125 | ```ts 126 | const { data: assetInfo } = useReadContract({ 127 | ...wagmiContractConfig, 128 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 129 | abi: moonbeamSLPxAbi, 130 | functionName: "addressToAssetInfo", 131 | args: ["0x0000000000000000000000000000000000000802"], 132 | }); 133 | console.log("assetInfo", assetInfo); 134 | 135 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 136 | ``` 137 | 138 | `create_order` 139 | 140 | **for ERC20 token** 141 | ```ts 142 | const { 143 | data: hash, 144 | error, 145 | isPending, 146 | writeContract 147 | } = useWriteContract() 148 | 149 | async function approveLstContract() { 150 | writeContract({ 151 | account: currentAddress, // connected address 152 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 153 | abi: erc20Abi, 154 | functionName: "approve", 155 | args: [ 156 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 157 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 158 | ], 159 | }) 160 | } 161 | 162 | async function mintLst() { 163 | writeContract({ 164 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 165 | abi: moonbeamSLPxAbi, 166 | functionName: "create_order", 167 | args: [ 168 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 169 | parseUnits(1, 10), // amount 170 | 1284, // Moonbeam chain id 171 | receiverAddress, // receiver 172 | "bifrost", // sample remark 173 | 0, // sample channel_id 174 | ], 175 | }) 176 | } 177 | 178 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 179 | useWaitForTransactionReceipt({ 180 | hash, 181 | }) 182 | ``` 183 | 184 | **for GLMR token** 185 | ```ts 186 | const { 187 | data: hash, 188 | error, 189 | isPending, 190 | writeContract 191 | } = useWriteContract() 192 | 193 | async function mintLst() { 194 | writeContract({ 195 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 196 | abi: moonbeamSLPxAbi, 197 | functionName: "create_order", 198 | args: [ 199 | "0x0000000000000000000000000000000000000802", // xcDOT token address 200 | parseUnits(5, 18), // amount 201 | 1284, // Moonbeam chain id 202 | receiverAddress, // receiver 203 | "bifrost", // sample remark 204 | 0, // sample channel_id 205 | ], 206 | value: parseUnits(5, 18) // 5 GLMR 207 | }) 208 | } 209 | 210 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 211 | useWaitForTransactionReceipt({ 212 | hash, 213 | }) 214 | ``` -------------------------------------------------------------------------------- /content/docs/integration/ethereum.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ethereum 3 | description: Integrate SLPx protocol on Ethereum 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Soneium Network | 14 | | Description | The public mainnet for Soneium Network. | 15 | | Network URL | https://soneium.org/ | 16 | | Explorer URL | https://soneium.blockscout.com/ | 17 | | RPC URL | https://rpc.soneium.org/ | 18 | | Chain ID | 1868 | 19 | | Currency Symbol | ETH | 20 | 21 | 22 | ### `xcASTR` token 23 | 24 | | Name | Value | 25 | |---|---| 26 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 27 | | Name | xcASTR | 28 | | Symbol | `xcASTR` | 29 | | Decimals | 18 | 30 | 31 | 32 | ### `MoonbeamSlpx.sol` contract 33 | 34 | | Name | Value | 35 | |---|---| 36 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 37 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 38 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 39 | 40 | ## Integration 41 | 42 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 43 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 44 | 45 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 46 | 47 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 48 | 49 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 50 | ```solidity 51 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 52 | ``` 53 | 54 | Sample call 55 | 56 | ```solidity 57 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 58 | ``` 59 | 60 | Sample return 61 | 62 | ```bash 63 | currencyId bytes2 : 0x0801 64 | operationalMin uint256 : 5000000000000000000 65 | ``` 66 | 67 | 68 | 69 | `create_order` 70 | ```solidity 71 | /** 72 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 73 | * @param assetAddress The address of the asset to mint or redeem 74 | * @param amount The amount of the asset to mint or redeem 75 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 76 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 77 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 78 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 79 | **/ 80 | function create_order( 81 | address assetAddress, 82 | uint128 amount, 83 | uint64 dest_chain_id, 84 | bytes memory receiver, 85 | string memory remark, 86 | uint32 channel_id 87 | ) external payable; 88 | ``` 89 | 90 | | Variable | Input value | Definition | 91 | |---|---|---| 92 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 93 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 94 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 95 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 96 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 97 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 98 | 99 | 100 | **Token address list** 101 | 102 | | Token | Address | 103 | |---|---| 104 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 105 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 106 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 107 | 108 | 109 | **Asset Info List** 110 | 111 | | Token | currencyId | operationalMin | 112 | |---|---|---| 113 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 114 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 115 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 116 | 117 | **Waiting time** 118 | 119 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 120 | 121 | ### Example Wagmi integration 122 | 123 | `addressToAssetInfo` 124 | 125 | ```ts 126 | const { data: assetInfo } = useReadContract({ 127 | ...wagmiContractConfig, 128 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 129 | abi: moonbeamSLPxAbi, 130 | functionName: "addressToAssetInfo", 131 | args: ["0x0000000000000000000000000000000000000802"], 132 | }); 133 | console.log("assetInfo", assetInfo); 134 | 135 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 136 | ``` 137 | 138 | `create_order` 139 | 140 | **for ERC20 token** 141 | ```ts 142 | const { 143 | data: hash, 144 | error, 145 | isPending, 146 | writeContract 147 | } = useWriteContract() 148 | 149 | async function approveLstContract() { 150 | writeContract({ 151 | account: currentAddress, // connected address 152 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 153 | abi: erc20Abi, 154 | functionName: "approve", 155 | args: [ 156 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 157 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 158 | ], 159 | }) 160 | } 161 | 162 | async function mintLst() { 163 | writeContract({ 164 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 165 | abi: moonbeamSLPxAbi, 166 | functionName: "create_order", 167 | args: [ 168 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 169 | parseUnits(1, 10), // amount 170 | 1284, // Moonbeam chain id 171 | receiverAddress, // receiver 172 | "bifrost", // sample remark 173 | 0, // sample channel_id 174 | ], 175 | }) 176 | } 177 | 178 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 179 | useWaitForTransactionReceipt({ 180 | hash, 181 | }) 182 | ``` 183 | 184 | **for GLMR token** 185 | ```ts 186 | const { 187 | data: hash, 188 | error, 189 | isPending, 190 | writeContract 191 | } = useWriteContract() 192 | 193 | async function mintLst() { 194 | writeContract({ 195 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 196 | abi: moonbeamSLPxAbi, 197 | functionName: "create_order", 198 | args: [ 199 | "0x0000000000000000000000000000000000000802", // xcDOT token address 200 | parseUnits(5, 18), // amount 201 | 1284, // Moonbeam chain id 202 | receiverAddress, // receiver 203 | "bifrost", // sample remark 204 | 0, // sample channel_id 205 | ], 206 | value: parseUnits(5, 18) // 5 GLMR 207 | }) 208 | } 209 | 210 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 211 | useWaitForTransactionReceipt({ 212 | hash, 213 | }) 214 | ``` -------------------------------------------------------------------------------- /content/docs/vtokens/vbnc.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vBNC 3 | description: Understanding vBNC 4 | --- 5 | 6 | ## What is vBNC? 7 | 8 | vBNC (voucher BNC) is a shadow token of staked BNC, with fully underlying BNC reserve and yield-bearing feature of BNC staking reward. Users can deposit BNC into Bifrost SLP protocol and get vBNC as return, vBNC can be traded in the open market or be redeemed back to BNC. Holding vBNC equals to holding the BNC staking position, staking rewards appreciate the exchange price of vBNC. 9 | 10 | 11 | Staking rewards automatically add to the vBNC exchange price, no manual claim. The longer vBNC postion holding, the greater amount of BNC will be exchanged back when redemption. 12 | 13 | 14 | ## Why vBNC? 15 | 16 | 17 | **Liquid Staking** 18 | 19 | 20 | The product allows users to delegate BNC for liquid vToken, (vBNC). vBNC will keep receiving staking rewards and can continue to be used in Bifrost and Polkadot-based DeFi for additional rewards. 21 | 22 | 23 | **Automatically Staking rewards capturing without scenario limitations** 24 | 25 | 26 | SLP will issue Staking rewards to vBNC by adjusting the price of vBNC / BNC upwards. vBNC Rate = SLP Staking BNC (SUM) / vBNC Total Issuance. 27 | 28 | 29 | **Floating redemption period, vBNC ≤ 240 hours** 30 | 31 | 32 | While BNC’s original chain Staking has a fixed revoke period, Bifrost SLP helps users to realize the possibility of **early vBNC redemption** by matching the real-time vBNC minting quantity with the redemption quantity at the protocol layer in form of a queue. 33 | 34 | 35 | **Multi-environment Compatibility** 36 | 37 | 38 | vBNC is one of Substrate assets in Bifrost parachain, by using the [HRMP](https://wiki.polkadot.network/docs/learn-crosschain#xcmp-cross-chain-message-passing) channels between Bifrost and others, it can be easily utilized in EVM, WASM and Substarte competiable parachains. 39 | 40 | ## How it works? 41 | 42 | vBNC is minted by Bifrost SLP pallet, so firstly users have to call XCM cross chain transfer BNC from Astar to Bifrost Parachain. 43 | 44 | ### Mint vBNC 45 | 46 | 1. Users initiate a vBNC mint order, SLP protocol transfers BNC to BNC Ready Pool (which is an order pool accumulates all mint and redeem orders), SLP mints vBNC for users; 47 | 2. BNC Ready Pool matches Mint amount and Redeem amount; 48 | 3. Oracle monitor matching results from BNC Ready Pool and send messages to BNC-Bifrost SLP addresses; 49 | 4. Bifrost SLP addresses execute Staking to SLP BNC DApp staking set, Oracle queries the successful messages and send them back to Bifrost BNC Ready Pool, get ready for the next matching. 50 | 51 | About SLP Oracle/backend service: The SLP backend service is using ⅘ multisig nodes, responsible for adjusting the exchange rate in each round, returning the due amount to the current redeem due user, checking the ledger, summarizing the pledge amount in a new round, and calling the corresponding SLP module function. In order to more flexibly handle the increase or decrease of users' pledge in each round, we will adopt a decentralized delegation relationship and a small-amount pledge strategy to increase the efficiency of the use of funds. 52 | 53 | ### Redeem vBNC 54 | 55 | 1. Users initiate a vBNC redeem orders to BNC Ready Pool; 56 | 2. BNC Ready Pool matches Redeem amount and Mint amount, and dispatches the remaining BNC to vBNC redeem orders, SLP destroys the redeemed vBNC amount; 57 | 3. Oracle monitor redeem orders from Bifrost chain and send messages to BNC-Bifrost SLP addresses; 58 | 4. Bifrost SLP addresses execute Redeem to SLP BNC DApp staking set and send redeemed BNC back to Bifrost parachain, Oracle queries all these messages and send them back to Bifrost BNC Ready Pool, get ready for the next round matching. 59 | 60 | ### BNC Reward 61 | 62 | The BNC reward will be reinvested on BNC, and the Oracle will transmit the reward data to the BNC Ready Pool to adjust the vBNC exchange rate. 63 | 64 | $$ 65 | vBNC rate=(StakedBNC+StakingReward)/vBNC Allocation 66 | $$ 67 | 68 | 💡 Read more detailed info in the following sections. 69 | 70 | *** 71 | 72 | ## SLP-vBNC Technology Implementation 73 | 74 | ### Overall operation process 75 | 76 | The entire SLP protocol includes three parts, the Vtoken-Minting module, the SLP module, and the backend service. 77 | 78 | The user can call the mint/redeem/rebond method of the VtokenMinting module through the front end to mint BNC into vBNC, or exchange vBNC back to BNC. During the period of holding vBNC, users can enjoy staking benefits, which are reflected in the exchange rate of vBNC to BNC. If the user has new pledge amounts in the pool during the redeem period, the user will be able to experience the process of fast redemption, and the new pledge amount will be returned to the users in front of the redeem queue first. 79 | 80 | The SLP module of Bifrost is responsible for communicating with the ParachainStaking module of the BNC chain by sending cross-chain messages to perform operations such as delegate, delegate\_bond\_more, schedule\_delegator\_bond\_less, schedule\_revoke\_delegation, execute\_delegation\_request, cancel\_delegation\_request, schedule\_leave\_delegators, execute\_leave\_delegators, cancel\_leave\_delegators. The delegator account is generated by Bifrost's parachain address on the BNC chain, and the corresponding sub-account is generated by calling the as\_derivative function of the utility module. All delegator and validator addresses are stored and used in the format of MultiLocation in the module. 81 | 82 | ### Backend service function 83 | 84 | The SLP backend service is responsible for adjusting the exchange rate in each round, returning the due amount to the current redeem due user, checking the ledger, summarizing the pledge amount in a new round, and calling the corresponding SLP module function. In order to more flexibly handle the increase or decrease of users' pledge in each round, we will adopt a decentralized delegation relationship and a small-amount pledge strategy to increase the efficiency of the use of funds. 85 | 86 | #### At the start of Round 87 | 88 | 1. Update round numbers 89 | 2. Charge the custody fee, add interest (according to the dividend event, dividends before n+1 period), modify the exchange rate, and transfer the interest amount back to the exit account. 90 | 3. Withdrawal of redemption due amount 91 | 4. Repay the current due debt and transfer the remaining amount to the entry account for quick redemption. 92 | 5. Query and compensate the reserve amount of handling fees for each operating account. 93 | 94 | #### Before Round ends 95 | 96 | 1. Transfer the excess amount in the entry account to a different delegate, and perform the pledge operation. When pledging, pay attention to check if the ranking is in the bottom delegation. If so, add the delegating amount, or transfer the amount to another DApp Staking. 97 | 2. Check the ledger, warn and adjust accordingly if there are discrepancies. 98 | 99 | #### Attention for staking operations: 100 | 101 | 1. The staking amount is distributed among multiple delegation relationships of multiple delegates in a relatively even manner to facilitate each round of bond and redeem fund operations and improve the efficiency of fund use. 102 | 2. Don't let the delegates fall into the bottom delegation group of DApp Stakings. It is necessary to maintain a real-time top lowest value of DApp Staking. In theory, each account should try to keep a certain percentage higher than this value, such as 15%. 103 | 3. When comparing the difference in the number of redeems between the Bifrost chain and the BNC chain, the number on the BNC side should be greater than or equal to the number on the Bifrost side 104 | 105 | ## Vtoken-Minting module 106 | 107 | The user can call the mint/redeem/rebond method of the VtokenMinting module through the front end to mint BNC into vBNC, or exchange vBNC back to BNC. During the period of holding vBNC, users can enjoy staking benefits, which are reflected in the exchange rate of vBNC to BNC. If the user has new pledge amounts in the pool during the redeem period, the user will be able to experience the process of fast redemption, and the new pledge amount will be returned to the users in front of the redeem queue first. 108 | 109 | ### Data Structure -------------------------------------------------------------------------------- /content/docs/integration/moonbeam.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Moonbeam 3 | description: Integrate SLPx protocol on Moonbeam 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Moonbeam. Information can be obtained from [chainlist.org](https://chainlist.org/?search=moonbeam) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Moonbeam Network | 14 | | Description | The public mainnet for Moonbeam Network. | 15 | | Network URL | https://moonbeam.network | 16 | | Explorer URL | https://moonscan.io/ | 17 | | RPC URL | https://rpc.api.moonbeam.network | 18 | | Chain ID | 1284 | 19 | | Currency Symbol | GLMR | 20 | 21 | ### `xcDOT` token 22 | 23 | | Name | Value | 24 | |---|---| 25 | | Address | [0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080](https://moonscan.io/address/0xffffffff1fcacbd218edc0eba20fc2308c778080) | 26 | | Name | xcDOT | 27 | | Symbol | `xcDOT` | 28 | | Decimals | 10 | 29 | 30 | ### `xcvDOT` token 31 | 32 | | Name | Value | 33 | |---|---| 34 | | Address | [0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf](https://moonscan.io/address/0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf) | 35 | | Name | xcvDOT | 36 | | Symbol | `xcvDOT` | 37 | | Decimals | 10 | 38 | 39 | ### `xcASTR` token 40 | 41 | | Name | Value | 42 | |---|---| 43 | | Address | [0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf](https://moonscan.io/address/0xffffffffa893ad19e540e172c10d78d4d479b5cf) | 44 | | Name | xcASTR | 45 | | Symbol | `xcASTR` | 46 | | Decimals | 18 | 47 | 48 | ### `xcvASTR` token 49 | 50 | | Name | Value | 51 | |---|---| 52 | | Address | [0xFffFffff55C732C47639231a4C4373245763d26E](https://moonscan.io/address/0xFffFffff55C732C47639231a4C4373245763d26E) | 53 | | Name | xcvASTR | 54 | | Symbol | `xcvASTR` | 55 | | Decimals | 18 | 56 | 57 | ### `GLMR` token 58 | 59 | | Name | Value | 60 | |---|---| 61 | | Address | [0x0000000000000000000000000000000000000802](https://moonscan.io/address/0x0000000000000000000000000000000000000802) | 62 | | Name | GLMR | 63 | | Symbol | `GLMR` | 64 | | Decimals | 18 | 65 | 66 | ### `xcvGLMR` token 67 | 68 | | Name | Value | 69 | |---|---| 70 | | Address | [0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c](https://moonscan.io/address/0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c) | 71 | | Name | xcvGLMR | 72 | | Symbol | `xcvGLMR` | 73 | | Decimals | 18 | 74 | 75 | ### `MoonbeamSlpx.sol` contract 76 | 77 | | Name | Value | 78 | |---|---| 79 | | Address | [0xF1d4797E51a4640a76769A50b57abE7479ADd3d8](https://moonscan.io/address/0xF1d4797E51a4640a76769A50b57abE7479ADd3d8) | 80 | | Source code | [MoonbeamSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MoonbeamSlpx.sol) | 81 | | ABI | [MoonbeamSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/moonbeam/MoonbeamSlpx.json) | 82 | 83 | ## Integration 84 | 85 | MoonbeamSLPx contract does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 86 | - there is a wait time of about 45 to 60 to receive the `vAsset` token. 87 | 88 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 89 | 90 | There are 2 main functions you use to integrate with `MoonbeamSlpx`: 91 | 92 | `addressToAssetInfo` (derived from the public mapping `addressToAssetInfo`) 93 | ```solidity 94 | function addressToAssetInfo(address assetAddress) public view returns (currencyId bytes2, operationalMin uint256) 95 | ``` 96 | 97 | Sample call 98 | 99 | ```solidity 100 | MoonbeamSlpx.addressToAssetInfo(0x0000000000000000000000000000000000000802) 101 | ``` 102 | 103 | Sample return 104 | 105 | ```bash 106 | currencyId bytes2 : 0x0801 107 | operationalMin uint256 : 5000000000000000000 108 | ``` 109 | 110 | 111 | 112 | `create_order` 113 | ```solidity 114 | /** 115 | * @dev Create order to mint vAsset or redeem vAsset on bifrost chain 116 | * @param assetAddress The address of the asset to mint or redeem 117 | * @param amount The amount of the asset to mint or redeem 118 | * @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain 119 | * @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate 120 | * @param remark The remark of the order, less than 32 bytes. For example, "OmniLS" 121 | * @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward. 122 | **/ 123 | function create_order( 124 | address assetAddress, 125 | uint128 amount, 126 | uint64 dest_chain_id, 127 | bytes memory receiver, 128 | string memory remark, 129 | uint32 channel_id 130 | ) external payable; 131 | ``` 132 | 133 | | Variable | Input value | Definition | 134 | |---|---|---| 135 | | `address assetAddress` | a valid Moonbeam token contract address | Address of different tokens on Moonbeam | 136 | | `uint128 amount` | `uint128` | Amount of tokens to mint or redeem | 137 | | `uint64 dest_chain_id` | `1284` | Chain ID of Moonbeam | 138 | | `bytes memory receiver` | a valid Moonbeam address | Asset receiver address on the destination chain, 20 bytes address for EVM | 139 | | `string memory remark` | `string` of less than 32 bytes | A string used to identify the order | 140 | | `uint32 channel_id` | `uint32` | Channel ID of the order. Used for the Bifrost Protocol Revenue Sharing Program (RSP). You can set it if you have one. Check [here](https://docs.bifrost.io/for-partners/reward-share-program-rsp) to learn more | 141 | 142 | 143 | **Token address list** 144 | 145 | | Token | Address | 146 | |---|---| 147 | | `xcDOT` | `0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080` | 148 | | `xcASTR` | `0xFfFFFfffA893AD19e540E172C10d78D4d479B5Cf` | 149 | | `GLMR` | `0x0000000000000000000000000000000000000802` | 150 | 151 | 152 | **Asset Info List** 153 | 154 | | Token | currencyId | operationalMin | 155 | |---|---|---| 156 | | `xcDOT` | `0x0800` | 10000000000 (`10_000_000_000`) | 157 | | `xcASTR` | `0x0803` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 158 | | `GLMR` | `0x0801` | 5000000000000000000 (`5_000_000_000_000_000_000`) | 159 | 160 | **Waiting time** 161 | 162 | Then wait for 45 to 60 seconds after transaction confirmation to receive the `vAsset` token in the caller address. 163 | 164 | ### Example Wagmi integration 165 | 166 | `addressToAssetInfo` 167 | 168 | ```ts 169 | const { data: assetInfo } = useReadContract({ 170 | ...wagmiContractConfig, 171 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 172 | abi: moonbeamSLPxAbi, 173 | functionName: "addressToAssetInfo", 174 | args: ["0x0000000000000000000000000000000000000802"], 175 | }); 176 | console.log("assetInfo", assetInfo); 177 | 178 | // Output: assetInfo { currencyId: '0x0801', operationalMin: 5000000000000000000n } 179 | ``` 180 | 181 | `create_order` 182 | 183 | **for ERC20 token** 184 | ```ts 185 | const { 186 | data: hash, 187 | error, 188 | isPending, 189 | writeContract 190 | } = useWriteContract() 191 | 192 | async function approveLstContract() { 193 | writeContract({ 194 | account: currentAddress, // connected address 195 | address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", 196 | abi: erc20Abi, 197 | functionName: "approve", 198 | args: [ 199 | "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 200 | parseUnits(1, 10), // 1 xcDOT is operationalMin and 10 is the token decimals 201 | ], 202 | }) 203 | } 204 | 205 | async function mintLst() { 206 | writeContract({ 207 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 208 | abi: moonbeamSLPxAbi, 209 | functionName: "create_order", 210 | args: [ 211 | "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", // xcDOT token address 212 | parseUnits(1, 10), // amount 213 | 1284, // Moonbeam chain id 214 | receiverAddress, // receiver 215 | "bifrost", // sample remark 216 | 0, // sample channel_id 217 | ], 218 | }) 219 | } 220 | 221 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 222 | useWaitForTransactionReceipt({ 223 | hash, 224 | }) 225 | ``` 226 | 227 | **for GLMR token** 228 | ```ts 229 | const { 230 | data: hash, 231 | error, 232 | isPending, 233 | writeContract 234 | } = useWriteContract() 235 | 236 | async function mintLst() { 237 | writeContract({ 238 | address: "0xF1d4797E51a4640a76769A50b57abE7479ADd3d8", 239 | abi: moonbeamSLPxAbi, 240 | functionName: "create_order", 241 | args: [ 242 | "0x0000000000000000000000000000000000000802", // xcDOT token address 243 | parseUnits(5, 18), // amount 244 | 1284, // Moonbeam chain id 245 | receiverAddress, // receiver 246 | "bifrost", // sample remark 247 | 0, // sample channel_id 248 | ], 249 | value: parseUnits(5, 18) // 5 GLMR 250 | }) 251 | } 252 | 253 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 254 | useWaitForTransactionReceipt({ 255 | hash, 256 | }) 257 | ``` -------------------------------------------------------------------------------- /content/docs/integration/manta.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Manta 3 | description: Integrate SLPx protocol on Manta 4 | --- 5 | 6 | ## Getting started 7 | 8 | Make sure you add RPC for Manta. Information can be obtained from [chainlist.org](https://chainlist.org/?search=manta) 9 | 10 | Or manual input with the information below 11 | | Name | Value | 12 | |---|---| 13 | | Network Name | Manta Pacific L2 | 14 | | Description | The public mainnet for Manta Pacific. | 15 | | Network URL | https://pacific-info.manta.network/ | 16 | | Explorer URL | https://pacific-explorer.manta.network/ | 17 | | RPC URL | https://manta-pacific.drpc.org | 18 | | Chain ID | 169 | 19 | | Currency Symbol | ETH | 20 | 21 | ### `MANTA` token 22 | 23 | | Name | Value | 24 | |---|---| 25 | | Address | [0x95CeF13441Be50d20cA4558CC0a27B601aC544E5](https://pacific-explorer.manta.network/address/0x95CeF13441Be50d20cA4558CC0a27B601aC544E5?tab=internal_txns) | 26 | | Name | Manta | 27 | | Symbol | `MANTA` | 28 | | Decimals | 18 | 29 | 30 | ### `vMANTA` token 31 | 32 | | Name | Value | 33 | |---|---| 34 | | Address | [0x7746ef546d562b443AE4B4145541a3b1a3D75717](https://pacific-explorer.manta.network/address/0x7746ef546d562b443AE4B4145541a3b1a3D75717) | 35 | | Name | vManta | 36 | | Symbol | `vManta` | 37 | | Decimals | 18 | 38 | | ABI | [VoucherMantaOFT.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/manta/VoucherMantaOFT.json) | 39 | 40 | 41 | ### `MantaPacificSlpx` contract 42 | 43 | | Name | Value | 44 | |---|---| 45 | | Address | [0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940](https://pacific-explorer.manta.network/address/0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940?tab=internal_txns) | 46 | | Source code | [MantaPacificSlpx.sol](https://github.com/bifrost-io/slpx-contracts/blob/main/contracts/MantaPacificSlpx.sol) | 47 | | ABI | [MantaPacificSlpx.json](https://github.com/bifrost-io/slpx-contracts/blob/main/deployments/manta/MantaPacificSlpx.json) | 48 | 49 | 50 | ## Integration 51 | 52 | Manta Pacific's SLPx currently does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows: 53 | - the minting process relies on `msg.sender` to be the receiver so this can have unintended effect on your contract logic 54 | - there is a wait time of about 8 to 10 minutes to receive the `vMANTA` token. 55 | 56 | However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic. 57 | 58 | There are 3 main functions you use to integrate with `MantaPacificSlpx`: 59 | 60 | `minAmount` (derived from the public variable `minAmount`) 61 | ```solidity 62 | function minAmount() returns (uint256) 63 | ``` 64 | 65 | `estimateSendAndCallFee` 66 | ```solidity 67 | function estimateSendAndCallFee( 68 | address assetAddress, 69 | uint256 amount, 70 | uint32 channel_id, 71 | uint64 dstGasForCall, 72 | bytes calldata adapterParams 73 | ) public view returns (uint256) 74 | ``` 75 | 76 | `create_order` 77 | ```solidity 78 | function create_order( 79 | address assetAddress, 80 | uint256 amount, 81 | uint32 channel_id, 82 | uint64 dstGasForCall, 83 | bytes calldata adapterParams 84 | ) external payable 85 | ``` 86 | 87 | You want to fetch the `minAmount()` function to check on the minimum amount of `MANTA` that you need to use to mint. Currently this value is `2000000000000000000` equal to `2 MANTA`. 88 | 89 | Next, you want to call the function `estimateSendAndCallFee` to get the mint fee in ETH. The input values are defined as follows: 90 | 91 | | Variable | Input value | Definition | 92 | |---|---|---| 93 | | `address assetAddress` | `0x95CeF13441Be50d20cA4558CC0a27B601aC544E5` | Address of `MANTA` token | 94 | | `uint256 amount` | `uint256` | Amount of `MANTA` token be used to mint to `vMANTA` | 95 | | `uint32 channel_id` | `0` | ID of the channel | 96 | | `uint64 dstGasForCall` | `4000000` | Destination gas for call | 97 | | `bytes calldata adapterParams` | `["uint16", "uint256"], [1, 4200000]` | Parameters to be encoded for the Adapter. Refer to the **adapterParams encoding** section below on how to call | 98 | 99 | **adapterParams encoding** 100 | 101 | With `Ethers.js v5`, you can use `solidityPack` function 102 | 103 | ```ts 104 | ethers.utils.solidityPack(["uint16", "uint256"], [1, 4200000]) 105 | ``` 106 | 107 | With `Ethers.js v6` 108 | 109 | ```ts 110 | solidityPacked(["uint16", "uint256"], [1, 4200000]) 111 | ``` 112 | 113 | With `Viem`, you can use `encodePacked` function 114 | 115 | ```ts 116 | encodePacked(["uint16", "uint256"], [1, 4200000]) 117 | ``` 118 | 119 | ### Example Viem integration 120 | 121 | `minAmount` 122 | 123 | ```ts 124 | const minAmount = await publicClient.readContract({ 125 | address: "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", 126 | abi: mantaSLPxAbi, 127 | functionName: "minAmount", 128 | }); 129 | console.log("minAmount", minAmount); 130 | 131 | // Output: minAmount 2000000000000000000n 132 | ``` 133 | 134 | `estimateSendAndCallFee` 135 | 136 | ```ts 137 | const sendAndCallFee = await publicClient.readContract({ 138 | address: "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 139 | abi: mantaSLPxAbi, 140 | functionName: "estimateSendAndCallFee", 141 | args: [ 142 | "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", // MANTA token 143 | parseUnits(3, 18), // amount 144 | 0, // channel_id 145 | 4000000, // dstGasForCall 146 | encodePacked(["uint16", "uint256"], [1, BigInt(4200000)]), // adapterParams 147 | ], 148 | }); 149 | console.log("sendAndCallFee", sendAndCallFee); 150 | 151 | // Output: sendAndCallFee 83556372916216n 152 | ``` 153 | Last call returns a value of `83556372916216` equal to `0.000083556372916216 ETH`. 154 | 155 | Then, to mint `vMANTA` with `MANTA`, call `approve` on `MANTA` token contract to the `MantaPacificSlpx` contract, then call the `create_order` function with the same inputs as `estimateSendAndCallFee`. 156 | 157 | ```ts 158 | const { request: approvalRequest } = await publicClient.simulateContract({ 159 | account: currentAddress, // connected address 160 | address: "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", 161 | abi: erc20Abi, 162 | functionName: "approve", 163 | args: [ 164 | "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 165 | parseUnits(3, 18), 166 | ], 167 | }); 168 | let approvalHash = await walletClient.writeContract(approvalRequest); 169 | console.log("approvalHash", approvalHash); 170 | 171 | const { request: mintRequest } = await publicClient.simulateContract({ 172 | account: currentAddress, // connected address 173 | address: "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 174 | abi: mantaSLPxAbi, 175 | functionName: "create_order", 176 | args: [ 177 | "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", // MANTA token address 178 | parseUnits(3, 18), // amount 179 | 0, // channel_id 180 | 4000000, // dstGasForCall 181 | encodePacked(["uint16", "uint256"], [1, BigInt(4200000)]), // adapterParams 182 | ], 183 | value: sendAndCallFee as bigint, 184 | }); 185 | 186 | hash = await walletClient.writeContract(request); 187 | transaction = await publicClient.waitForTransactionReceipt({ 188 | hash: hash, 189 | }); 190 | console.log("hash", hash); 191 | ``` 192 | 193 | Then wait for 8 to 10 minutes to receive the `vMANTA` token in the caller address. 194 | 195 | ### Example Wagmi integration 196 | 197 | `minAmount` 198 | 199 | ```ts 200 | const { data: minAmount } = useReadContract({ 201 | ...wagmiContractConfig, 202 | address: "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", 203 | abi: mantaSLPxAbi, 204 | functionName: "minAmount", 205 | }); 206 | console.log("minAmount", minAmount); 207 | 208 | // Output: minAmount 2000000000000000000n 209 | ``` 210 | 211 | `estimateSendAndCallFee` 212 | 213 | ```ts 214 | const { data: sendAndCallFee } = useReadContract({ 215 | ...wagmiContractConfig, 216 | address: "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 217 | abi: mantaSLPxAbi, 218 | functionName: "estimateSendAndCallFee", 219 | args: [ 220 | "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", // MANTA token 221 | parseUnits(3, 18), // amount 222 | 0, // channel_id 223 | 4000000, // dstGasForCall 224 | encodePacked(["uint16", "uint256"], [1, BigInt(4200000)]), // adapterParams 225 | ], 226 | }); 227 | console.log("sendAndCallFee", sendAndCallFee); 228 | 229 | // Output: sendAndCallFee 83556372916216n 230 | ``` 231 | Last call returns a value of `83556372916216` equal to `0.000083556372916216 ETH`. 232 | 233 | Then, to mint `vMANTA` with `MANTA`, call `approve` on `MANTA` token contract to the `MantaPacificSlpx` contract, then call the `create_order` function with the same inputs as `estimateSendAndCallFee`. 234 | 235 | ```ts 236 | const { 237 | data: hash, 238 | error, 239 | isPending, 240 | writeContract 241 | } = useWriteContract() 242 | 243 | async function approveLstContract() { 244 | writeContract({ 245 | account: currentAddress, // connected address 246 | address: "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", 247 | abi: erc20Abi, 248 | functionName: "approve", 249 | args: [ 250 | "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 251 | parseUnits(3, 18), 252 | ], 253 | }) 254 | } 255 | 256 | async function mintLst() { 257 | writeContract({ 258 | account: currentAddress, // connected address 259 | address: "0x95A4D4b345c551A9182289F9dD7A018b7Fd0f940", 260 | abi: mantaSLPxAbi, 261 | functionName: "create_order", 262 | args: [ 263 | "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5", // MANTA token address 264 | parseUnits(3, 18), // amount 265 | 0, // channel_id 266 | 4000000, // dstGasForCall 267 | encodePacked(["uint16", "uint256"], [1, BigInt(4200000)]), // adapterParams 268 | ], 269 | value: sendAndCallFee as bigint, 270 | }) 271 | } 272 | 273 | const { isLoading: isConfirming, isSuccess: isConfirmed } = 274 | useWaitForTransactionReceipt({ 275 | hash, 276 | }) 277 | ``` 278 | 279 | Then wait for 8 to 10 minutes to receive the `vMANTA` token in the caller address. -------------------------------------------------------------------------------- /content/docs/vtokens/vdot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vDOT 3 | description: Understanding vDOT 4 | --- 5 | 6 | ## What is vDOT? 7 | 8 | **vDOT (voucher DOT) is a shadow token of staked DOT, with fully underlying DOT reserve and yield-bearing feature of DOT staking reward.** Users can deposit DOT into Bifrost SLP protocol and get vDOT as return, vDOT can be traded in the open market or be redeemed back to DOT. Holding vDOT equals to holding the DOT staking position, staking rewards appreciate the exchange price of vDOT. 9 | 10 | 11 | Staking rewards automatically add to the vDOT exchange price, no manual claim. The longer vDOT postion holding, the greater amount of DOT will be exchanged back for redemption. 12 | 13 | 14 | ## Why vDOT? 15 | 16 | 17 | **Liquid Staking** 18 | 19 | 20 | The product allows users to stake DOT for liquid vToken, (vDOT). vDOT will keep receiving **staking rewards** and can continue to be used in Bifrost and Polkadot-based DeFi for additional rewards. 21 | 22 | 23 | **Automatically Staking rewards capturing without scenario limitations** 24 | 25 | 26 | SLP will issue Staking rewards to vDOT by adjusting the price of vDOT / DOT upwards. vDOT Rate = SLP Staking DOT (SUM) / vDOT Total Allocation. 27 | 28 | 29 | **Floating redemption period, vDOT redemption ≤ 28 days** 30 | 31 | 32 | While Polkadot’s original chain Staking has a **fixed 28-day redemption period**, Bifrost SLP helps users to realize the possibility of early vDOT redemption by matching the real-time vDOT minting quantity with the redemption quantity at the protocol layer in the form of a queue. Theoretically, it can achieve second-level redemption. 33 | 34 | 35 | **Higher Staking Yield** 36 | 37 | 38 | In the SLP protocol, the protocol screens more than **10 verified nodes** through governance (subsequently increasing with the overall staking volume) and adds multiple filters such as the **number of nominees**, **commission ratio**, and **history of blocks out to maximize the return of this verifier portfolio** while ensuring that none of the nodes have experienced slashes. 39 | 40 | 41 | **Multi-environment Compatibility** 42 | 43 | 44 | vDOT is one of Substrate assets in Bifrost parachain, by using the [HRMP](https://wiki.polkadot.network/docs/learn-crosschain#xcmp-cross-chain-message-passing) channels between Bifrost and others, it can be easily utilized in EVM, WASM and Substarte competiable parachains. 45 | 46 | ## How it works? 47 | 48 | vDOT is minted by Bifrost SLP pallet, so firstly users have to call XCM cross chain transfer DOT from Polkadot Relay to Bifrost Parachain. 49 | 50 | ### Mint vDOT 51 | 52 | 1. Users initiate a vDOT mint order, SLP protocol transfers DOT to DOT Ready Pool (which is an order pool accumulates all mint and redeem orders), SLP mints vDOT for users; 53 | 2. DOT Ready Pool matches Mint amount and Redeem amount; 54 | 3. Oracle monitor matching results from DOT Ready Pool and send messages to Polkadot Bifrost parachain sub-addresses; 55 | 4. Parachain sub-addresses execute Staking to SLP Polkadot validators set, Oracle queries the successful messages and send them back to Bifrost DOT Ready Pool, get ready for the next matching. 56 | 57 | ### Redeem vDOT 58 | 59 | 1. Users initiate a vDOT redeem orders to DOT Ready Pool; 60 | 2. DOT Ready Pool matches Redeem amount and Mint amount, and dispatches the remaining DOTs to vDOT redeem orders, SLP destroys the redeemed vDOT amount; 61 | 3. Oracle monitor redeem orders from Bifrost chain and send messages to Polkadot Bifrost parachain sub-addresses; 62 | 4. Parachain sub-addresses execute Redeem to SLP Polkadot validators set and send redeemed DOT back to Bifrost parachain, Oracle queries all these messages and send them back to Bifrost DOT Ready Pool, get ready for the next matching. 63 | 64 | ### DOT Reward 65 | 66 | The DOT reward will be reinvested on the relay chain, and the Oracle will transmit the reward data to the DOT Ready Pool to adjust the vDOT exchange rate. 67 | 68 | $$ 69 | vDOTrate=(StakedDOT+Staking Reward)/vDOT Allocation 70 | $$ 71 | 72 | 💡 Read more detailed info in the following sections. 73 | 74 | *** 75 | 76 | ## SLP-vDOT Architecture 77 | 78 | ### **Glossary** 79 | 80 | #### DOT Ready Pool 81 | 82 | The operation of staking and the settlement of related operations are generally not subject to real-time settlement, and there will be a cycle, which is [Era in Polkadot](https://wiki.polkadot.network/docs/maintain-polkadot-parameters). In order to improve resource efficiency and utilization, the **DOT Mint and Redeem requirements with related requirements are stored through the DOT Ready Poo**l. Wait until the appropriate time for unified processing. 83 | 84 | #### Multi-sign Oracle 85 | 86 | What actions are performed by the SLP module on the Bifrost chain, the settlement of exchange rates, etc., all need to obtain accurate relay chain data. Through multisig oracles, Polkadot's on-chain data can be fed to the Bifrost chain on a regular basis or under certain circumstances, so as to keep the SLP module running normally. The accuracy and authenticity of the data is the key to the security of the SLP protocol. In the future, **this part of the function should be implemented through XCM query**. At present, a more mature multi-signature scheme is used for the time being. 87 | 88 |
89 | 90 | Oracle Multisig Address 91 | 92 | 1. bjbwPTJoPdtF96S2FEquuHoNv72T6KPzhayntu17Cr5g4BX 93 | 2. cEDk5LZS5UQtEEJnv1Sm1pDoTCDvv6rmChyF4A81sT9eCUZ 94 | 3. djJJCvG3s2Y4qZeTDS6RmmWdFSBHvcfTyJEDb2ARZKma9zA 95 | 4. eznovZYddE1KAvMc3ooBhvSS3JY6xFbii3QUCqpVEdnx5eg 96 | 5. gQCMN389RSi4gZwbG25agpyMPp1KQfPetteRU8TRd8tiQHu 97 | 98 | Multisig synthetic address: emmdmYNhx3PMyuaQZi98ZSNPw6PhFnhGnXyX2NqLwWazck2 99 | 100 |
101 | 102 | #### Aggregator Module 103 | 104 | In order to improve the user experience of Redeem (more use of Swap for lightning swaps), this module is used to AMM (automatic market-maker) behavior and **simulate arbitrage to lower vDOT's Swap discount rate to a level similar to Redeem**. The profits generated in the process continue to carry out relevant market making operations/return to users. Through this module, the system can generate additional value to promote the healthy development of the SLP module. 105 | 106 | #### Polkadot Staking Era 107 | 108 | The settlement cycle of Polkadot staking operation is every 24 hours. At the end of the cycle, the **bonding / Unbonding operation** performed in the current cycle will be confirmed, and the **staking reward will be settled**. Committing operations at the end of the cycle is most efficient because the efficient execution of most operations in the cycle is processed uniformly at the end of the cycle. 109 | 110 | #### Bifrost SLP Address 111 | 112 | The DOT pledged by SLP and the related state are managed through the **sub-account of the parachain address**. Since there is an upper limit on the amount of DOT that can be pledged by an address under the condition of maximizing revenue, it should have the ability to configure multiple sub-addresses through on-chain governance. 113 | 114 | #### vDOT Rate 115 | 116 | SLP needs to issue Staking rewards to vDOT by raising the price of vDOT / DOT, **vDOT Rate = Staking total DOT / vDOT total issuance**. This exchange rate is the basis for a large number of operations of the system. 117 | 118 | ### How DOT Ready Pool works? (Adjusting vDOT Ratio) 119 | 120 | DOT Ready Pool communicate with Oracle by receiving update status and data on Polkadot relay-chain in each Era. 121 | 122 | #### In a New Era 123 | 124 | When a new Era message is received by SLP, the system mainly performs the following operations: 125 | 126 | * Send the cross-chain message withdraw Unbonded DOT and cross-chain transfer it to the DOT Ready Pool 127 | * Get the new staking reward data in current era, a part of which is directly transferred to the Aggregator module across the chain according to the Bifrost service commission rate. 128 | * After confirming that all current operations are successful, end the operation and issue a completion event 129 | 130 | #### At the End of an Era 131 | 132 | After receiving the Era End message, the system performs the following operations in sequence: 133 | 134 | * Match Redeem demand orders one by one for DOT redemption in the order of submission, delete the redeemed demand orders, and transfer DOT back to the corresponding address (Redeem orders support partial redemption) 135 | * When the Redeem match is over, judge the current DOT Ready Pool status: 136 | 137 | 138 | **Redeem:** vDOT revoking request on Bifrost side. \ 139 | **Unbond:** DOT revoking request on Polkadot side. \ 140 | **Rebond:** cancel DOT unbonding. 141 | 142 | 143 | | DOT has leftovers | Initiate a cross-chain request to bond more funds with the remaining DOT on the relay chain | 144 | | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | 145 | | All DOT have been matched, and the relay chain Unbonding state DOT ≥ Redeem demand order DOT total | Initiate a cross-chain request to Rebond funds (Unbonding state DOT - Redeem demand list sum DOT) | 146 | | All DOTs have been matched, and the relay chain Unbonding state DOT < Redeem demand order DOT total | Initiate a cross-chain request to Unbond funds (Redeem demand list total DOT - Unbonding status DOT) | 147 | 148 | * Calculate the current vDOT Rate = Staking DOT (SUM) / vDOT total issuance and update the record 149 | * After confirming that the above operations are successfully executed, end the current Era operation and wait for the next cycle to start 150 | 151 | ### The Workflow of Aggregator Module 152 | 153 | #### 1. Check the DOT/vDOT exchange rate in Zenlink DEX 154 | 155 | Get the exchange rate of DOT/vDOTin the DEX by query between modules at the end of the block. 156 | 157 | #### 2. Calculate and construct the transaction 158 | 159 | Based on the comparison between the queried DEX exchange rate and vDOT Rate, when the exchange rate in DEX < vDOT Rate, a transaction is triggered, and the transaction is constructed based on the number of DOTs existing in the current Aggregator Module, so that the DEX exchange rate after the transaction ≈ vDOT Rate. Initiate a transaction to get a discounted vDOT. 160 | 161 | #### 3. Determine whether to redeem vDOT 162 | 163 | The remaining DOT in the current module + the Redeem value requested by the current module < the set arbitrage loop maximum value (the arbitrage loop maximum value can be set and modified by governance). Then perform the Redeem operation on the newly acquired vDOT in the module (DOT Ready Pool will immediately process the Redeem order submitted by the Aggregator first) 164 | 165 | #### 4. Excess vDOT is flushed into the liquidity pool 166 | 167 | When the remaining DOT in the current module + the Redeem value requested by the current module > the set arbitrage cycle maximum value, vDOT will no longer be redeemed, but half of the balance of vDOT and DOT will be directly flushed into DEX's DOT - vDOT In the liquidity pool of the trading pair, obtain LP Token. 168 | 169 | ## vDOT Validator Set 170 | 171 | ## Selecting Conditions 172 | 173 | There are several filters to select vDOT Validators: 174 | 175 | * Validator address with on-chain identity 176 | * No experienced Slashes 177 | * Low commission 178 | * Total Stake below average number 179 | * Average Return Rate in 28 days 180 | * Available nominator slot 181 | 182 | ## Selecting Organization 183 | 184 | The selecting organization will evolute in 3 stages: 185 | 186 | 1. Bifrost Team 187 | 2. Bifrost Council 188 | 3. SLP automatic selection (current stage) 189 | 190 | Validator selecting or replacement is a automatic process, it depends on a score ranking which is socred by a script: 191 | 192 | [**Validator Score Ranking**](https://docs.google.com/spreadsheets/d/13YdCMc_bVdmy5My22mWRTC5ITwVEaRZQi4fIZGr8tSw/edit#gid=628365504) 193 | 194 | [**The Script**](https://bifrost-api-test.vercel.app/api/dapp/staking/_refresh) 195 | 196 | ## Current Validator Set 197 | 198 | Check for live Validator Set: 199 | 200 | [vDOT Validator Tracker](https://bifrost.app/vstaking/vDOT?tab=validators) 201 | -------------------------------------------------------------------------------- /content/docs/vtokens/vksm.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vKSM 3 | description: Understanding vKSM 4 | --- 5 | 6 | ## What is vKSM? 7 | 8 | **vKSM (voucher KSM) is a shadow token of staked KSM, with fully underlying KSM reserve and yield-bearing feature of KSM staking reward.** Users can deposit KSM into Bifrost SLP protocol and get vKSM as return, vKSM can be traded in the open market or be redeemed back to KSM. Holding vKSM equals to holding the KSM staking position, staking rewards appreciate the exchange price of vKSM. 9 | 10 | 11 | Staking rewards automatically add to the vKSM exchange price, no manual claim. The longer vKSM postion holding, the greater amount of KSM will be exchanged back for redemption. 12 | 13 | 14 | ## Why vKSM? 15 | 16 | 17 | **Liquid Staking** 18 | 19 | 20 | The product allows users to stake KSM for liquid vToken, (vKSM). vKSM will keep receiving **staking rewards** and can continue to be used in Bifrost and Kusama-based DeFi for additional rewards. 21 | 22 | 23 | **Automatically Staking rewards capturing without scenario limitations** 24 | 25 | 26 | SLP will issue Staking rewards to vKSM by adjusting the price of vKSM / KSM upwards. vKSM Rate = SLP Staking KSM (SUM) / vKSM Total Issuance. 27 | 28 | 29 | **Floating redemption period, vKSM redemption ≤ 7 days** 30 | 31 | 32 | While Kusama’s original chain Staking has a **fixed 7-day redemption period**, Bifrost SLP helps users to realize the possibility of early vKSM redemption by matching the real-time vKSM minting quantity with the redemption quantity at the protocol layer in the form of a queue. Theoretically, it can achieve second-level redemption. 33 | 34 | 35 | **Higher Staking Yield** 36 | 37 | 38 | In the SLP protocol, the protocol screens more than **10 verified nodes** through governance (subsequently increasing with the overall staking volume) and adds multiple filters such as the **number of nominees**, **commission ratio**, and **history of blocks out to maximize the return of this verifier portfolio** while ensuring that none of the nodes have experienced slashes. 39 | 40 | 41 | **Multi-environment Compatibility** 42 | 43 | 44 | vKSM is one of Substrate assets in Bifrost parachain, by using the [HRMP](https://wiki.polkadot.network/docs/learn-crosschain#xcmp-cross-chain-message-passing) channels between Bifrost and others, it can be easily utilized in EVM, WASM and Substarte competiable parachains. 45 | 46 | ## How it works? 47 | 48 | vKSM is minted by Bifrost SLP pallet, so firstly users have to call XCM cross chain transfer KSM from Kusama Relay to Bifrost Parachain. 49 | 50 | 51 | ### Mint vKSM 52 | 53 | 1. Users initiate a vKSM mint order, SLP protocol transfers KSM to KSM Ready Pool (which is an order pool accumulates all mint and redeem orders), SLP mints vKSM for users; 54 | 2. KSM Ready Pool matches Mint amount and Redeem amount; 55 | 3. Oracle monitor matching results from KSM Ready Pool and send messages to Kusama Bifrost parachain sub-addresses; 56 | 4. Parachain sub-addresses execute Staking to SLP Kusama validators set, Oracle queries the successful messages and send them back to Bifrost KSM Ready Pool, get ready for the next matching. 57 | 58 | ### Redeem vKSM 59 | 60 | 1. Users initiate a vKSM redeem orders to KSM Ready Pool; 61 | 2. KSM Ready Pool matches Redeem amount and Mint amount, and dispatches the remaining KSMs to vKSM redeem orders, SLP destroys the redeemed vKSM amount; 62 | 3. Oracle monitor redeem orders from Bifrost chain and send messages to Kusama Bifrost parachain sub-addresses; 63 | 4. Parachain sub-addresses execute Redeem to SLP Kusama validators set and send redeemed KSM back to Bifrost parachain, Oracle queries all these messages and send them back to Bifrost KSM Ready Pool, get ready for the next matching. 64 | 65 | ### KSM Reward 66 | 67 | The KSM reward will be reinvested on the relay chain, and the Oracle will transmit the reward data to the KSM Ready Pool to adjust the vKSM exchange rate. 68 | 69 | $$ 70 | vKSMrate=(StakedKSM+StakingReward)/vKSM Allocation 71 | $$ 72 | 73 | 💡 Read more detailed info in the following sections. 74 | 75 | *** 76 | 77 | ## SLP-vKSM Architecture 78 | 79 | ### **Glossary** 80 | 81 | #### KSM Ready Pool 82 | 83 | The operation of staking and the settlement of related operations are generally not subject to real-time settlement, and there will be a cycle, which is [Era in Kusama](https://wiki.polkadot.network/docs/kusama-parameters#periods-of-common-actions-and-attributes). In order to improve resource efficiency and utilization, the **KSM Mint and Redeem requirements with related requirements are stored through the KSM Ready Poo**l. Wait until the appropriate time for unified processing. 84 | 85 | #### Multi-sign Oracle 86 | 87 | What actions are performed by the SLP module on the Bifrost chain, the settlement of exchange rates, etc., all need to obtain accurate relay chain data. Through multisig oracles, Kusama's on-chain data can be fed to the Bifrost chain on a regular basis or under certain circumstances, so as to keep the SLP module running normally. The accuracy and authenticity of the data is the key to the security of the SLP protocol. In the future, **this part of the function should be implemented through XCM query**. At present, a more mature multi-signature scheme is used for the time being. 88 | 89 |
90 | 91 | Oracle Multisig Address 92 | 93 | 1. bjbwPTJoPdtF96S2FEquuHoNv72T6KPzhayntu17Cr5g4BX 94 | 2. cEDk5LZS5UQtEEJnv1Sm1pDoTCDvv6rmChyF4A81sT9eCUZ 95 | 3. djJJCvG3s2Y4qZeTDS6RmmWdFSBHvcfTyJEDb2ARZKma9zA 96 | 4. eznovZYddE1KAvMc3ooBhvSS3JY6xFbii3QUCqpVEdnx5eg 97 | 5. gQCMN389RSi4gZwbG25agpyMPp1KQfPetteRU8TRd8tiQHu 98 | 99 | Multisig synthetic address: emmdmYNhx3PMyuaQZi98ZSNPw6PhFnhGnXyX2NqLwWazck2 100 | 101 |
102 | 103 | #### Aggregator Module 104 | 105 | In order to improve the user experience of Redeem (more use of Swap for lightning swaps), this module is used to AMM (automatic market-maker) behavior and **simulate arbitrage to lower vKSM's Swap discount rate to a level similar to Redeem**. The profits generated in the process continue to carry out relevant market making operations/return to users. Through this module, the system can generate additional value to promote the healthy development of the SLP module. 106 | 107 | #### Kusama Staking Era 108 | 109 | The settlement cycle of Kusama staking operation is every 6 hours. At the end of the cycle, the **bonding / Unbonding operation** performed in the current cycle will be confirmed, and the **staking reward will be settled**. Committing operations at the end of the cycle is most efficient because the efficient execution of most operations in the cycle is processed uniformly at the end of the cycle. 110 | 111 | #### Bifrost SLP Address 112 | 113 | The KSM pledged by SLP and the related state are managed through the **sub-account of the parachain address**. Since there is an upper limit on the amount of KSM that can be pledged by an address under the condition of maximizing revenue, it should have the ability to configure multiple sub-addresses through on-chain governance. 114 | 115 | #### vKSM Rate 116 | 117 | SLP needs to issue Staking rewards to vKSM by raising the price of vKSM / KSM, **vKSM Rate = Staking total KSM / vKSM total issuance**. This exchange rate is the basis for a large number of operations of the system. 118 | 119 | ### How KSM Ready Pool works? (Adjusting vKSM Ratio) 120 | 121 | KSM Ready Pool communicate with Oracle by receiving update status and data on Kusama relay-chain in each Era. 122 | 123 | #### In a New Era 124 | 125 | When a new Era message is received by SLP, the system mainly performs the following operations: 126 | 127 | * Send the cross-chain message withdraw Unbonded KSM and cross-chain transfer it to the KSM Ready Pool 128 | * Get the new staking reward data in current era, a part of which is directly transferred to the Aggregator module across the chain according to the Bifrost service commission rate. 129 | * After confirming that all current operations are successful, end the operation and issue a completion event 130 | 131 | #### In the End of an Era 132 | 133 | After receiving the Era End message, the system performs the following operations in sequence: 134 | 135 | * Match Redeem demand orders one by one for KSM redemption in the order of submission, delete the redeemed demand orders, and transfer KSM back to the corresponding address (Redeem orders support partial redemption) 136 | * When the Redeem match is over, judge the current KSM Ready Pool status: 137 | 138 | 139 | **Redeem:** vKSM revoking request on Bifrost side. \ 140 | **Unbond:** KSM revoking request on Kusama side. \ 141 | **Rebond:** cancel KSM unbonding. 142 | 143 | 144 | | KSM has leftovers | Initiate a cross-chain request to bond more funds with the remaining KSM on the relay chain | 145 | | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | 146 | | All KSMs have been matched, and the relay chain Unbonding state KSM ≥ Redeem demand order KSM total | Initiate a cross-chain request to Rebond funds (Unbonding state KSM - Redeem demand list sum KSM ) | 147 | | All KSMs have been matched, and the relay chain Unbonding state KSM < Redeem demand order KSM total | Initiate a cross-chain request to Unbond funds (Redeem demand list total KSM - Unbonding status KSM) | 148 | 149 | * Calculate the current vKSM Rate = Staking KSM (SUM) / vKSM total issuance and update the record 150 | * After confirming that the above operations are successfully executed, end the current Era operation and wait for the next cycle to start 151 | 152 | ### The Workflow of Aggregator Module 153 | 154 | 155 | 156 | #### 1. Check the KSM/vKSM exchange rate in Zenlink DEX 157 | 158 | Get the exchange rate of KSM/vKSM in the DEX by query between modules at the end of the block. 159 | 160 | #### 2. Calculate and construct the transaction 161 | 162 | Based on the comparison between the queried DEX exchange rate and vKSM Rate, when the exchange rate in DEX < vKSM Rate, a transaction is triggered, and the transaction is constructed based on the number of KSMs existing in the current Aggregator Module, so that the DEX exchange rate after the transaction ≈ vKSM Rate. Initiate a transaction to get a discounted vKSM. 163 | 164 | #### 3. Determine whether to redeem vKSM 165 | 166 | The remaining KSM in the current module + the Redeem value requested by the current module < the set arbitrage loop maximum value (the arbitrage loop maximum value can be set and modified by governance). Then perform the Redeem operation on the newly acquired vKSM in the module (KSM Ready Pool will immediately process the Redeem order submitted by the Aggregator first) 167 | 168 | #### 4. Excess vKSM is flushed into the liquidity pool 169 | 170 | When the remaining KSM in the current module + the Redeem value requested by the current module > the set arbitrage cycle maximum value, vKSM will no longer be redeemed, but half of the balance of vKSM and KSM will be directly flushed into DEX's KSM - vKSM In the liquidity pool of the trading pair, obtain LP Token. 171 | 172 | ## vKSM Validator Set 173 | 174 | ## Selecting Conditions 175 | 176 | There are several filters to select vKSM Validators: 177 | 178 | * Validator address with on-chain identity 179 | * No experienced Slashes 180 | * Low commission 181 | * Total Stake below average number 182 | * Average Return Rate in 7 days 183 | * Available nominator slot 184 | 185 | ## Selecting Organization 186 | 187 | The selecting organization will evolute in 3 stages: 188 | 189 | 1. Bifrost Team 190 | 2. Bifrost Council 191 | 3. SLP automatic selection (current stage) 192 | 193 | Validator selecting or replacement is a automatic process, it depends on a score ranking which is socred by a script: 194 | 195 | [**Validator Score Ranking**](https://docs.google.com/spreadsheets/d/13YdCMc_bVdmy5My22mWRTC5ITwVEaRZQi4fIZGr8tSw/edit#gid=628365504) 196 | 197 | [**The Script**](https://bifrost-api-test.vercel.app/api/dapp/staking/_refresh) 198 | 199 | ## Current Validator Set 200 | 201 | Check for live Validator Set: 202 | 203 | [vKSM Validator Tracker](https://bifrost.app/vstaking/vKSM?tab=validators) 204 | -------------------------------------------------------------------------------- /content/docs/vtokens/veth.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vETH 3 | description: Understanding vETH 4 | --- 5 | 6 | ## What is vETH? 7 | 8 | Bifrost's non-custodial liquid staking solution allows users to **stake their ETH and receive vETH (voucher ETH) in exchange, with staking rewards reflected in vETH's value**. 9 | 10 | By using the bridge between Ethereum, L2s and Polkadot, **vETH can exist in both EVM and Substrate environment**. 11 | 12 | 13 | Staking rewards automatically add to the vETH exchange price, no manual claim. The longer vETH postion holding, the greater amount of ETH can be exchanged back while redemption. 14 | 15 | 16 | ### vETH vs ETH LSTs in EVM? 17 | 18 | vETH can operate (mint, hold, and transfer) simultaneously across both EVM and Substrate environments, enabling EVM users to access better yield opportunities within the Polkadot ecosystem. 19 | 20 | ## Why vETH? 21 | 22 | 23 | **Liquidity and capital efficiency** 24 | 25 | 26 | vETH as a liquid staked ETH has enough liquidity to provide users an option to hedge risk during unforeseen market conditions (price decline during locking period), allowing holders the capability to manage their exposures and funds. 27 | 28 | 29 | **Automatically Staking rewards capturing without scenario limitations** 30 | 31 | 32 | Staking reward apprecates the value of vETH. vETH Value = SLP pledged ETH(SUM) / vETH Total Issuance. Thus, vETH automatically appreciating the value with staking rewards wherever it is. 33 | 34 | 35 | **No Technical Background Needed** 36 | 37 | 38 | Minting ETH to vETH which represents holding a representation in-locking ETH with staking rewards, requires no technical knowledge for users in running with Ethereum validators. 39 | 40 | 41 | **Extra yield senarios** 42 | 43 | 44 | vETH represents staked ETH, but simultaneously is also a yield bearing liquid-derivative, which means it can be used in various DeFi scenarios such as liquidity provision and farming on DEXs, as well as in borrowing and lending use cases. Specifically, vETH can be deposited as a collateral asset for yield leveraging on money markets. 45 | 46 | 47 | **Cross-chain** 48 | 49 | 50 | By leveraging SLPx, vETH can easily mint/redeem/trasnfer across Polkadot, Ethereum, L2s via Snowbridge and Hyperbridge. 51 | 52 | ## FAQ 53 | 54 | **What is the minimum stake (as known as Deposit)?** 55 | 56 | *It's 0.01 ETH.* 57 | 58 | **What is the maximum stake (as known as Deposit)?** 59 | 60 | *It's unlimited.* 61 | 62 | **How does the protocol protect the value of vETH?** 63 | 64 | *All staked ETH and the insurance of vETH are storaged in Bifrost Chain, protected by Bifrost OpenGov and Polkadot shared security.* 65 | 66 | **How can I access my deposit and rewards?** 67 | 68 | *vETH is a yield-bearing token where staking rewards increase the token's value. When you redeem your vETH, you'll receive both your initial deposit and accumulated rewards.* 69 | 70 | [**How does vETH works on Bifrost?**](#minting-redeeming-veth-on-bifrost) 71 | 72 | *vETH is issued or burned on Bifrost chain, ETH is bridged between Bifrost and Ethereum via Snowbridge.* 73 | 74 | [**What is *****Snowbridge*****?**](https://docs.snowbridge.network/) 75 | 76 | *In the Polkadot ecosystem, Snowbridge is a crucial cross-chain communication protocol designed to enable trustless bidirectional bridging between Polkadot and Ethereum.* 77 | 78 | [**How does vETH works on Ethereum?**](#minting-redeeming-veth-on-ethereum) 79 | 80 | *SLPx allows users to directly mint and redeem vETH on Ethereum.* 81 | 82 | [**What is SLPx?**](https://docs.bifrost.io/for-builders/build-with-slpx/overview) 83 | 84 | Bifrost SLPx streamlined the complex process of bridging funds to destination chain, allowing users to liquid stake on any chain without leaving UI to interact with bridges. 85 | 86 | [**How does vETH works on L2s?**](#minting-redeeming-veth-on-l2) 87 | 88 | *SLPx allows users to directly mint and redeem vETH on Base, Arbitrum, BSC Chain and OP. The asset bridging is backed by Hyperbridge.* 89 | 90 | [**What is *****Hyperbridge?***](https://docs.hyperbridge.network/) 91 | 92 | *HyperBridge leverages **advanced cryptographic proofs** (such as zk-SNARKs or Merkle proofs) and **Polkadot’s shared security model** to create a **trustless, scalable, and gas-efficient** cross-chain infrastructure.* 93 | 94 | ## How does it works? 95 | 96 | ### Minting/Redeeming vETH on Bifrost 97 | 98 | #### Minting Process 99 | 100 | 1. Mint on Bifrost using `ETH`, users immediately receive `vETH` 101 | 2. `ETH` is bridged through `Snowbridge` to the SLP contract on Ethereum 102 | 3. The SLP contract on Ethereum combines with SSV to perform wrapped staking of `ETH` 103 | 4. Bifrost vETH Oracle periodically fetches ETH Staking rewards and synchronizes to the Bifrost network for exchange rate adjustment 104 | 105 | #### Redemption Process 106 | 107 | 1. Use `vETH` on Bifrost for redemption, `vETH` is burned and corresponding redemption request orders are created 108 | 2. Bifrost calculates the number of exit nodes needed through Oracle, and Oracle sends exit node requests to the SLP protocol on Ethereum 109 | 3. SLP protocol executes node exit operations through SSV and waits for the exit node `ETH` to arrive 110 | 4. The redeemed `ETH` is bridged through `Snowbridge` to the Bifrost SLP protocol 111 | 5. SLP protocol executes redemption according to the redemption request queue, users finally receive `ETH` 112 | 113 | ### Minting/Redeeming vETH on Ethereum 114 | 115 | #### Minting Process 116 | 117 | 1. Call the SLPx contract to deposit `ETH` for minting 118 | 2. SLPx contract sends `ETH` and minting request to Bifrost SLPx through `Snowbridge` 119 | 3. SLPx executes minting and bridges `vETH` and `ETH` to the SLP contract on Ethereum through `Snowbridge` 120 | 4. User receives `vETH` 121 | 122 | #### Redemption Process 123 | 124 | 1. Call the SLPx contract to deposit `vETH` for redemption 125 | 2. `vETH` and redemption request are bridged to Bifrost SLPx through `Snowbridge` 126 | 3. SLPx executes redemption, and after redemption is credited, `ETH` is bridged to the Ethereum user address through `Snowbridge` 127 | 128 | ### Minting/Redeeming vETH on L2 129 | 130 | #### Minting Process 131 | 132 | 1. Call the SLPx contract to deposit `ETH` for minting 133 | 2. SLPx contract sends `ETH` and minting request to Bifrost SLPx through `Hyperbridge` 134 | 3. SLPx executes minting and bridges `vETH` to the SLP contract on Ethereum through `Hyperbridge` 135 | 4. SLP contract bridges `vETH` to the L2 user 136 | 137 | #### Redemption Process 138 | 139 | 1. Transfer `vETH` to SLPx contract to send redemption request 140 | 2. `vETH` and redemption request are bridged to Bifrost SLPx through `Hyperbridge` 141 | 3. SLPx executes redemption, and after redemption is credited, bridges to the L2 user address through `Hyperbridge` 142 | 143 | ## SSV and DKG in vETH 144 | 145 | vETH 3.0 uses the SSV network to implement a trustless staking pool. 146 | 147 | After users stake ETH, they receive vETH, while the operation of the underlying ETH validators is maintained by the SSV Cluster - **different unique groups of operators running by various parties.** 148 | 149 | In conclusion, SSV uses distributed key sharing (DKG) and multi-party computation (MPC) to shard validator keys across multiple node operators, avoiding single points of failure and enhancing the security and censorship resistance of vETH staking. 150 | 151 | ## vETH Contracts 152 | 153 | Stay tuned. 154 | 155 | ## Appendix 156 | 157 | ### ETH 2.0 Deposit Records 158 | 159 | vETH minting refers to the process in which users invest any amount of ETH to participate in Ethereum 2.0 staking and obtain the corresponding certificate vETH. After minting, users can sell vETH at any time to gain liquidity. [vETH minting](https://bifrost.app/vstaking/vETH). 160 | 161 | vETH minting vETH will be divided into four stages to achieve complete decentralization, and is currently in the second stage of development. The ETH invested by users will be put into the official Ethereum 2.0 Deposit contract to complete the staking operation. This operation process is transparent and open, but the smart contract calling process is more complicated. The contract calls involved are 4 levels of concatenated calls: 162 | 163 | > Multisig Management Contract » BatchDeposit Contract » vETH Mint Contract » ETH 2.0 Official Deposit Contract 164 | 165 | The BatchDeposit contract is upgradeable, and a layer of proxy contract is encapsulated on it. There is a Worker account in the BatchDeposit contract, which can be replaced by multi-signature operations, and is specially used to store the Deposit parameters on the chain. This Worker role is currently played by Bifrost. After the Worker fills in the parameters, it can initiate another transaction that triggers Deposit. After multiple partners have signed and approved it, the ETH invested by the user will be deposited into the Ethereum 2.0 official Deposit contract. 166 | 167 | The parameters filled in by Bifrost are currently provided by [InfStones](https://infstones.com/) and [Ankr](https://www.ankr.com/) respectively, and are double-checked by InfStones and Ankr before multi-signature approval. After each multi-signature operation is completed, the Deposit transaction information will be publicly displayed in the community, and users can check the corresponding parameter information through Etherscan. Through these parameter information, the actual staking income can be queried and counted. Before the launch of the Bifrost mainnet, staking rewards are distributed in the form of ERC20-vETH. After the Bifrost mainnet goes online, all ERC20-vETH will be mapped to the Bifrost mainnet, and the subsequent staking income will be reflected in the minting price adjustment formula. Check [how Bifrost vToken works](https://wiki.bifrost.finance/getting-started/understanding-bifrost/liquid-staking-derivative). 168 | 169 | **Multisig Parties** 170 | 171 | {/*
地址参与方
AddressParties
0x4882328c14bb1a9a5c4F5E2B21bE345A72A1f638InfStones
0x0620Ca0ca30c917aB62d119E5d91A9a954d31604LongHash
0x146eE71e057e6B10eFB93AEdf631Fde6CbAED5E2Ankr
0x4f62839ccD37c9a41999ceDB71cc9B4E8B2eBB97DFG
0xdd4bB59E9088987CbEe31cC5a8e63cD8FEC12065Bifrost
*/} 172 | 173 | The current parameter configuration is that any 3 of the 5 participants sign the Deposit operation to take effect. 174 | 175 | **Check Multisig** 176 | 177 | [https://gnosis-safe.io/app/#/safes/0x7c7FCb39BAA90f2FDef625e7B0b0e858D579CD8E/transactions](https://gnosis-safe.io/app/#/safes/0x7c7FCb39BAA90f2FDef625e7B0b0e858D579CD8E/transactions) 178 | 179 | **MintDrop Contract** 180 | 181 | [https://etherscan.io/address/0xec1d6163e05b3f5d0fb8f354881f6c8b793ad612](https://etherscan.io/address/0xec1d6163e05b3f5d0fb8f354881f6c8b793ad612) 182 | 183 | **vETH Contract** 184 | 185 | [https://etherscan.io/address/0xc3d088842dcf02c13699f936bb83dfbbc6f721ab](https://etherscan.io/address/0xc3d088842dcf02c13699f936bb83dfbbc6f721ab) 186 | 187 | [https://etherscan.io/token/0xc3d088842dcf02c13699f936bb83dfbbc6f721ab](https://etherscan.io/token/0xc3d088842dcf02c13699f936bb83dfbbc6f721ab) 188 | 189 | **vETH Minting Records** (Updated on 2021-02-18, Deposit total 162 x 32 = 5184 ETH) 190 | 191 | 1 [Deposit InfStones first test](https://etherscan.io/tx/0xb2387953eb774cfc9744b2fdb92ef4fb59f51df4efeff5ce8f583be5bc223061#eventlog) 192 | 193 | 9 [Deposit InfStones](https://etherscan.io/tx/0x57b76faf452a57301c6cdbb9fdebd8b549f42cac826cf22d9d1d3b19401f5940#eventlog) 194 | 195 | 10 [Deposit InfStones](https://etherscan.io/tx/0x8aa70ff63a5a1819a165cb558b3ed2597cd13ee39ef0abf7008386ca78656424#eventlog) 196 | 197 | 27 [Deposit InfStones](https://etherscan.io/tx/0x8c87a2fce07a98a09a37ded12a460cb2c3868950392b369941c6a8fa63ea4a99#eventlog) 198 | 199 | 1 [Deposit Ankr first test](https://etherscan.io/tx/0x046647b4e948e5a6a89bdb5da7c40d73564669a61d0b8a516bd2bd42adb46967#eventlog) 200 | 201 | 14 [Deposit Ankr](https://etherscan.io/tx/0x9153c1f2db67a650bf1a2c6607311633abac06c5434ae819d864e3b3e1c34acd#eventlog) 202 | 203 | 50 [Deposit InfStones](https://etherscan.io/tx/0x45f9f2ce3f6f74333b5e6e88fba0f97e315f24473f9218ccd36ebea43e9cc3e0#eventlog) 204 | 205 | 50 [Deposit InfStones](https://etherscan.io/tx/0x6aa751437e978f1323c75f7c954c8dad5287d9d131cead625e00be3f3f1fe065#eventlog) 206 | 207 | **Updated on 2021-03-11, Deposit total 200 x 32 = 6400 ETH** 208 | 209 | 50 [Deposit InfStones](https://etherscan.io/tx/0x15db182214e0d88f27953cbddc587aa4b28a191aa6800c8a01366dc5b0aed450#eventlog) 210 | 211 | 50 [Deposit InfStones](https://etherscan.io/tx/0x171683982ddcf4ab1f0a6e2770e46cb0eccf843a9a67fed872127c1ff89f27dd#eventlog) 212 | 213 | 50 [Deposit Ankr](https://etherscan.io/tx/0x3efacae16c2a95c0be67f202044de7e7706e9c9db69789a9d71490c732091162#eventlog) 214 | 215 | 50 [Deposit Ankr](https://etherscan.io/tx/0xabbf2fc950e384e250479fbcd4837a53b2f1de07a6b1b539b6aca1c979906e3b#eventlog) 216 | 217 | **Updated on 2021-03-25, Deposit total 100 x 32 = 3200 ETH** 218 | 219 | 50 [Deposit InfStones](https://etherscan.io/tx/0xcd60dd1daa8b7b6566f7d156a9bc573c85908bb5dd0a3cc6e3e2635beafc17aa#eventlog) 220 | 221 | 50 [Deposit InfStones](https://etherscan.io/tx/0x61d0f288118d56f1de975609df0850c4c22c0918f03db51af6ea3b7642a512ad#eventlog) 222 | 223 | **Updated on 2021-04-12, Deposit total 100 x 32 = 3200 ETH** 224 | 225 | 50 [Deposit Ankr](https://etherscan.io/tx/0x811ea4c01284b9c04f81df3867693e9d675888f955cf0f883ec7df959b8cb5ae#eventlog) 226 | 227 | 50 [Deposit Ankr](https://etherscan.io/tx/0x7a6bacb0c17fd7ec3da220850a4a8b271bc4c785e76f60905f74a00bfc6d4d1b#eventlog) 228 | 229 | **The total amount of ETH deposited in the Deposit contract: 5184 + 6400 + 3200 = 17984 ETH** 230 | 231 | Continue to update... 232 | -------------------------------------------------------------------------------- /content/docs/vtokens/vastr.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: vASTR 3 | description: Understanding vASTR 4 | --- 5 | 6 | ## What is vASTR? 7 | 8 | vASTR (voucher ASTR) is a shadow token of staked ASTR, with fully underlying ASTR reserve and yield-bearing feature of ASTR staking reward. Users can deposit ASTR into Bifrost SLP protocol and get vASTR as return, vASTR can be traded in the open market or be redeemed back to ASTR. Holding vASTR equals to holding the ASTR staking position, staking rewards appreciate the exchange price of vASTR. 9 | 10 | 11 | Staking rewards automatically add to the vASTR exchange price, no manual claim. The longer vASTR postion holding, the greater amount of ASTR will be exchanged back when redemption. 12 | 13 | 14 | ## Why vASTR? 15 | 16 | 17 | **Liquid Staking** 18 | 19 | 20 | The product allows users to delegate ASTR for liquid vToken, (vASTR). vASTR will keep receiving staking rewards and can continue to be used in Bifrost and Polkadot-based DeFi for additional rewards. 21 | 22 | 23 | **Automatically Staking rewards capturing without scenario limitations** 24 | 25 | 26 | SLP will issue Staking rewards to vASTR by adjusting the price of vASTR / ASTR upwards. vASTR Rate = SLP Staking ASTR (SUM) / vASTR Total Issuance. 27 | 28 | 29 | **Floating redemption period, vASTR ≤ 240 hours** 30 | 31 | 32 | While ASTR’s original chain Staking has a fixed revoke period, Bifrost SLP helps users to realize the possibility of **early vASTR redemption** by matching the real-time vASTR minting quantity with the redemption quantity at the protocol layer in form of a queue. 33 | 34 | 35 | **Multi-environment Compatibility** 36 | 37 | 38 | vASTR is one of Substrate assets in Bifrost parachain, by using the [HRMP](https://wiki.polkadot.network/docs/learn-crosschain#xcmp-cross-chain-message-passing) channels between Bifrost and others, it can be easily utilized in EVM, WASM and Substarte competiable parachains. 39 | 40 | ## How it works? 41 | 42 | vASTR is minted by Bifrost SLP pallet, so firstly users have to call XCM cross chain transfer ASTR from Astar to Bifrost Parachain. 43 | 44 | ### Mint vASTR 45 | 46 | 1. Users initiate a vASTR mint order, SLP protocol transfers ASTR to ASTR Ready Pool (which is an order pool accumulates all mint and redeem orders), SLP mints vASTR for users; 47 | 2. ASTR Ready Pool matches Mint amount and Redeem amount; 48 | 3. Oracle monitor matching results from ASTR Ready Pool and send messages to ASTR-Bifrost SLP addresses; 49 | 4. Bifrost SLP addresses execute Staking to SLP ASTR DApp staking set, Oracle queries the successful messages and send them back to Bifrost ASTR Ready Pool, get ready for the next matching. 50 | 51 | About SLP Oracle/backend service: The SLP backend service is using ⅘ multisig nodes, responsible for adjusting the exchange rate in each round, returning the due amount to the current redeem due user, checking the ledger, summarizing the pledge amount in a new round, and calling the corresponding SLP module function. In order to more flexibly handle the increase or decrease of users' pledge in each round, we will adopt a decentralized delegation relationship and a small-amount pledge strategy to increase the efficiency of the use of funds. 52 | 53 | ### Redeem vASTR 54 | 55 | 1. Users initiate a vASTR redeem orders to ASTR Ready Pool; 56 | 2. ASTR Ready Pool matches Redeem amount and Mint amount, and dispatches the remaining ASTR to vASTR redeem orders, SLP destroys the redeemed vASTR amount; 57 | 3. Oracle monitor redeem orders from Bifrost chain and send messages to ASTR-Bifrost SLP addresses; 58 | 4. Bifrost SLP addresses execute Redeem to SLP ASTR DApp staking set and send redeemed ASTR back to Bifrost parachain, Oracle queries all these messages and send them back to Bifrost ASTR Ready Pool, get ready for the next round matching. 59 | 60 | ### ASTR Reward 61 | 62 | The ASTR reward will be reinvested on ASTR, and the Oracle will transmit the reward data to the ASTR Ready Pool to adjust the vASTR exchange rate. 63 | 64 | $$ 65 | vASTR rate=(StakedASTR+StakingReward)/vASTR Allocation 66 | $$ 67 | 68 | 💡 Read more detailed info in the following sections. 69 | 70 | *** 71 | 72 | ## SLP-vASTR Technology Implementation 73 | 74 | ### Overall operation process 75 | 76 | The entire SLP protocol includes three parts, the Vtoken-Minting module, the SLP module, and the backend service. 77 | 78 | The user can call the mint/redeem/rebond method of the VtokenMinting module through the front end to mint ASTR into vASTR, or exchange vASTR back to ASTR. During the period of holding vASTR, users can enjoy staking benefits, which are reflected in the exchange rate of vASTR to ASTR. If the user has new pledge amounts in the pool during the redeem period, the user will be able to experience the process of fast redemption, and the new pledge amount will be returned to the users in front of the redeem queue first. 79 | 80 | The SLP module of Bifrost is responsible for communicating with the ParachainStaking module of the ASTR chain by sending cross-chain messages to perform operations such as delegate, delegate\_bond\_more, schedule\_delegator\_bond\_less, schedule\_revoke\_delegation, execute\_delegation\_request, cancel\_delegation\_request, schedule\_leave\_delegators, execute\_leave\_delegators, cancel\_leave\_delegators. The delegator account is generated by Bifrost's parachain address on the ASTR chain, and the corresponding sub-account is generated by calling the as\_derivative function of the utility module. All delegator and validator addresses are stored and used in the format of MultiLocation in the module. 81 | 82 | ### Backend service function 83 | 84 | The SLP backend service is responsible for adjusting the exchange rate in each round, returning the due amount to the current redeem due user, checking the ledger, summarizing the pledge amount in a new round, and calling the corresponding SLP module function. In order to more flexibly handle the increase or decrease of users' pledge in each round, we will adopt a decentralized delegation relationship and a small-amount pledge strategy to increase the efficiency of the use of funds. 85 | 86 | #### At the start of Round 87 | 88 | 1. Update round numbers 89 | 2. Charge the custody fee, add interest (according to the dividend event, dividends before n+1 period), modify the exchange rate, and transfer the interest amount back to the exit account. 90 | 3. Withdrawal of redemption due amount 91 | 4. Repay the current due debt and transfer the remaining amount to the entry account for quick redemption. 92 | 5. Query and compensate the reserve amount of handling fees for each operating account. 93 | 94 | #### Before Round ends 95 | 96 | 1. Transfer the excess amount in the entry account to a different delegate, and perform the pledge operation. When pledging, pay attention to check if the ranking is in the bottom delegation. If so, add the delegating amount, or transfer the amount to another DApp Staking. 97 | 2. Check the ledger, warn and adjust accordingly if there are discrepancies. 98 | 99 | #### Attention for staking operations: 100 | 101 | 1. The staking amount is distributed among multiple delegation relationships of multiple delegates in a relatively even manner to facilitate each round of bond and redeem fund operations and improve the efficiency of fund use. 102 | 2. Don't let the delegates fall into the bottom delegation group of DApp Stakings. It is necessary to maintain a real-time top lowest value of DApp Staking. In theory, each account should try to keep a certain percentage higher than this value, such as 15%. 103 | 3. When comparing the difference in the number of redeems between the Bifrost chain and the ASTR chain, the number on the ASTR side should be greater than or equal to the number on the Bifrost side 104 | 105 | ## Vtoken-Minting module 106 | 107 | The user can call the mint/redeem/rebond method of the VtokenMinting module through the front end to mint ASTR into vASTR, or exchange vASTR back to ASTR. During the period of holding vASTR, users can enjoy staking benefits, which are reflected in the exchange rate of vASTR to ASTR. If the user has new pledge amounts in the pool during the redeem period, the user will be able to experience the process of fast redemption, and the new pledge amount will be returned to the users in front of the redeem queue first. 108 | 109 | ### Data Structure 110 | 111 | ```rust 112 | #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] 113 | pub struct SubstrateLedger { 114 | /// The delegator account Id 115 | pub account: MultiLocation, 116 | /// The total amount of the delegator's balance that we are currently accounting for. 117 | /// It's just `active` plus all the `unlocking` balances. 118 | #[codec(compact)] 119 | pub total: Balance, 120 | /// The total amount of the delegator's balance that will be at stake in any forthcoming 121 | /// rounds. 122 | #[codec(compact)] 123 | pub active: Balance, 124 | /// Any balance that is becoming free, which may eventually be transferred out 125 | /// of the delegator (assuming it doesn't get slashed first). 126 | pub unlocking: Vec>, 127 | } 128 | 129 | /// A type for substrate ledger updating entries 130 | #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] 131 | pub struct SubstrateLedgerUpdateEntry { 132 | /// The currency id of the delegator that needs to be update 133 | pub currency_id: CurrencyId, 134 | /// The delegator id that needs to be update 135 | pub delegator_id: MultiLocation, 136 | /// Update operation type 137 | pub update_operation: SubstrateLedgerUpdateOperation, 138 | /// The unlocking/bonding amount. 139 | #[codec(compact)] 140 | pub amount: Balance, 141 | /// If this entry is an unlocking entry, it should have unlock_time value. If it is a bonding 142 | /// entry, this field should be None. If it is a liquidize entry, this filed is the ongoing 143 | /// timeunit when the xcm message is sent. 144 | pub unlock_time: Option, 145 | } 146 | ``` 147 | 148 | ### Storages 149 | 150 | * Delegator index ⇒ delegator multilocaition 151 | 152 | ```rust 153 | pub type DelegatorsIndex2Multilocation = StorageDoubleMap 154 | ``` 155 | 156 | * Delegator multilocaition ⇒ delegator index 157 | 158 | ```rust 159 | pub type DelegatorsMultilocation2Index = StorageDoubleMap 160 | ``` 161 | 162 | * The next delegator index of current CurrencyId 163 | 164 | ```rust 165 | pub type DelegatorNextIndex = StorageMap 166 | ``` 167 | 168 | * The detailed leager informaiton of each vASTR parachain sub-accont. 169 | 170 | ```rust 171 | pub type DelegatorLedgers = StorageDoubleMap, MultiLocation>> 172 | ``` 173 | 174 | * After waiting for the cross-chain message receipt to be obtained,the message queue to the Delegator ledger needs to be updated. 175 | 176 | ```rust 177 | pub type DelegatorLedgerXcmUpdateQueue = StorageMap, MultiLocation, MultiLocation>, BlockNumberFor)> 178 | ``` 179 | 180 | ### Functions 181 | 182 | * Initialize the Delegator sub-account 183 | 184 | ```rust 185 | fn initialize_delegator(origin: OriginFor,currency_id: CurrencyId) 186 | ``` 187 | 188 | * Add one delegator 189 | 190 | ```rust 191 | fn add_delegator( origin: OriginFor, currency_id: CurrencyId, index: u16, who: MultiLocation ) 192 | ``` 193 | 194 | * Reduce one delegator 195 | 196 | ```rust 197 | fn remove_delegator( origin: OriginFor, currency_id: CurrencyId, who: MultiLocation ) 198 | ``` 199 | 200 | * Turn ASTR from the ASTR chain and call the pallet-xcm module on ASTR across the chain. 201 | 202 | ```rust 203 | fn transfer_back( origin: OriginFor, currency_id: CurrencyId, from: Box, to: Box,  amount: BalanceOf ) 204 | ``` 205 | 206 | * Transfer the ASTR from the designated account in Bifrost to the delegator on the ASTR chain, and call the xToken module on the Bifrost chain 207 | 208 | ```rust 209 | fn transfer_to( origin: OriginFor, currency_id: CurrencyId, from: Box, to: Box, amount: BalanceOf ) 210 | ``` 211 | 212 | * Synchronize the era information on the ASTR chain 213 | 214 | ```rust 215 | fn update_ongoing_time_unit( origin: OriginFor, currency_id: CurrencyId, time_unit: TimeUnit) 216 | ``` 217 | 218 | * Redeem users who repay the current ERA expiration 219 | 220 | ```rust 221 | fn refund_currency_due_unbond( origin: OriginFor, currency_id: CurrencyId ) 222 | ``` 223 | 224 | * Replenish the fee reserve of the operating account 225 | 226 | ```rust 227 | fn supplement_fee_reserve( origin: OriginFor, currency_id: CurrencyId, dest: MultiLocation ) 228 | ``` 229 | 230 | * Staking custody fees are collected from the interest, as well as adjusting the exchange rate of vASTR to ASTR 231 | 232 | ```rust 233 | fn charge_host_fee_and_tune_vtoken_exchange_rate( origin: OriginFor, currency_id: CurrencyId, value: BalanceOf, who: MultiLocation ) 234 | ``` 235 | 236 | * Upon receipt of an acknowledgement that the cross-chain message was executed successfully, this function is called to change the ledger of the corresponding delegator and delete the changed information in the staging queue. 237 | 238 | ```rust 239 | pub fn confirm_delegator_ledger( 240 | origin: OriginFor, 241 | query_id: QueryId, 242 | response: Response, 243 | ) 244 | ``` 245 | 246 | * Calling bond\_and\_stake on an ASTR chain using delegator 247 | 248 | ```rust 249 | pub fn bond_and_stake( 250 | origin: OriginFor, 251 | who: MultiLocation, 252 | contract_id: T::SmartContract, 253 | #[pallet::compact] value: BalanceOf, 254 | ) 255 | ``` 256 | 257 | * Calling unbond\_and\_unstake on an ASTR chain using delegator 258 | 259 | ```rust 260 | pub fn unbond_and_unstake( 261 |  origin: OriginFor, 262 |  who: MultiLocation, 263 |  contract_id: T::SmartContract, 264 |  #[pallet::compact] value: BalanceOf, 265 | ) 266 | ``` 267 | 268 | * Calling unbond\_and\_unstake on an ASTR chain using delegator 269 | 270 | ```rust 271 | pub fn withdraw_unbonded(origin: OriginFor,who: MultiLocation,) 272 | ``` 273 | 274 | * Calling nomination\_transfer on an ASTR chain using delegator 275 | 276 | ```rust 277 | pub fn nomination_transfer( 278 |  origin: OriginFor, 279 |  who: MultiLocation, 280 |  origin_contract_id: T::SmartContract, 281 |  #[pallet::compact] value: BalanceOf, 282 |  target_contract_id: T::SmartContract, 283 | ) 284 | ``` 285 | 286 | * Calling claim\_staker on an ASTR chain using delegator 287 | 288 | ```rust 289 | pub fn claim_staker( 290 |  origin: OriginFor, 291 |  who: MultiLocation, 292 |  contract_id: T::SmartContract, 293 | ) 294 | ``` 295 | -------------------------------------------------------------------------------- /app/icon.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------