Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Draft/user friendly doc #129

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions docs/aggregation-protocol/api/swagger.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 2
sidebar_label: "API Reference"
---

import Tabs from '@theme/Tabs';
Expand Down
74 changes: 65 additions & 9 deletions docs/educational-resources/beginner/Articles/how-to-stake.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,78 @@
---
sidebar_label: 'How to Stake 1INCH token'
sidebar_label: 'How to Stake 1INCH Tokens?'
title: 'How to Stake 1INCH Tokens?'
---
import DropDown from './assets/Dropdown.jsx'
import DropDown from './assets/Dropdown.jsx'

First connect your wallet. Then click on the “DAO” tab, followed by “Staking”.
<!-- this is a comment -->
<!--![](./assets/DAODropdown.jpeg)-->
Staking is the process of locking up tokens to participate in a network's DAO governance and consensus mechanism in order to earn rewards. When you stake your tokens on the 1inch Protocols, which operate on a list of supported chains, you gain the opportunity to engage in the 1inch Network's DAO governance and earn rewards.

This guide will provide you with essential information on effectively staking your tokens on the 1inch Protocol, including details about the penalty for unstaking. It's important to note that this guide assumes you already possess a basic understanding of blockchain technology, you are familiar with cryptocurrency wallets, and you possess a knowledge of blockchain transactions.

To demonstrate the staking process, we will use a compatible wallet with sufficient funds. For security reasons, you should store your tokens in cold storage wallets and reserve hot storage wallets exclusively for staking purposes.

## How to Swap Crypto Native Tokens to 1INCH?
Cataclypsme marked this conversation as resolved.
Show resolved Hide resolved

Prior to staking on the 1inch Protocol, it is essential to exchange your crypto native tokens for 1INCH tokens. By doing so, you will obtain the necessary authorization to stake and earn rewards.

Below are the steps to convert your native tokens to 1INCH tokens:

