Skip to content

Commit

Permalink
Merge pull request #13704 from Shiva-Sai-ssb/fix-13649
Browse files Browse the repository at this point in the history
add stablecoins quiz [Fixes #13649]
wackerow authored Oct 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 27d9269 + a66c73d commit ee1eafc
Showing 6 changed files with 195 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/Quiz/stories/QuizzesStats.stories.tsx
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ const meta = {
wallets: [false, 0],
web3: [false, 0],
daos: [false, 0],
stablecoins: [false, 0],
},
totalCorrectAnswers: 0,
},
9 changes: 9 additions & 0 deletions src/data/quizzes/index.ts
Original file line number Diff line number Diff line change
@@ -50,6 +50,10 @@ const quizzes = {
title: "run-a-node",
questions: ["l001", "l002", "l003", "l004", "l005", "l006"],
},
stablecoins: {
title: "stablecoins",
questions: ["m001", "m002", "m003", "m004", "m005"],
},
} satisfies RawQuizzes

export const ethereumBasicsQuizzes: QuizzesSection[] = [
@@ -83,6 +87,11 @@ export const usingEthereumQuizzes: QuizzesSection[] = [
{
id: "nfts",
level: "beginner",
next: "stablecoins",
},
{
id: "stablecoins",
level: "beginner",
next: "layer-2",
},
{
131 changes: 131 additions & 0 deletions src/data/quizzes/questionBank.ts
Original file line number Diff line number Diff line change
@@ -1479,6 +1479,137 @@ const questionBank = {
],
correctAnswerId: "l006-b",
},
// Stablecoins
m001: {
prompt: "m001-prompt",
answers: [
{
id: "m001-a",
label: "m001-a-label",
explanation: "m001-a-explanation",
},
{
id: "m001-b",
label: "m001-b-label",
explanation: "m001-b-explanation",
},
{
id: "m001-c",
label: "m001-c-label",
explanation: "m001-c-explanation",
},
{
id: "m001-d",
label: "m001-d-label",
explanation: "m001-d-explanation",
},
],
correctAnswerId: "m001-a",
},
m002: {
prompt: "m002-prompt",
answers: [
{
id: "m002-a",
label: "m002-a-label",
explanation: "m002-a-explanation",
},
{
id: "m002-b",
label: "m002-b-label",
explanation: "m002-b-explanation",
},
{
id: "m002-c",
label: "m002-c-label",
explanation: "m002-c-explanation",
},
{
id: "m002-d",
label: "m002-d-label",
explanation: "m002-d-explanation",
},
],
correctAnswerId: "m002-c",
},
m003: {
prompt: "m003-prompt",
answers: [
{
id: "m003-a",
label: "m003-a-label",
explanation: "m003-a-explanation",
},
{
id: "m003-b",
label: "m003-b-label",
explanation: "m003-b-explanation",
},
{
id: "m003-c",
label: "m003-c-label",
explanation: "m003-c-explanation",
},
{
id: "m003-d",
label: "m003-d-label",
explanation: "m003-d-explanation",
},
],
correctAnswerId: "m003-d",
},
m004: {
prompt: "m004-prompt",
answers: [
{
id: "m004-a",
label: "m004-a-label",
explanation: "m004-a-explanation",
},
{
id: "m004-b",
label: "m004-b-label",
explanation: "m004-b-explanation",
},
{
id: "m004-c",
label: "m004-c-label",
explanation: "m004-c-explanation",
},
{
id: "m004-d",
label: "m004-d-label",
explanation: "m004-d-explanation",
},
],
correctAnswerId: "m004-b",
},
m005: {
prompt: "m005-prompt",
answers: [
{
id: "m005-a",
label: "m005-a-label",
explanation: "m005-a-explanation",
},
{
id: "m005-b",
label: "m005-b-label",
explanation: "m005-b-explanation",
},
{
id: "m005-c",
label: "m005-c-label",
explanation: "m005-c-explanation",
},
{
id: "m005-d",
label: "m005-d-label",
explanation: "m005-d-explanation",
},
],
correctAnswerId: "m005-d",
},
} as const satisfies QuestionBank

export default questionBank
47 changes: 46 additions & 1 deletion src/intl/en/learn-quizzes.json
Original file line number Diff line number Diff line change
@@ -523,5 +523,50 @@
"l006-prompt": "Running a node earns network rewards",
"l006-a-label": "True",
"l006-a-explanation": "Simply running client software does not earn you rewards. To earn rewards, you must also be staking.",
"l006-b-label": "False"
"l006-b-label": "False",
"m001-prompt": "What are stablecoins?",
"m001-a-label": "Cryptocurrencies with low price volatility, their value is steady and similar to traditional currencies",
"m001-a-explanation": "Correct! Stablecoins are designed to address the volatility issue common in many cryptocurrencies.",
"m001-b-label": "Digital representations of gold",
"m001-b-explanation": "This is incorrect. While some stablecoins might be backed by precious metals, they can also be backed by fiat currency or other cryptocurrencies.",
"m001-c-label": "A new type of credit card",
"m001-c-explanation": "This is incorrect. Stablecoins are a type of cryptocurrency, not a credit card.",
"m001-d-label": "A replacement for ether",
"m001-d-explanation": "This is incorrect. Stablecoins are not designed to replace ether (ETH). They are another token on the Ethereum network designed to maintain steady value over time.",
"m002-prompt": "Which of the following is a stablecoin?",
"m002-a-label": "US Dollar",
"m002-a-explanation": "This is incorrect. While stablecoins can represent the US dollar, a US dollar is not a cryptocurrency.",
"m002-b-label": "AAVE token",
"m002-b-explanation": "This is incorrect. AAVE is a governance token for the Aave protocol, which provides marketplaces for stablecoins, but AAVE itself is not a stablecoin.",
"m002-c-label": "Dai",
"m002-c-explanation": "Correct! Dai is probably the most famous decentralized stablecoin, and its value is roughly 1 US Dollar.",
"m002-d-label": "Ether",
"m002-d-explanation": "This is incorrect. Ether is the native currency of the Ethereum network, but it is not intended to be stable.",
"m003-prompt": "What can stablecoins be used for?",
"m003-a-label": "To protect its users from volatile changes in price",
"m003-a-explanation": "Not quite. This answer is partially correct, but it's only one of the many things stablecoins can be used for.",
"m003-b-label": "To buy things on the internet anywhere in the world",
"m003-b-explanation": "Not quite. This answer is partially correct, but it's only one of the many things stablecoins can be used for.",
"m003-c-label": "To earn money by lending to others",
"m003-c-explanation": "Not quite. This answer is partially correct, but it's only one of the many things stablecoins can be used for.",
"m003-d-label": "All of the above",
"m003-d-explanation": "Correct! Stablecoins can be used to hold cryptocurrency with less volatility, transact globally on the internet, and earn interest when you lend them out.",
"m004-prompt": "What makes stablecoins unique?",
"m004-a-label": "It is a token that is tied to an asset in the real world",
"m004-a-explanation": "This is incorrect. While many stablecoins are pegged to real-world assets, this characteristic is not exclusive to stablecoins (e.g., ETH-collateralized tokens).",
"m004-b-label": "It is a cryptocurrency token specifically designed to keep its value steady",
"m004-b-explanation": "Correct! Stablecoins are designed to keep their value relatively stable, typically pegged to assets like currencies (e.g., 1 USDC = 1 US dollar), but not all stablecoins follow this model (e.g., RAI).",
"m004-c-label": "It is capable of being sent over the internet",
"m004-c-explanation": "This is incorrect. While this is a capability, it is not unique to stablecoins.",
"m004-d-label": "It can be used on the Ethereum network.",
"m004-d-explanation": "This is incorrect. Many other cryptocurrency tokens can be used on the Ethereum network.",
"m005-prompt": "What is NOT a way to get stablecoins?",
"m005-a-label": "Swap them with other tokens",
"m005-a-explanation": "Incorrect, this is a way to get stablecoins. One of the most common ways people acquire stablecoins is by swapping their existing cryptocurrencies for stablecoins.",
"m005-b-label": "Borrow them",
"m005-b-explanation": "Incorrect, this is a way to get stablecoins. You can borrow some stablecoins by using your existing cryptocurrencies, such as ether, as collateral. You will need to pay the borrowed stablecoins back to reclaim your locked collateral.",
"m005-c-label": "Buy them from an exchange",
"m005-c-explanation": "Incorrect, this is a way to get stablecoins. Many exchanges and wallets let you buy stablecoins directly. Geographical restrictions may apply for centralized exchanges.",
"m005-d-label": "Mine them",
"m005-d-explanation": "Correct! Unlike bitcoin, you are unable to mine stablecoins."
}
3 changes: 2 additions & 1 deletion src/lib/utils/translations.ts
Original file line number Diff line number Diff line change
@@ -206,7 +206,8 @@ const getRequiredNamespacesForPath = (relativePath: string) => {
path.startsWith("/wallets/") ||
path.startsWith("/web3/") ||
path.startsWith("/what-is-ethereum/") ||
path.startsWith("/quizzes/")
path.startsWith("/quizzes/") ||
path.startsWith("/stablecoins/")
) {
requiredNamespaces = [...requiredNamespaces, "learn-quizzes"]
}
7 changes: 6 additions & 1 deletion src/pages/stablecoins.tsx
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ import Text from "@/components/OldText"
import PageHero from "@/components/PageHero"
import PageMetadata from "@/components/PageMetadata"
import ProductList from "@/components/ProductList"
import { StandaloneQuizWidget } from "@/components/Quiz/QuizWidget"
import StablecoinAccordion from "@/components/StablecoinAccordion"
import StablecoinBoxGrid from "@/components/StablecoinBoxGrid"
import StablecoinsTable from "@/components/StablecoinsTable"
@@ -282,7 +283,10 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
t("page-stablecoins-crypto-backed-con-1"),
t("page-stablecoins-crypto-backed-con-2"),
],
links: [{ text: "Dai", url: "https://makerdao.com/en/" }],
links: [
{ text: "DAI", url: "https://makerdao.com/en/" },
{ text: "RAI", url: "https://reflexer.finance/" },
],
},
{
title: t("page-stablecoins-precious-metals"),
@@ -773,6 +777,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
</Flex>
</Box>
<Content>
<StandaloneQuizWidget quizKey="stablecoins" />
<FeedbackCard />
</Content>
</Page>

0 comments on commit ee1eafc

Please sign in to comment.