Token Plugins
ETHCC 6 · July 2023 · 16:38
Anton Bukov presents 1inch's Token Plugins, a design for permissionless onchain token add-ons. The speaker discusses extensions including Farming 2.0 and potential uses beyond the 1inch platform.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
foreign [Music] my name is Anton bukov I am co-founder of one inch and I'm here to show you a really cool concept which we came up recently and we believe this could change defy in coming years dramatically
so we came up to concept which we call token plugins it's effectively your C20 extensions which allows holders of any token of any LP share anything what is tokenized to extend possibilities of the asset by plugging into different plugins which are effectively on chain smart contracts so from technical point of view how it works those tokens which should which could support plugins they should inherit from erc20 plugins extension
or if you already have token LP token or anything which is not possible to modify it's possible to introduce wrapper which is your C20 wrapper and your C20 plugins also extension then what happens that arbitrary person permissionlessly can deploy plugin as a smart contract and wallets who own this pluginable token they can plug into plugins they can add some of those plugins the only limitation is number of plugins which could be added per person simultaneously
these plugins they are enabled to track changes of balances of those users who plug it into these plugins and uh foreign what this concept gives to G5 is that the development of those plugins is fully permissionless anyone can develop deploy and ask propose users to plug into those plugins participation in those plugins is risk-free in the worst case plugin could eat a bunch of your guests but it can't prevent means Burns transfers of your assets it can never steal it because you don't need to have any approved
transfers and users can participate in multiple plugins the number of plugins should be restricted on compile time on deployment time this could be 5 7 10. it depends on the token and what can be built with those plug plugins we came up to two concepts one of them is farming it's possible to have farming logic inside those plugins this means just imagine you have a MM with multiple tokens and LP token of this amm is plugin enabled is it just inherited from erc20 plugin
this means that liquidity provider which holds this token they are enabled to plug into multiple Farms simultaneously and they have no exposure in terms of risk they can participate in multiple Farms and sounds like a good idea and one more thing which we came up to is one more plugin is delegation plugin it's plugin which can hold delegated balances so people are holders of this token are enabled to plug into this plugin and they will be enabled to delegate their balance to someone and this plugin will
store delegated balances this could work for different kind of governance or any other logic uh it's kind of Primitives and I expect that more plugins could be built I believe that on oncoming hackathon people could came up to a better plugins probably than we came up to but at least farming thing is already great enough for this just imagine you can have multi-farming without any risks previously you had to deposit your tokens LP talk and sign your tokens to farm you had to trust the farm you had
to check audits but now you don't need it you can just plug into those Farms to multiple farms permissionlessly and yeah so what is plugin effectively it's smart contract with uh one method it have arguments from to and amount so plugin is gets notified of balance changes of different users and here we can see comments that from and two they could be zeros yeah they will be zeros if someone some address is not participating in this plugin and you are transferring to this address it is
considered as zero address plugin plugins they can track balances of those users who plug it in and they can avoid seeing those users who don't install it this plugin so effectively they consider all non-participants as zero addresses so when one of the participants receive tokens from non-participants it looks like mint for this exact plugin and the opposite situation looks as burn so plugins that they can maintain actual balances of participants but it's it will be not very useful if they will just store balances they can do anything and what we did in
farming plugin we take into account how much they farmed and regular Farm logic featured here in this method so it's that simple on hackathon for example anyone could use this kind of template and write own logic of own plugin and those token who will have support of this erc20 plugins extension though their users will be will be enabled to expand logic of their asset by just plugging into unchain plugins deployed by someone and it's risk-free and permissionless
so yeah can't wait to see what hikers could do with new plugins and can't wait to see major amm protocols and others to incorporate this erc20 plugins logic to allow their liquidity providers be incentivized by different dials different participants it's actually doesn't matter who will incentivize and how it's possible and now it's more accessible because it's risk-free and also permission is you can find a source code for this thing
under this cool QR code it's called AI QR code should work it worked on the screen probably it will work on this huge screen working oh cool it's anyway it's cool even if it's not working but working is better so yeah basically it's like 100 lines of code which enables next generation of incentivizations and not only incentivizations incentivizations by Farms it's only one of use cases for these plugins so I believe we we will be enabled to push this concept
to popular major libraries of solidity like open Zeppelin and others so yeah I can't wait to see what developers could do to this new device primitive but by the way if someone wanted to participate in one inch party today there is a code but I was not I had no time to include it into the presentation but the code is one inch underscore token underscore plugins so there's no much use cases I mean this code can be used limited amount of time so be quick what
yes questions yes so as I understand so these plugins they can motivate some kind of talking distribution for example so if token distribution is like not more wallets have not more percentages of supplied than some amount then everybody will be rewarded something like that right so you can optimize any metric on chain using the reward schemes yeah I would say uh instantivization is just one of use cases of token plugins with a plugin called Farm or like multifarm we also have it uh and yeah generally this means that uh protocols
dials arbitrary participants they could incentivize participation in any erc20 like uh functionality so this could be LP tokens of amms this could be tokens of money markets collaterals it could be even depths of money markets because this balances of those tokens which are like under this farming they do not leave your wallet you still have those tokens on your wallet and you participate in farming so this is kind of next generation of incentivization and the most important parts are that it's risk-free and permissionless
yeah you you can claim by yourself you can probably use a signature based approach potentially yeah this could be kind of extension of the logic yeah one more question thank you for the presentation uh quick question so if you wrap one of your let's say usdc 1000 usdc um and then you mentioned that it could be used in multiple Farms so does this mean that this value of 1000 usdc is being used in in 10 different places like 10 different Farms the same value of thousand
yeah for example if you would incentivize people to hold usdc you could introduce wrapper let's use different example if you have pool of your token and either on uniso version 2. It's erc20 you have LP token which is erc20 which is not plugins enabled but you can introduce wrapper which adds your C20 plugins for the functionality on top of this so your LP token will be locked into wrapper and you will have wrapper token which is one to one equal to this LP token and then you can you or anyone can deploy several Farms which instant device this wrapper and holders
of this wrapper and those who have it this wrapper they wrap their LP and then they can plug into those farms and have multi-farming risk-free permissionless Farms right so so if I understand correctly so the use case could be for example if somebody has my token and I want them to hold the token I just don't care what they do with it as long as they hold it yeah and I want to incentivize them for that yes officer that would be a use case for this say Avatar token you know yeah okay okay instinctive wise everything what can be measured in uh fungible tokens as your
C20 this could be a regular token of some project related to Dow governance or anything this could be utility tokens this could be uh liquidity share tokens um yeah anything collaterals debts anything what looks like erc20 can be your C20 plugins enabled more questions we still have one and a half mil so concept is really simple
implementation was simple but a little bit tricky you can check the code yeah probably we'll add comments to the tricky Parts but it's like 100 lines of code uh audited by open Zeppelin and yeah we're gonna push it into open Zeppelin Library so they will maintain it probably on their own future use cases I yeah I expect people to invent more plugins we just came up how to write firms and delegations but I expect that hackers on hackathons Engineers of
protocols they will came up to something better something more interesting and it's it's kind of primitive which enables developers to came up to new functionality you know erc20 have a lot of extensions in open Zeppelin Library you could find some extensions in other libraries you can find some extensions and how it works you need to enable these extensions at the compile and deployment time but here you can have functionality which can be enabled later you can ship something later and you users holders of this token will be able to plug into this functionality permissionlessly yeah it's extension of uh token logic
it's about only about tracking balances changes yes no QR code the time is up [Applause] thank you foreign [Music]