1. Go to [1inch.io](https://1inch.io/).
Cataclypsme marked this conversation as resolved.
Show resolved Hide resolved
2. Locate the **Launch DApp** button situated in the upper right corner and click on it. This action will immediately take you to the swap mode interface.
3. Click on the **Connect Wallet** button positioned in the top right corner to connect your wallet.
4. Choose your preferred native token by selecting a chain from the chains' dropdown menu beside the **Connect Wallet** button.
5. Indicate the amount of your desired native tokens you wish to convert to 1INCH tokens.
6. Proceed by clicking on the **Swap** button.
7. Confirm the swap by clicking on the **Confirm Swap** button.
8. Finally, validate the transaction within your wallet to complete the process.

## Staking 1INCH Tokens

Once you have acquired a certain amount of 1INCH tokens, you can to stake them by following these steps:

1. Go to the DAO drop-down menu located in the navigation bar.
2. Click on the **Staking** option from the menu, which will redirect you to the staking interface.

<DropDown/>

Next, enter the amount of 1INCH you would like to stake, set the locking period (default is 2 years) and click “Give permission to stake”. Then sign the transaction in your connected wallet.
Cataclypsme marked this conversation as resolved.
Show resolved Hide resolved

3. Enter your desired amount of tokens you intend to stake.
4. Click on the **Give Permission** button and validate the transaction within your wallet.

![](./assets/GivePermissionButton.jpeg)

5. Allow some time for the transaction to be processed and confirmed on the blockchain.
6. Click on the **Stake** button and confirm the transaction within your wallet. Subsequently, you will be able to view the total amount of staked tokens, the lock period, and your total Unicorn Power, which can be utilized for delegation or 1inch DAO governance voting.

![](./assets/StakingAndUnicornPower.png)

## Troubleshooting and Tips

If you encounter any issues during the staking process, consider the following tips:

- Ensure that your wallet is securely connected and contains an adequate balance.
- Double-check all transaction details before confirming to prevent any errors.
- If you encounter any technical challenges, seek assistance from the 1inch Protocol's support resources or community for prompt resolution.

## Unstaking Penalties
Cataclypsme marked this conversation as resolved.
Show resolved Hide resolved
When staking, you have the option to select a custom or preset lock period. It's crucial to understand that your staked 1INCH tokens cannot be withdrawn without a penalty until the designated lock period ends.

The penalty amount is calculated as the balance minus the withdrawal amount. The withdrawal amount is determined by subtracting the voting power from the balance and dividing the result by 0.9. The maximum potential loss for an early withdrawal is 90%, based on a minimum lock period of 1 month.

As time progresses, the penalty for unstaking 1INCH tokens gradually decreases. Additionally, opting for a longer lock period results in receiving a higher amount of UP (Unicorn Power). It's worth noting that the quantity of held Unicorn Power also diminishes over time, similar to the withdrawal penalty.

## Conclusion

In conclusion, staking on the 1inch Protocol offers the chance to earn rewards and engage in DAO governance. By following this comprehensive guide, you should now possess a solid understanding of the staking process and feel confident in staking your tokens.



<!-- this is a comment
Next, enter the amount of 1INCH you would like to stake, set the locking period (default is 2 years) and click “Give permission to stake”. Then sign the transaction in your connected wallet.


![](./assets/SignPermit.jpeg)

This will permit the 1INCH tokens to be used by the smart contract *and* stake them in one single transaction. Once completed, your 1INCH tokens will be staked! You will then be able to see the total amount of tokens staked, your lock period, and your total Unicorn Power (used for delegation or 1inch DAO governance voting).
This will permit the 1INCH tokens to be used by the smart contract *and* stake them in one single transaction. Once completed, your 1INCH tokens will be staked! You will then be able to see the total amount of tokens staked, your lock period, and your total Unicorn Power (used for delegation or 1inch DAO governance voting). -->

![](./assets/StakingAndUnicornPower.png)

*Please note: Unstaking before the end of the lock period will result in a penalty.*
<!--![](./assets/DAODropdown.jpeg)-->
2 changes: 1 addition & 1 deletion git-submodules/limit-order-protocol
Submodule limit-order-protocol updated 78 files
+2 −0 .gitignore
+23 −4 .solcover.js
+1 −0 .solhint.json
+1 −1 .vscode/settings.json
+36 −0 CONTRIBUTING.md
+1 −1 LICENSE.md
+6 −8 contracts/LimitOrderProtocol.sol
+101 −118 contracts/OrderLib.sol
+366 −217 contracts/OrderMixin.sol
+0 −44 contracts/OrderRFQLib.sol
+0 −261 contracts/OrderRFQMixin.sol
+11 −2 contracts/helpers/AmountCalculator.sol
+11 −9 contracts/helpers/ChainlinkCalculator.sol
+1 −2 contracts/helpers/DutchAuctionCalculator.sol
+1 −2 contracts/helpers/ERC1155Proxy.sol
+1 −2 contracts/helpers/ERC721Proxy.sol
+1 −2 contracts/helpers/ERC721ProxySafe.sol
+126 −0 contracts/helpers/ETHOrders.sol
+1 −2 contracts/helpers/ImmutableOwner.sol
+0 −44 contracts/helpers/NonceManager.sol
+15 −22 contracts/helpers/OrderIdInvalidator.sol
+21 −77 contracts/helpers/PredicateHelper.sol
+10 −9 contracts/helpers/RangeAmountCalculator.sol
+49 −0 contracts/helpers/SeriesEpochManager.sol
+0 −58 contracts/helpers/SeriesNonceManager.sol
+16 −18 contracts/helpers/WethUnwrapper.sol
+0 −25 contracts/interfaces/IInteractionNotificationReceiver.sol
+236 −74 contracts/interfaces/IOrderMixin.sol
+27 −0 contracts/interfaces/IPostInteraction.sol
+0 −30 contracts/interfaces/IPostInteractionNotificationReceiver.sol
+27 −0 contracts/interfaces/IPreInteraction.sol
+0 −30 contracts/interfaces/IPreInteractionNotificationReceiver.sol
+32 −0 contracts/interfaces/ITakerInteraction.sol
+58 −0 contracts/libraries/BitInvalidatorLib.sol
+0 −48 contracts/libraries/CalldataLib.sol
+1 −1 contracts/libraries/Errors.sol
+68 −0 contracts/libraries/ExtensionLib.sol
+84 −0 contracts/libraries/MakerTraitsLib.sol
+24 −0 contracts/libraries/OffsetsLib.sol
+43 −0 contracts/libraries/RemainingInvalidatorLib.sol
+38 −0 contracts/libraries/TakerTraitsLib.sol
+1 −2 contracts/mocks/AggregatorMock.sol
+1 −5 contracts/mocks/CallsSimulator.sol
+1 −1 contracts/mocks/EIP712Alien.sol
+18 −16 contracts/mocks/HashChecker.sol
+10 −11 contracts/mocks/MakerContract.sol
+35 −41 contracts/mocks/RecursiveMatcher.sol
+57 −0 contracts/mocks/TakerIncreaser.sol
+1 −10 contracts/mocks/WrappedTokenMock.sol
+0 −98 contracts/tests/CalldataLibTest.sol
+3 −3 deploy/deploy-series-nonce-manager.js
+45 −0 deploy/zksync.js
+6 −6 docgen/docs/OrderRFQMixin.md
+3 −3 docgen/docs/SUMMARY.md
+3 −3 docgen/docs/helpers/WethUnwrapper.md
+1 −1 docgen/docs/interfaces/InteractionNotificationReceiver.md
+3 −3 docgen/docs/interfaces/PostInteractionNotificationReceiver.md
+3 −3 docgen/docs/interfaces/PreInteractionNotificationReceiver.md
+14 −2 hardhat.config.js
+13 −0 hardhat.networks.js
+22 −18 package.json
+23 −49 test/ChainLinkExample.js
+20 −10 test/DutchAuctionCalculator.js
+205 −153 test/Interactions.js
+651 −814 test/LimitOrderProtocol.js
+27 −10 test/MakerContract.js
+129 −0 test/MeasureGas.js
+0 −50 test/NonceManager.js
+15 −8 test/RangeAmountCalculator.js
+288 −0 test/RangeLimitOrders.js
+239 −0 test/RfqInteractions.js
+249 −178 test/RfqOrders.js
+20 −22 test/SeriesNonceManager.js
+0 −99 test/SolidityTests.js
+6 −21 test/helpers/fixtures.js
+164 −90 test/helpers/orderUtils.js
+49 −0 test/helpers/utils.js
+1,333 −1,129 yarn.lock