Skip to content

Commit

Permalink
support latex and explain how gdt works
Browse files Browse the repository at this point in the history
  • Loading branch information
wfnuser committed Jun 26, 2024
1 parent 3ec8ec7 commit 68c5135
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 10 deletions.
13 changes: 10 additions & 3 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import mathjax3 from "markdown-it-mathjax3";

module.exports = {
title: "YouBet-DAO",
markdown: {
config: (md) => {
md.use(mathjax3);
},
},
themeConfig: {
sidebar: {
"/": [
Expand Down Expand Up @@ -28,11 +35,11 @@ module.exports = {
text: "Contract",
items: [
{
text: "How GDT works?",
link: "/contract/how-gdt-works",
text: "How GDS works?",
link: "/contract/how-gds-works",
},
{
text: "GST Contract ABI",
text: "GDS Contract ABI",
link: "/contract/abi",
},
],
Expand Down
2 changes: 1 addition & 1 deletion docs/contract/abi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# GST Contract ABI
# GDS Contract ABI

This document provides detailed information about the ABI of the Bet smart contract. The contract facilitates goal-driven staking, offering two types of goals: Solo and Gambling. Users can create goals, stake tokens, confirm task completions, claim rewards, and settle goals.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ One type involves only a single participant. The purpose of staking is to ensure
The other type is more intriguing. It creates a competitive environment for the same type of goal, defining a concept of goal completion. This allows participants who come closer to achieving their goals to receive rewards. This type of staking meets a broad range of needs.

- **Solo Staking**
- $$reward = staking - fee$$
$$reward = staking - fee$$
- **Gambling Staking**
- $$sum\_staking = \sum_{i=1}^n staking_i$$
- $$reward_i = sum\_staking\ * \ (staking_i * finished_i \ / \ \sum_{i=1}^n (staking_i \ * \ finished_i)) - fee$$
$$sum\_staking = \sum_{i=1}^n staking_i$$
$$reward_i = sum\_staking\ * \ (staking_i * finished_i \ / \ \sum_{i=1}^n (staking_i \ * \ finished_i)) - fee$$

## Goal Types

Expand All @@ -28,7 +28,7 @@ The other type is more intriguing. It creates a competitive environment for the
- Such as completing a goal of reducing body fat to 15%
- **Multiple Task Completion within a Specified Time**
- Such as completing a course that includes several independent chapters, calculating goal completion based on chapter completion
- **No Time Limit**
- **Single Task with No Time Limit**

## Settlement Trigger

Expand All @@ -39,4 +39,5 @@ The other type is more intriguing. It creates a competitive environment for the

Any time within the claim period, a claim system fee will be deducted from the rewards.

# Learn more
You can learn more about the specific invocation methods through the [ABI documentation](abi).
6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ A groundbreaking programmable staking framework ensuring every effort is rewarde

- [You Bet: Goal-Driven Staking Is All You Need](./introduction/introduction)
- [Use Cases](./introduction/use-cases)
- [Vision](./introduction/vision)

## Contract
- [How GDS works](./contract/how-gds-works)
- [ABI](./contract/abi)


## Quick Start

Expand Down
2 changes: 2 additions & 0 deletions docs/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Users commit to achieving a goal by staking a certain amount of funds. They are
This form is widely prevalent in the web2 world. For examples, see [use cases](use-cases).

However, it is in the web3 world where this form truly belongs. And **You-Bet** makes it easy for anyone to build such systems, ensuring every effort is rewarded fairly.

Learn [How GDS works?](../contract/how-gds-works.md) to see our current progress.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"license": "ISC",
"devDependencies": {
"vitepress": "1.0.0-rc.31"
},
"dependencies": {
"markdown-it-mathjax3": "^4.3.2"
}
}
Loading

0 comments on commit 68c5135

Please sign in to comment.