I´d like to lock LP tokens for my ERC-20 using Defender´s Timelock contract. Is this possible? Could anybody guide me in any sense? I am kinda new to all of it and I´d like to learn. I´ve already deployed the Timelock contract, but Im kinda lost as to what the next step is.
Thank you for your question!
To give you a bit of context around timelock controllers, I would recommend having a read through our documentation.
We also have a workshop around ERC-20 contracts and timelocks, which you can find here.
Make sure you have delpoyed your ERC-20 contract and the timelock controller. Once that's done and configured, generally you would transfer ownership of the ERC-20 to the timelock so only the timelock can execute
onlyOwner functions. You would set yourself and your team up as proposers and executors of the timelock. You will then be able to create proposals on the ERC-20 contract, using the timelock as an execution strategy. I would definitely recommend reading through the documentation and the workshop video as this will go through some security aspects as well.
Let me know if you have any further questions!
Thank you so much for the response Nami!
I´ve watched the video already and I am still a little bit confused I have deployed the ERC-20 already....so I will transfer the ownership of the ERC-20 to the timelock. I have set myself as the executor ad proposer of the timelock.
And Im confused as to what the next step would be to lock the LP tokens rn.
Make sure you fully understand the consequence of transferring ownership to the timelock controller. You can find some more information on the types of roles here.
A timelock controller is used to delay the execution of contract calls. This could be for example to delay the release of tokens. However, this depends on the functionality of the contract. Could you post the contract address / code and timelock here or to email@example.com?
Its just basic ERC-20 + the Defender´s Timelock
In that case, it would be good to understand your goal here. Are you trying to introduce a vesting period for the tokens? I'm trying to figure out if timelocks is in fact what you need here.
Im just trying to lock Sushiswap LP tokens
There are two ways of tackling this.
- You can use an existing LP locking service to extract out the complexities of having to deal with contracts. A Google search for "LP locking services" will yield you a bunch of results.
- You can do this yourself, but you don't need a timelock for this. You need a tokenlock, which you can find more documentation on here.
If you do have questions around the latter, I would like to refer you to the Contracts section of the Forum, as they will be able to provide more valuable input.