
DeFi lesson: 1inch resolvers
Lesson Structure: 1/ Resolver Incentive Program 2/ Earn rewards by staking and delegating 3/ Modular Delegation 4/ Resolution 5/ Resolvers 1/ Resolver Incentive Program Resolvers Resolvers are algorithms that determine the best paths and strategies for exchanging tokens and providing liquidity based on data about available liquidity pools on different exchanges. They play an important role in optimizing trades and minimizing risk. Through the Resolver Incentive Program, users who provide liqu...

DeSci can revolutionize insulin access and affordability / BionicDAO
This article is a follow-up to BionicDAO: Rethinking Healthcare Through Decentralized Science. My goal is to explore this topic in more detail and give you food for thought on the direction of decentralized science and how it can change the field of health care. Let's first understand what insulin and DeSci are: What is insulin? Insulin, produced in the pancreas, is an important hormone that unlocks the ability of cells to obtain sugar (energy). Originally derived from animals, it is now...
![Cover image for DeFi lesson: Swap surplus collection [ 1inch ]](https://img.paragraph.com/cdn-cgi/image/format=auto,width=3840,quality=85/https://storage.googleapis.com/papyrus_images/288bc23cbc0ad72b19432f7ca99fae797eebce7b0191e28ac697dd04110f2907.png)
DeFi lesson: Swap surplus collection [ 1inch ]
Lesson Structure: 1/ What is Swap surplus collection 2/ The 1inch DAO discontinues swap surplus collection 3/ Problematic and solution 1/ What is Swap surplus collection In the context of DeFi, "swap surplus collection" refers to the process of collecting or distributing surplus funds that are generated from decentralized swaps. When users make swaps, they pay fees or contribute liquidity to pools. These fees or additional tokens added to the liquidity pool can generate surplus funds over tim...
<100 subscribers

DeFi lesson: 1inch resolvers
Lesson Structure: 1/ Resolver Incentive Program 2/ Earn rewards by staking and delegating 3/ Modular Delegation 4/ Resolution 5/ Resolvers 1/ Resolver Incentive Program Resolvers Resolvers are algorithms that determine the best paths and strategies for exchanging tokens and providing liquidity based on data about available liquidity pools on different exchanges. They play an important role in optimizing trades and minimizing risk. Through the Resolver Incentive Program, users who provide liqu...

DeSci can revolutionize insulin access and affordability / BionicDAO
This article is a follow-up to BionicDAO: Rethinking Healthcare Through Decentralized Science. My goal is to explore this topic in more detail and give you food for thought on the direction of decentralized science and how it can change the field of health care. Let's first understand what insulin and DeSci are: What is insulin? Insulin, produced in the pancreas, is an important hormone that unlocks the ability of cells to obtain sugar (energy). Originally derived from animals, it is now...
![Cover image for DeFi lesson: Swap surplus collection [ 1inch ]](https://img.paragraph.com/cdn-cgi/image/format=auto,width=3840,quality=85/https://storage.googleapis.com/papyrus_images/288bc23cbc0ad72b19432f7ca99fae797eebce7b0191e28ac697dd04110f2907.png)
DeFi lesson: Swap surplus collection [ 1inch ]
Lesson Structure: 1/ What is Swap surplus collection 2/ The 1inch DAO discontinues swap surplus collection 3/ Problematic and solution 1/ What is Swap surplus collection In the context of DeFi, "swap surplus collection" refers to the process of collecting or distributing surplus funds that are generated from decentralized swaps. When users make swaps, they pay fees or contribute liquidity to pools. These fees or additional tokens added to the liquidity pool can generate surplus funds over tim...
Share Dialog
Share Dialog


Today we are going to talk about token plugins, understand what they are for and how they can be used in DeFi.
On July 19, 1inch co-founder Anton Bukov spoke at EthCC, where he presented the concept of token plugins. Before reading this article, I recommend you to watch Anton's presentation on YouTube:
Token plugins are ERC20 extensions that allow token holders or liquidity providers to extend the possibilities of their assets by connecting to onchain smart contracts and notifying them of user balance changes ( quoted from 1inch Blog ).
How do token plugins work?
1/ Inherit token: contract MyToken is ERC20Plugins { … }
Or wrap it; contract my wrapper is ERC20Wrapper, ERC20Plugins { … }
2/ Create/deploy a plugin smart contract
3/ Wallets an plugin: My Token.addPlugin(plugin)
Plugin can track balance changes, non-participant balances and addresses considered as zeroes.
To use a token plugin, you inherit it in your token contract. For example, you have a contract called "MyToken" that inherits from the ERC20Plugins contract. This inheritance will help your token contract to access the features provided by the plugin.
contract MyToken is ERC20Plugins {
// Your token contract code goes here
...
}
The next one is the Wrapping Token Contract. In this case, you will have a contract, let's call it "My Wrapper", which inherits two contracts at once: ERC20Wrapper and ERC20Plugins. This allows us to add additional functionality to the token contract.
contract MyWrapper is ERC20Wrapper, ERC20Plugins {
// Your wrapper contract code goes here
...
}
Examples of token and plugin
Below is the example of token implementing plugin support and a simple plugin that mints and burns its own token based on the parent’s token balance.

Anton Bukov, in his speech at EthCC, highlighted two of the most promising options for using token plugins: farming and delegation in the onchain. But there is no need to focus only on these two options. I will try to give you as many examples as possible of the use of token plugins.
Farming is an interesting option for using token plugins, we have the opportunity to create a plugin that will automatically redistribute tokens between farms and liquid pools. The purpose of this plugin is to maximize profitability, it will be useful for users who want to automate their strategies and reduce risks.
"Previously, when you gave your tokens to a farm, you had to trust the farm," says Anton Bukov.
My opinion: You also need to understand that token plugins do not guarantee 100% risk reduction, so when using plugins, you will need to calculate the risks and conduct your own research, this is very important. Yes, when using token plugins, the risks of hacking, transferring your assets or other manipulations are impossible, but when using plugins in different strategies, LP, the plugin will not guarantee a return.
An interesting use of plugin tokens is to extend voting and governance capabilities. Plugins can allow for a greatly enhanced governance and voting capabilities in protocols. This will increase the influence of token holders on protocols and allow them to vote on proposals for changes to the pool protocol or strategic decisions.
Let's continue with LP and token plugins. Plugins can improve the automation of management processes in LP. A plugin can automatically redistribute tokens between different pools to maximize yield. It can also affect risk mitigation, but not its complete absence.
Token plugins can also take into account various factors, such as the riskiness of the pool, risk management, and reallocation to changes in market conditions.
To get a better understanding of the processes, I recommend checking out GitHub:
https://github.com/1inch/token-plugins
https://github.com/1inch/delegating
https://github.com/1inch/farming
It's important to note that the processing logic of plugins consumes additional gas, and operations that change an account balance will be more expensive in terms of gas. To mitigate this, the library implementing the plugin system sets a gas limit that a plugin can spend.
I am confident that the plugin system will become a powerful tool for creating flexible and innovative solutions
Today we are going to talk about token plugins, understand what they are for and how they can be used in DeFi.
On July 19, 1inch co-founder Anton Bukov spoke at EthCC, where he presented the concept of token plugins. Before reading this article, I recommend you to watch Anton's presentation on YouTube:
Token plugins are ERC20 extensions that allow token holders or liquidity providers to extend the possibilities of their assets by connecting to onchain smart contracts and notifying them of user balance changes ( quoted from 1inch Blog ).
How do token plugins work?
1/ Inherit token: contract MyToken is ERC20Plugins { … }
Or wrap it; contract my wrapper is ERC20Wrapper, ERC20Plugins { … }
2/ Create/deploy a plugin smart contract
3/ Wallets an plugin: My Token.addPlugin(plugin)
Plugin can track balance changes, non-participant balances and addresses considered as zeroes.
To use a token plugin, you inherit it in your token contract. For example, you have a contract called "MyToken" that inherits from the ERC20Plugins contract. This inheritance will help your token contract to access the features provided by the plugin.
contract MyToken is ERC20Plugins {
// Your token contract code goes here
...
}
The next one is the Wrapping Token Contract. In this case, you will have a contract, let's call it "My Wrapper", which inherits two contracts at once: ERC20Wrapper and ERC20Plugins. This allows us to add additional functionality to the token contract.
contract MyWrapper is ERC20Wrapper, ERC20Plugins {
// Your wrapper contract code goes here
...
}
Examples of token and plugin
Below is the example of token implementing plugin support and a simple plugin that mints and burns its own token based on the parent’s token balance.

Anton Bukov, in his speech at EthCC, highlighted two of the most promising options for using token plugins: farming and delegation in the onchain. But there is no need to focus only on these two options. I will try to give you as many examples as possible of the use of token plugins.
Farming is an interesting option for using token plugins, we have the opportunity to create a plugin that will automatically redistribute tokens between farms and liquid pools. The purpose of this plugin is to maximize profitability, it will be useful for users who want to automate their strategies and reduce risks.
"Previously, when you gave your tokens to a farm, you had to trust the farm," says Anton Bukov.
My opinion: You also need to understand that token plugins do not guarantee 100% risk reduction, so when using plugins, you will need to calculate the risks and conduct your own research, this is very important. Yes, when using token plugins, the risks of hacking, transferring your assets or other manipulations are impossible, but when using plugins in different strategies, LP, the plugin will not guarantee a return.
An interesting use of plugin tokens is to extend voting and governance capabilities. Plugins can allow for a greatly enhanced governance and voting capabilities in protocols. This will increase the influence of token holders on protocols and allow them to vote on proposals for changes to the pool protocol or strategic decisions.
Let's continue with LP and token plugins. Plugins can improve the automation of management processes in LP. A plugin can automatically redistribute tokens between different pools to maximize yield. It can also affect risk mitigation, but not its complete absence.
Token plugins can also take into account various factors, such as the riskiness of the pool, risk management, and reallocation to changes in market conditions.
To get a better understanding of the processes, I recommend checking out GitHub:
https://github.com/1inch/token-plugins
https://github.com/1inch/delegating
https://github.com/1inch/farming
It's important to note that the processing logic of plugins consumes additional gas, and operations that change an account balance will be more expensive in terms of gas. To mitigate this, the library implementing the plugin system sets a gas limit that a plugin can spend.
I am confident that the plugin system will become a powerful tool for creating flexible and innovative solutions
No comments yet