From 1a8977b20e8841cecc4b645c4314605d646e4c76 Mon Sep 17 00:00:00 2001 From: chan Date: Thu, 18 Jan 2024 16:31:39 +0800 Subject: [PATCH 1/2] feat: RedStone Oracles --- docs/manta-pacific/RedStone Oracles.md | 40 ++ sidebars.js | 523 +++++++++++++------------ 2 files changed, 304 insertions(+), 259 deletions(-) create mode 100644 docs/manta-pacific/RedStone Oracles.md diff --git a/docs/manta-pacific/RedStone Oracles.md b/docs/manta-pacific/RedStone Oracles.md new file mode 100644 index 00000000..4e44b8fb --- /dev/null +++ b/docs/manta-pacific/RedStone Oracles.md @@ -0,0 +1,40 @@ +# RedStone Oracles + +RedStone delivers frequently updated, reliable, and diverse data feeds for your dApp on Manta Pacific L2. RedStone is unique in many aspects, three notable ones are: + +- The most gas-optimized oracle (make your dApp scalable) +- Unique price feeds (including LSTs, LRTs, RWAs and Manta-native assets) +- Modular Oracle Design allows for flexibility towards user needs + +RedStone operates in two models **Core (Pull)** and **Classic (Push)** both available on Manta. + +## How to integrate [RedStone Core](https://docs.redstone.finance/docs/smart-contract-devs/get-started/redstone-core)? + +Check out RedStone [Showroom](https://showroom.redstone.finance/) to see how data delivery with transactions and fetching data from the Demo contract works on Manta. The RedStone Core model allows your dApp to utilize data feeds delivered “on-demand”, only when the data is needed. Thanks to the implementation of the EVM-connector library and extending your Ethers.js, your dApp will be able to attach signed data packages with timestamps to call data of your users’ transactions. + +In order to implement the Core model you will need to do two things: + +1. Adjust the Javascript code of your dApp to inject the additional payload with signed data feeds to call data of your users’ transactions (otherwise you will get smart contract errors). +1. Adjust your smart contracts to include the libraries responsible for data extraction from call data and signature verification. + +**Please see the specific steps and ready code samples [in the Docs](https://docs.redstone.finance/docs/smart-contract-devs/get-started/redstone-core).** + +If you need help with integration [join RedStone Discord](https://discord.com/invite/PVxBZKFr46) and ask their team for help. + +## How to integrate [RedStone Classic](https://docs.redstone.finance/docs/smart-contract-devs/get-started/redstone-classic)? + +The RedStone Classic model ensures that data is pushed into on-chain storage via a relayer. Dedicated to protocols designed for the traditional Push Oracles model, that want to have full control of the data source and update conditions (heartbeat and deviation threshold). + +The on-chain contracts in Classic enable storing prices and getting them through a familiar interface (e.g. the [Chainlink Aggregator](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.7/interfaces/AggregatorV3Interface.sol)). + +### List of available Classic feeds + +**ETH / USD** + +Update Conditions: 0.5% (Deviation Threshold) or 1 hour (Heartbeat) + +Contract Address: + +(Soon to be launched) $MANTA $wUSDM $STONE + +All available Classic feeds are available [in this Docs](https://docs.google.com/document/d/1_C-aEL9IVpot2eRzNn85rE_xl642CC02h-Go77Ob-8E/edit). diff --git a/sidebars.js b/sidebars.js index 45999dc6..71d67fb5 100644 --- a/sidebars.js +++ b/sidebars.js @@ -10,282 +10,287 @@ */ module.exports = { - docs: [ - { - type: "category", - label: "Manta Network", - collapsible: false, - items: [ + docs: [ { - type: "category", - label: "What is Manta?", - items: [ - { - type: "doc", - label: "What is Manta?", - id: "Introduction", - }, - { - type: "doc", - label: "What is Manta Pacific (Layer 2)", - id: "introduction/Manta-Pacific", - }, - { - type: "doc", - label: "What is Manta Atlantic (Layer1)", - id: "introduction/Manta-Atlantic", - }, - ], - }, - { - type: "category", - label: "Research", - items: [ - { - type: "doc", - label: "Zero-Knowledge Proofs", - id: "concepts/ZKP", - }, - { - type: "doc", - label: "Celestia", - id: "concepts/Celestia", - }, - { - type: "doc", - label: "ZKEVM", - id: "concepts/ZKEVM", - }, - { - type: "doc", - label: "Universal Circuits (Alpha): zkShuffle", - id: "zkShuffle/Overview", - }, - { - type: "doc", - label: "OP Stack", - id: "concepts/OPStack", - }, - ], - }, - ], - }, - { - type: "category", - label: "Manta Pacific Network", - collapsible: false, - items: [ - { - type: "category", - label: "Network Info", - items: [ - { - type: "doc", - label: "Quickstart", - id: "manta-pacific/Quickstart", - }, - { - type: "doc", - label: "EVM Compatibility", - id: "manta-pacific/EVM Compatible", - }, - { - type: "doc", - label: "Block Explorer", - id: "manta-pacific/Block Explorer", - }, - { - type: "doc", - label: "JSON-RPC Nodes", - id: "manta-pacific/JSON-RPC Nodes", - }, - { - type: "doc", - label: "Testnet Info", - id: "manta-pacific/Testnet Info", - }, - ], - }, - { - type: "doc", - label: "Manta Token", - id: "mantaToken/mantaToken", + type: "category", + label: "Manta Network", + collapsible: false, + items: [ + { + type: "category", + label: "What is Manta?", + items: [ + { + type: "doc", + label: "What is Manta?", + id: "Introduction", + }, + { + type: "doc", + label: "What is Manta Pacific (Layer 2)", + id: "introduction/Manta-Pacific", + }, + { + type: "doc", + label: "What is Manta Atlantic (Layer1)", + id: "introduction/Manta-Atlantic", + }, + ], + }, + { + type: "category", + label: "Research", + items: [ + { + type: "doc", + label: "Zero-Knowledge Proofs", + id: "concepts/ZKP", + }, + { + type: "doc", + label: "Celestia", + id: "concepts/Celestia", + }, + { + type: "doc", + label: "ZKEVM", + id: "concepts/ZKEVM", + }, + { + type: "doc", + label: "Universal Circuits (Alpha): zkShuffle", + id: "zkShuffle/Overview", + }, + { + type: "doc", + label: "OP Stack", + id: "concepts/OPStack", + }, + ], + }, + ], }, { - type: "category", - label: "Universal Circuits (Alpha): zkShuffle", + type: "category", + label: "Manta Pacific Network", + collapsible: false, + items: [ + { + type: "category", + label: "Network Info", + items: [ + { + type: "doc", + label: "Quickstart", + id: "manta-pacific/Quickstart", + }, + { + type: "doc", + label: "EVM Compatibility", + id: "manta-pacific/EVM Compatible", + }, + { + type: "doc", + label: "Block Explorer", + id: "manta-pacific/Block Explorer", + }, + { + type: "doc", + label: "JSON-RPC Nodes", + id: "manta-pacific/JSON-RPC Nodes", + }, + { + type: "doc", + label: "Testnet Info", + id: "manta-pacific/Testnet Info", + }, + ], + }, + { + type: "doc", + label: "Manta Token", + id: "mantaToken/mantaToken", + }, + { + type: "category", + label: "Universal Circuits (Alpha): zkShuffle", - items: [ - { - type: "doc", - label: "Overview", - id: "zkShuffle/Overview", - }, - { - type: "autogenerated", - dirName: "zkShuffle/Circuits", - }, - ], - }, - { - type: "category", - label: "NPO-zkSBT", - items: [ - { - type: "autogenerated", - dirName: "zkSBT/auto", - }, - { - type: "doc", - label: "Design", - id: "zkSBT/zkSBT Asset", - }, - ], - }, - { - type: "category", - label: "Deploy Your App", - items: [ - { - type: "autogenerated", - dirName: "zkShuffle/Deploy", - }, - ], - }, - { - type: "doc", - label: "Manta Pacific Roadmap", - id: "concepts/Roadmap", - }, - { - type: "category", - label: "Bridge to Manta Pacific ", - items: [ - { - type: "autogenerated", - dirName: "bridge-to-pacific", - }, - ], - }, - { - type: "doc", - label: "Manta Pacific Ecosystem", - id: "concepts/Manta Pacific Ecosystem", - }, - { - type: "doc", - label: "Manta Pacific Replica Node", - id: "manta-pacific/Replica Node", - }, - ], - }, - { - type: "category", - label: "Manta Atlantic Network", - collapsible: false, - items: [ - { - type: "category", - label: "Collator", - items: [ - { - type: "autogenerated", - dirName: "manta-atlantic/Collation", - }, - ], - }, - { - type: "category", - label: "Node", - items: [ - "manta-atlantic/Node/Overview", - "manta-atlantic/Node/Requirements", - { - type: "category", - label: "SetupAndRun", - items: [ - "manta-atlantic/Node/SetupAndRun/full_node", - "manta-atlantic/Node/SetupAndRun/archive_node", - ], - }, - ], - }, - ], - }, - { - type: "category", - label: "OpenZL", - collapsible: false, - items: [ - { - type: "doc", - label: "Introduction", - id: "openzl/introduction", - }, - { - type: "category", - label: "ECLAIR Basics", - items: [ - { - type: "doc", - label: "Native vs Non-Native Computation", - id: "openzl/native_nonnative", - }, - { - type: "category", - label: "ECLAIR Standard Library", - items: [ + items: [ + { + type: "doc", + label: "Overview", + id: "zkShuffle/Overview", + }, + { + type: "autogenerated", + dirName: "zkShuffle/Circuits", + }, + ], + }, + { + type: "category", + label: "NPO-zkSBT", + items: [ + { + type: "autogenerated", + dirName: "zkSBT/auto", + }, + { + type: "doc", + label: "Design", + id: "zkSBT/zkSBT Asset", + }, + ], + }, + { + type: "category", + label: "Deploy Your App", + items: [ + { + type: "autogenerated", + dirName: "zkShuffle/Deploy", + }, + ], + }, { - type: "doc", - label: "Introduction", - id: "openzl/std/eclair_std_lib", + type: "doc", + label: "Manta Pacific Roadmap", + id: "concepts/Roadmap", }, { - type: "doc", - label: "Bool", - id: "openzl/std/bool", + type: "category", + label: "Bridge to Manta Pacific ", + items: [ + { + type: "autogenerated", + dirName: "bridge-to-pacific", + }, + ], }, { - type: "doc", - label: "Cmp", - id: "openzl/std/cmp", + type: "doc", + label: "Manta Pacific Ecosystem", + id: "concepts/Manta Pacific Ecosystem", }, { - type: "doc", - label: "Num", - id: "openzl/std/num", + type: "doc", + label: "Manta Pacific Replica Node", + id: "manta-pacific/Replica Node", }, { - type: "doc", - label: "Ops", - id: "openzl/std/ops", + type: "doc", + label: "RedStone Oracles", + id: "manta-pacific/RedStone Oracles", }, - ], - }, - { - type: "doc", - label: "Allocation", - id: "openzl/alloc", - }, - ], + ], }, { - type: "doc", - label: "Tutorial: Poseidon Permutation", - id: "openzl/poseidon_permutation_tutorial", + type: "category", + label: "Manta Atlantic Network", + collapsible: false, + items: [ + { + type: "category", + label: "Collator", + items: [ + { + type: "autogenerated", + dirName: "manta-atlantic/Collation", + }, + ], + }, + { + type: "category", + label: "Node", + items: [ + "manta-atlantic/Node/Overview", + "manta-atlantic/Node/Requirements", + { + type: "category", + label: "SetupAndRun", + items: [ + "manta-atlantic/Node/SetupAndRun/full_node", + "manta-atlantic/Node/SetupAndRun/archive_node", + ], + }, + ], + }, + ], }, { - type: "category", - label: "Proof System Plugins", - items: [ - { - type: "doc", - label: "Introduction", - id: "openzl/proof_systems", - }, - ], + type: "category", + label: "OpenZL", + collapsible: false, + items: [ + { + type: "doc", + label: "Introduction", + id: "openzl/introduction", + }, + { + type: "category", + label: "ECLAIR Basics", + items: [ + { + type: "doc", + label: "Native vs Non-Native Computation", + id: "openzl/native_nonnative", + }, + { + type: "category", + label: "ECLAIR Standard Library", + items: [ + { + type: "doc", + label: "Introduction", + id: "openzl/std/eclair_std_lib", + }, + { + type: "doc", + label: "Bool", + id: "openzl/std/bool", + }, + { + type: "doc", + label: "Cmp", + id: "openzl/std/cmp", + }, + { + type: "doc", + label: "Num", + id: "openzl/std/num", + }, + { + type: "doc", + label: "Ops", + id: "openzl/std/ops", + }, + ], + }, + { + type: "doc", + label: "Allocation", + id: "openzl/alloc", + }, + ], + }, + { + type: "doc", + label: "Tutorial: Poseidon Permutation", + id: "openzl/poseidon_permutation_tutorial", + }, + { + type: "category", + label: "Proof System Plugins", + items: [ + { + type: "doc", + label: "Introduction", + id: "openzl/proof_systems", + }, + ], + }, + ], }, - ], - }, - ], + ], }; From 19e9add0c59d06a4891d8905ac850e68919b5a8f Mon Sep 17 00:00:00 2001 From: chan Date: Thu, 18 Jan 2024 17:23:43 +0800 Subject: [PATCH 2/2] feat: bridge & stake --- docs/manta-atlantic/Bridge.md | 41 +++++++++++++++++++++++++++++++++++ docs/manta-atlantic/Stake.md | 12 ++++++++++ sidebars.js | 10 +++++++++ 3 files changed, 63 insertions(+) create mode 100644 docs/manta-atlantic/Bridge.md create mode 100644 docs/manta-atlantic/Stake.md diff --git a/docs/manta-atlantic/Bridge.md b/docs/manta-atlantic/Bridge.md new file mode 100644 index 00000000..d8495cd4 --- /dev/null +++ b/docs/manta-atlantic/Bridge.md @@ -0,0 +1,41 @@ +# The Ultimate Guide to Manta Interoperability + +Manta Network initially started its journey with Manta Atlantic (the fastest ZK L1 chain on Polkadot) and later introduced Manta Pacific (the modular L2 ecosystem that is community-driven) in the Manta ecosystem. + +To ensure seamless participation from the Manta ecosystem users, assets should circulate freely within both chains, especially the native governance token, $MANTA. Users can use tokens on both chains to participate in Manta Pacific’s fast-growing ecosystem (DeFi, SocialFi, zkApps & more) by enjoying the inexpensive gas fees & highly scalable environment. Meanwhile, on Manta Atlantic, users can use $MANTA for gas fees to participate in staking and other on-chain activities. + +The cBridge cross-chain bridge powered by Celer enables a seamless bridging experience between Manta Pacific and Atlantic. The bridge will go live at TGE on January 18, 2024. + +## Bridge and Lockup + +Manta bridge and stake functions on Atlantic will be live at TGE. For token holders of $MANTA on Manta Pacific, you can bridge to Manta Atlantic to stake and interact with the Atlantic ecosystem. + +## Bridging $MANTA between Pacific and Atlantic + +### Bridging with Manta Bridge + +
+ 1 +
+ +- Make sure you have enough tokens to pay gas fees: $MANTA in your Manta Atlantic wallet, and $ETH in your Manta Pacific wallet. If you don’t have an Atlantic wallet yet, you can download a compatible wallet such as the Manta Wallet. Once you have your Atlantic wallet, you can use the address located in it. +- Bridge $MANTA from Manta Pacific to Manta Atlantic by using the Manta Bridge. +- Connect both your Atlantic wallet (e.g., Manta Wallet) and your Pacific wallet (e.g., MetaMask) on cBridge. Then, select the token you are bridging (i.e., $MANTA) and enter the amount you want to bridge. +- Approve the transaction to initiate the transfer process. + +## Bridging with cBridge + +
+ 2 +
+ +- Make sure you have enough tokens to pay gas fees: $MANTA in your Manta Atlantic wallet, and $ETH in your Manta Pacific wallet. If you don’t have an Atlantic wallet yet, you can download a compatible wallet such as the Manta Wallet. Once you have your Atlantic wallet, you can use the address located in it. +- Bridge $MANTA between Moonbean to Manta Pacific by using Celer’s cBridge. +- Connect both your Atlantic wallet (e.g., Manta Wallet) and your Pacific wallet (e.g., MetaMask) on cBridge. Choose which network you want to bridge from (e.g., Manta Pacific) and which network you want to bridge to (e.g., Manta Atlantic). Then, select the token you are bridging (i.e., $MANTA) and enter the amount you want to bridge. + +## Notes + +- If you need to manually update Manta Wallet, open the Chrome extension, enable developer mode in the top-right corner, and click ‘Update’ in the top-left corner. +- If you participated in Squad Game (the Manta Network Crowdsale), your $MANTA tokens will appear in your Manta Atlantic network wallet. +- When transferring to centralized exchanges, please make sure to double check the network address. Manta Pacific addresses begin with prefix 0x. +- The Polkadot XCM bridge is used from Manta Atlantic to Moonbeam, and the Bridge by Celer is used from Moonbeam to Manta Pacific. diff --git a/docs/manta-atlantic/Stake.md b/docs/manta-atlantic/Stake.md new file mode 100644 index 00000000..773b7d84 --- /dev/null +++ b/docs/manta-atlantic/Stake.md @@ -0,0 +1,12 @@ +# Staking $MANTA for Atlantic Security & Rewards + +On Manta Atlantic, users can stake $MANTA tokens. By staking $MANTA, users contribute to the security of the network through its collator program, and in return earn staking rewards. To stake $MANTA, follow these instructions. + +
+ 1 +
+ +- First, if you don’t have a Manta Atlantic-compatible wallet yet, you can add the Manta Wallet Chrome extension or another wallet supporting Manta Atlantic. +- Follow the steps in the Manta Wallet extension to create a new account. Don’t forget to back up your mnemonic phrase in a safe place! +- After completing your wallet setup, make sure to fund it with $MANTA. Then head over to the Collator website on Manta Atlantic to select a collator to stake your assets. Please bear in mind that each collator can only take a total of 100 wallets. After that amount, only the top 100 wallets (ranked by the amount of $MANTA contributed) will earn rewards. +- You can always check your rewards after connecting your wallet to the Manta Collator website and checking at the top of the page. diff --git a/sidebars.js b/sidebars.js index 71d67fb5..e40dbab8 100644 --- a/sidebars.js +++ b/sidebars.js @@ -215,6 +215,16 @@ module.exports = { }, ], }, + { + type: "doc", + label: "Bridge", + id: "manta-atlantic/Bridge", + }, + { + type: "doc", + label: "Stake", + id: "manta-atlantic/Stake", + }, ], }, {