Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add stablecoins quiz [Fixes #13649] #13704

Merged
merged 11 commits into from
Oct 9, 2024
1 change: 1 addition & 0 deletions src/components/Quiz/stories/QuizzesStats.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const meta = {
wallets: [false, 0],
web3: [false, 0],
daos: [false, 0],
stablecoins: [false, 0],
},
totalCorrectAnswers: 0,
},
Expand Down
9 changes: 9 additions & 0 deletions src/data/quizzes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down Expand Up @@ -88,6 +92,11 @@ export const usingEthereumQuizzes: QuizzesSection[] = [
{
id: "nfts",
level: "beginner",
next: "stablecoins",
},
{
id: "stablecoins",
level: "beginner",
next: "layer-2",
},
{
Expand Down
131 changes: 131 additions & 0 deletions src/data/quizzes/questionBank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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?",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"m001-d-explanation": "This is incorrect. Stablecoins are not designed to replace Ether. They are another token on the Ethereum network and are designed to have the opposite characteristic of Ether, notably its volatility.",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"m002-b-explanation": "This is incorrect. Aave token is a cryptocurrency, but its price is not intended to be stable.",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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 shield its users from volatile changes in price",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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 this is often the case, it is not unique to stablecoins.",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"m004-b-label": "It is a cryptocurrency token specifically designed to keep its value steady",
"m004-b-explanation": "Correct! Stablecoins are unique in that they are tokens designed to keep their value equal to the asset they are pegged to (most commonly traditional currencies, e.g., 1 USDC = 1 US dollar).",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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 at some point.",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"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, though geographical restrictions may apply.",
wackerow marked this conversation as resolved.
Show resolved Hide resolved
"m005-d-label": "Mine them",
"m005-d-explanation": "Correct! Unlike Bitcoin, you are unable to mine stablecoins."
wackerow marked this conversation as resolved.
Show resolved Hide resolved
}
3 changes: 2 additions & 1 deletion src/lib/utils/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/stablecoins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -776,6 +777,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
</Flex>
</Box>
<Content>
<StandaloneQuizWidget quizKey="stablecoins" />
<FeedbackCard />
</Content>
</Page>
Expand Down
Loading