diff --git a/components/quizzes/quizData.json b/components/quizzes/quizData.json index 428bad45..35793a51 100644 --- a/components/quizzes/quizData.json +++ b/components/quizzes/quizData.json @@ -7,6 +7,10 @@ "l1-tokenomics": { "title": "L1 Tokenomics", "quizzes": ["201", "202", "203", "204", "205", "206", "207", "208", "209"] + }, + "interchain-token-transfer": { + "title": "Interchain Token Transfer", + "quizzes": ["118", "119", "120", "121", "122", "123", "124", "125", "126", "127"] } }, "quizzes": { @@ -221,6 +225,134 @@ "hint": "Think about how Avalanche allows developers to modify Virtual Machines.", "explanation": "Unlike one-chain-fits all systems, which requires a wide consensus to make changes, Avalanche allows for straightforward customization of Virtual Machines, making it more adaptable to unique use cases.", "chapter": "Virtual Machine Customization" + }, + "118": { + "question": "Which of the following best describes the role of a native token in an EVM-based blockchain?", + "options": [ + "It is used only for staking and governance within the blockchain.", + "It serves as both a means of value transfer and as the gas token for executing transactions and smart contracts.", + "It is used exclusively for purchasing NFTs on the blockchain.", + "It has no functional role other than being a store of value." + ], + "correctAnswers": [1], + "hint": "Consider both value transfer and execution costs in the network.", + "explanation": "In an EVM-based blockchain, the native token serves as both a means of value transfer within the network and as the gas token for executing transfers or smart contracts. Some blockchains optionally choose to also use the native token as their staking and governance token.", + "chapter": "Interchain Token Transfer" + }, + "119": { + "question": "What is the purpose of marking a function as 'payable' in Solidity?", + "options": [ + "It allows the function to receive ERC-20 tokens.", + "It enables the function to execute without gas fees.", + "It allows the function to receive native blockchain tokens.", + "It prevents the function from modifying state variables." + ], + "correctAnswers": [2], + "hint": "Think about how functions handle incoming funds.", + "explanation": "In Solidity, marking a function as 'payable' allows it to accept native blockchain tokens like ETH or AVAX. Without 'payable', the function cannot receive native tokens.", + "chapter": "Interchain Token Transfer" + }, + "120": { + "question": "What is the purpose of the `approve()` function in the ERC-20 token standard?", + "options": [ + "It allows an address to transfer tokens to another address directly.", + "It grants an allowance for another account to spend the balance of an account.", + "It returns the total supply of the token.", + "It checks the balance of a specific address." + ], + "correctAnswers": [1], + "hint": "Consider how a spender gets permission to spend tokens from an owner's account.", + "explanation": "The `approve()` function allows an owner to authorize a spender to withdraw tokens from the owner's account, up to a specified limit, enabling the spender to use `transferFrom()` to transfer tokens.", + "chapter": "Interchain Token Transfer" + }, + "121": { + "question": "Why is it necessary to call the `approve()` function before transferring ERC-20 tokens to a smart contract?", + "options": [ + "Because it sets the gas fee for the transaction.", + "It is not necessary; tokens can be transferred without approval.", + "To check the balance of the smart contract.", + "To authorize the smart contract to transfer tokens from your account." + ], + "correctAnswers": [3], + "hint": "Consider how a smart contract gets permission to spend tokens from your account.", + "explanation": "The `approve()` function allows a user to authorize a smart contract to withdraw tokens from their account up to a specified limit. This enables the smart contract to use `transferFrom()` to transfer tokens on behalf of the user.", + "chapter": "Interchain Token Transfer" + }, + "122": { + "question": "Why are native tokens wrapped into ERC-20 tokens like wAVAX or wETH?", + "options": [ + "To increase their transaction speed on the blockchain.", + "To reduce the supply of the native token.", + "To represent native assets as ERC-20 tokens for compatibility with DeFi applications.", + "To convert them into stablecoins pegged to fiat currencies." + ], + "correctAnswers": [2], + "hint": "Consider how wrapping affects interoperability within the EVM ecosystem.", + "explanation": "Wrapping native tokens into ERC-20 tokens allows them to conform to the ERC-20 standard, making them compatible with decentralized applications, exchanges, and smart contracts that require ERC-20 tokens. This enhances interoperability and usability within the blockchain ecosystem.", + "chapter": "Interchain Token Transfer" + }, + "123": { + "question": "Which of the following best describes the 'Lock & Mint' mechanism in asset bridging?", + "options": [ + "Locking assets on the source blockchain and minting equivalent tokens on the target blockchain.", + "Burning assets on both the source and target blockchains simultaneously.", + "Using custodians to manage and transfer assets between blockchains.", + "Releasing assets without the need for smart contracts or locking mechanisms." + ], + "correctAnswers": [0], + "hint": "Consider how assets are secured on one chain and represented on another.", + "explanation": "In the 'Lock & Mint' mechanism, assets are locked in a smart contract on the source blockchain, and an equivalent amount of wrapped tokens are minted on the target blockchain. This allows the asset's value to be transferred and used on a different blockchain.", + "chapter": "Interchain Token Transfer" + }, + "124": { + "question": "Which type of smart contract exploit allows attackers to repeatedly withdraw funds before the contract's state is updated?", + "options": [ + "Reentrancy Attacks", + "Arithmetic Errors", + "Logic Flaws", + "Phishing Attacks" + ], + "correctAnswers": [0], + "hint": "Consider exploits involving recursive calls to a contract.", + "explanation": "Reentrancy attacks exploit a contract's ability to call itself before the initial function call is completed, allowing attackers to repeatedly withdraw funds before the contract's state is updated.", + "chapter": "Interchain Token Transfer" + }, + "125": { + "question": "Which statement is true about token transfers in the Avalanche Interchain Token Transfer Design?", + "options": [ + "Only ERC20 tokens can be transferred; native tokens are not supported.", + "Transfers must involve the same token type on both home and remote chains.", + "Any combination of ERC20 and native tokens can be transferred between home and remote chains.", + "Token transfers require approval from network administrators." + ], + "correctAnswers": [2], + "hint": "Consider the flexibility of token types allowed in transfers.", + "explanation": "The Avalanche Interchain Token Transfer Design supports transferring tokens with any combination of ERC20 and native tokens between home and remote chains, including ERC20 to ERC20, ERC20 to Native, Native to ERC20, and Native to Native.", + "chapter": "Interchain Token Transfer" + }, + "126": { + "question": "What is the purpose of the `_tokenMultiplier` in the `TokenRemote` contract when bridging assets between chains with different decimal systems?", + "options": [ + "It adjusts the token amount to match the decimal system of the target chain by multiplying or dividing as necessary.", + "It locks the tokens on the source chain before transfer.", + "It handles the minting of new tokens on the target chain.", + "It calculates the transaction fees for cross-chain transfers." + ], + "correctAnswers": [0], + "hint": "Consider how token amounts are scaled between chains with different decimal places.", + "explanation": "The `_tokenMultiplier` is used to scale the token amounts when transferring between chains with different decimal systems. It is calculated based on the difference in decimals between the home and remote tokens and ensures that the token value remains consistent across chains.", + "chapter": "Interchain Token Transfer" + }, + "127": { + "question": "Can there be multiple TokenRemotes for a single TokenHome?", + "hint": "Think about how tokens are transferred between chains and where they originate from.", + "options": [ + "Yes", + "No" + ], + "correctAnswers": [0], + "explanation": "Yes, there can be multiple TokenRemotes for a single TokenHome. This allows the same token to be bridged to multiple chains, enabling cross-chain interoperability and use cases across different blockchain networks.", + "chapter": "Interchain Token Transfer" } } } \ No newline at end of file diff --git a/content/course/interchain-token-transfer/03-tokens/02-native-tokens.mdx b/content/course/interchain-token-transfer/03-tokens/02-native-tokens.mdx index 40c14ec9..474e4e9c 100644 --- a/content/course/interchain-token-transfer/03-tokens/02-native-tokens.mdx +++ b/content/course/interchain-token-transfer/03-tokens/02-native-tokens.mdx @@ -13,4 +13,5 @@ A native token in a blockchain running the Ethereum Virtual Machine (EVM) refers - Dexalot: ALOT - many more... -The native token serves as both a means of value transfer within the EVM network and as the gas token for executing transfers or smart contracts. Therefore, native tokens play a crucial role in the EVM chain by enabling participants to interact with and utilize the platform's decentralized features, serving as the foundational unit of value. \ No newline at end of file +The native token serves as both a means of value transfer within the EVM network and as the gas token for executing transfers or smart contracts. Therefore, native tokens play a crucial role in the EVM chain by enabling participants to interact with and utilize the platform's decentralized features, serving as the foundational unit of value. + \ No newline at end of file diff --git a/content/course/interchain-token-transfer/03-tokens/05-transfers-in-smart-contracts.mdx b/content/course/interchain-token-transfer/03-tokens/05-transfers-in-smart-contracts.mdx index 4d2a3b11..3350419a 100644 --- a/content/course/interchain-token-transfer/03-tokens/05-transfers-in-smart-contracts.mdx +++ b/content/course/interchain-token-transfer/03-tokens/05-transfers-in-smart-contracts.mdx @@ -99,3 +99,5 @@ Well done! You transferred native tokens to a Smart Contract. It's important to understand the distinction between Native Tokens and ERC-20 tokens. Native tokens, such as `AVAX` or `ETH`, are transferred directly to payable functions within the smart contract. This process is straightforward and involves sending the tokens to the contract's address, invoking the payable function. On the other hand, ERC-20 tokens require a different approach due to their standardized interface. We will cover that in the following sections. + + diff --git a/content/course/interchain-token-transfer/03-tokens/07-erc-20-tokens.mdx b/content/course/interchain-token-transfer/03-tokens/07-erc-20-tokens.mdx index 4211044e..5c8d9fa4 100644 --- a/content/course/interchain-token-transfer/03-tokens/07-erc-20-tokens.mdx +++ b/content/course/interchain-token-transfer/03-tokens/07-erc-20-tokens.mdx @@ -71,3 +71,4 @@ Returns the amount which _spender is still allowed to withdraw from _owner. Transfers _value amount of tokens from address _from to address _to + diff --git a/content/course/interchain-token-transfer/03-tokens/09-transfer-erc20-to-sc.mdx b/content/course/interchain-token-transfer/03-tokens/09-transfer-erc20-to-sc.mdx index 3e8cbec1..d6b87b72 100644 --- a/content/course/interchain-token-transfer/03-tokens/09-transfer-erc20-to-sc.mdx +++ b/content/course/interchain-token-transfer/03-tokens/09-transfer-erc20-to-sc.mdx @@ -92,4 +92,6 @@ cast call $ERC20_CONTRACT_L1 "balanceOf(address)(uint256)" $ERC20_RECEIVER_L1 -- ``` - \ No newline at end of file + + + diff --git a/content/course/interchain-token-transfer/03-tokens/10-wrapped-native-tokens.mdx b/content/course/interchain-token-transfer/03-tokens/10-wrapped-native-tokens.mdx index 6fb8aeda..25d687d3 100644 --- a/content/course/interchain-token-transfer/03-tokens/10-wrapped-native-tokens.mdx +++ b/content/course/interchain-token-transfer/03-tokens/10-wrapped-native-tokens.mdx @@ -18,7 +18,4 @@ Examples of Wrapped Tokens: - wETH - BTC.b (this is not only wrapped, but also bridged to the Avalanche Ecosystem but represented as ERC20 to gain compatibility with the Avalanche C-chain ecosystem.) - - - - + diff --git a/content/course/interchain-token-transfer/04-token-bridging/02-bridge-architecture.mdx b/content/course/interchain-token-transfer/04-token-bridging/02-bridge-architecture.mdx index 284a8093..1d4fa416 100644 --- a/content/course/interchain-token-transfer/04-token-bridging/02-bridge-architecture.mdx +++ b/content/course/interchain-token-transfer/04-token-bridging/02-bridge-architecture.mdx @@ -33,3 +33,5 @@ Advanced bridges such as Avalanche Interchain Token Transfer utilize native cros - Enhanced Liquidity: Bridging increases the liquidity of assets by allowing them to be used across different DeFi platforms and blockchain networks. This enhances trading opportunities and financial activities. - Interoperability: It fosters interoperability between different blockchains, enabling users to access a broader range of services and applications. - Flexibility: Users can move assets to chains with lower fees, faster transaction times, or better functionalities, optimizing their experience and strategies. + + diff --git a/content/course/interchain-token-transfer/04-token-bridging/04-bridge-hacks.mdx b/content/course/interchain-token-transfer/04-token-bridging/04-bridge-hacks.mdx index 9eebbd7d..3c2e58e0 100644 --- a/content/course/interchain-token-transfer/04-token-bridging/04-bridge-hacks.mdx +++ b/content/course/interchain-token-transfer/04-token-bridging/04-bridge-hacks.mdx @@ -67,3 +67,5 @@ Phishing and social engineering attacks target users or administrators rather th 6. **Insurance and Compensation**: Use insurance mechanisms or compensation funds to mitigate the impact of potential losses from breaches. By understanding and addressing these common bridge hacks, developers and users can better protect their assets and improve the overall security of cross-chain bridging solutions. + + diff --git a/content/course/interchain-token-transfer/05-avalanche-interchain-token-transfer/02-bridge-design.mdx b/content/course/interchain-token-transfer/05-avalanche-interchain-token-transfer/02-bridge-design.mdx index 749851d3..bf280d0d 100644 --- a/content/course/interchain-token-transfer/05-avalanche-interchain-token-transfer/02-bridge-design.mdx +++ b/content/course/interchain-token-transfer/05-avalanche-interchain-token-transfer/02-bridge-design.mdx @@ -23,4 +23,6 @@ Home contract instances specify the asset to be transferred as either an ERC20 t - `Native` -> `ERC20` - `Native` -> `Native` -The remote tokens are designed to have compatibility with the token transferrer on the home chain by default, and they allow custom logic to be implemented in addition. For example, developers can inherit and extend the `ERC20TokenRemote` contract to add additional functionality, such as a custom minting, burning, or transfer logic. \ No newline at end of file +The remote tokens are designed to have compatibility with the token transferrer on the home chain by default, and they allow custom logic to be implemented in addition. For example, developers can inherit and extend the `ERC20TokenRemote` contract to add additional functionality, such as a custom minting, burning, or transfer logic. + + diff --git a/content/course/interchain-token-transfer/07-tokens-on-multiple-chains/01-tokens-on-multiple-chain.mdx b/content/course/interchain-token-transfer/07-tokens-on-multiple-chains/01-tokens-on-multiple-chain.mdx index c0a6b5c2..952440a6 100644 --- a/content/course/interchain-token-transfer/07-tokens-on-multiple-chains/01-tokens-on-multiple-chain.mdx +++ b/content/course/interchain-token-transfer/07-tokens-on-multiple-chains/01-tokens-on-multiple-chain.mdx @@ -18,3 +18,4 @@ In this example, our _Ra_ chain is `myblockchain`, our _Rb 3. Perform a multi-hop transfer of `TOK` from `myblockchain` to `myblockchain2`, with a 'hop' through the Avalanche C-Chain + \ No newline at end of file diff --git a/content/course/interchain-token-transfer/14-scaling-decimals/01-math-example.mdx b/content/course/interchain-token-transfer/14-scaling-decimals/01-math-example.mdx index 1e08cf71..00518d36 100644 --- a/content/course/interchain-token-transfer/14-scaling-decimals/01-math-example.mdx +++ b/content/course/interchain-token-transfer/14-scaling-decimals/01-math-example.mdx @@ -53,4 +53,6 @@ For example, transferring `100 × 10^{18}` (which is 100 USDC in the 18-decimal This results in 100 × 10^6 USDC, which correctly represents 100 USDC in the 6-decimal system. -By applying this multiplier, tokens retain their value across chains with different decimal systems. \ No newline at end of file +By applying this multiplier, tokens retain their value across chains with different decimal systems. + + diff --git a/content/course/interchain-token-transfer/certificate.mdx b/content/course/interchain-token-transfer/certificate.mdx new file mode 100644 index 00000000..98ce13c1 --- /dev/null +++ b/content/course/interchain-token-transfer/certificate.mdx @@ -0,0 +1,14 @@ +--- +title: Course Completion Certificate +updated: 2024-10-11 +authors: [owenwahlgren] +icon: BadgeCheck +--- + +import CertificatePage from '@/components/certificates'; + +You've made it to the end of the course. Let's check your progress and get your certificate. + + + +Thank you for participating in this course. We hope you found it informative and enjoyable! \ No newline at end of file diff --git a/content/course/interchain-token-transfer/meta.json b/content/course/interchain-token-transfer/meta.json index ed93829c..24e333bd 100644 --- a/content/course/interchain-token-transfer/meta.json +++ b/content/course/interchain-token-transfer/meta.json @@ -24,7 +24,9 @@ "---Cross-Chain Token Swaps---", "...13-cross-chain-token-swaps", "---Scaling Token Decimals---", - "...14-scaling-decimals" + "...14-scaling-decimals", + "---Conclusion---", + "certificate" ] }