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: RedStone Oracles, bridge & stake #225

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/manta-atlantic/Bridge.md
Original file line number Diff line number Diff line change
@@ -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

<div style={{textAlign: 'center'}}>
<img alt="1" src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*AGkx1AbxMzhe7McGqHNICw.png" width="90%"/>
</div>

- 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

<div style={{textAlign: 'center'}}>
<img alt="2" src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*bQnQWZofAoobhiRRUydB9w.jpeg" width="90%"/>
</div>

- 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.
12 changes: 12 additions & 0 deletions docs/manta-atlantic/Stake.md
Original file line number Diff line number Diff line change
@@ -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.

<div style={{textAlign: 'center'}}>
<img alt="1" src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*n4xbqsqC8w1QldjR2Fnfnw.png" width="90%"/>
</div>

- 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.
40 changes: 40 additions & 0 deletions docs/manta-pacific/RedStone Oracles.md
Original file line number Diff line number Diff line change
@@ -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: <https://manta.socialscan.io/address/0xf4ec1dbd9047153c907e9d4a02cad85864ea16dc>

(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).
Loading
Loading