Is it possible to create a function that will allow deposits of other ERC-20 tokens to my newly created smart contract then lock them?
For example, I created a token ABC but I will need collateral from the owner using other ERC-20 tokens like DAI or USDT. The owner will deposit this DAI to the contract then lock it in for a certain period of time.
Is this possible? Basically, there are 2 concerns: The contract will accept other ERC-20 tokens then the next one is locking those other ERC-20 tokens.
Yes, I think it is possible.
If you have not deployed your contract, it seems like you just need to add such a function.
If you have deployed the contract, and it is upgradable, then you also can upgrade your contract to do so, but if is not upgradable, I think you can nothing for it.
Thanks for the reply. Yeah the contract is not yet created. You mean using the transferFrom function of another token by using a contract address right?