Sunday, November 5, 2023

176: Collateral Contract

 Today I wrote a smart contract that can accept deposits and withdrawals of any ERC20 token. A user with a manager role calls a function with an ERC20 contract address, which creates a new vault for that token. Once created, tokens can be deposited and withdrawn from their respective vaults in the contract. Since we are working with ethereum, the movement of tokens must be approved in the ERC20 contract, and most of the transactions had to be verified with MetaMask and consumed gas on the Goerli test network. 

No comments:

Post a Comment

190: Sablier

 The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...