For a separate project that I am working on, I needed a contract that keeps track of how much ERC20/ETH is set aside by an address for another address. I wrote the following contract (github link attached), that allows a user to deposit a certain amount of ERC20/ETH into a 'collateral' position, which they can trade around to other users as if it were an NFT. They can also specify the conditions that need to be met before the position can be liquidated back into ERC20/ETH
This seemed like something general enough so I was wondering if I might be re-inventing the wheel. Is there an EIP standard for similar purposes?
https://github.com/jinhongkuan/collaterize/blob/main/contracts/Collaterize.sol
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments