Wrapped Filecoin (WFIL), ERC20 Wrapper over Filecoin


WFIL is an ERC20 wrapper over Filecoin, representing a stablecoin on deposits on a custodial Filecoin wallet (1:1 ratio). The current iteration implements a custodial pattern where users need to send filecoins to a custodial wallet and they'll get automatically the correspondent amount in WFIL to their ethereum addresses. To unwrap WFIL, the users need to burn the amount of WFIL they want to unwrap and they'll get automatically the correspondent amount of Filecoins in the specified address. Future Developments & Features: We'd like to migrate to a non-custodial pattern where by leveraging on Filecoin smart contracts we'd be able to implement a fully decentralized application. Extend the Filecoin Wallet into a MetaMask for Filecoin. One of the features we're considering is to add the permit() function to WFIL to allow meta transactions by leveraging on OpenZeppelin ERC20Permit module (currently in progress) and incentivise adoption in the space.

WFIL showcase

How it's made

Smart Contract: WFIL.sol implements an ERC20 wrapper over Filecoin, by leveraging on OpenZeppelin AccessControl module to add the Minter Role as well as ERC20Burnable and ERC20Pausable to extend its functionality and allow, via the unwrap() function, to burn WFIL, emitting the as event the filecoin address of the recipient. The Contract is currently live on Kovan Testnet (v0.2.0), deployed via Infura APIs. UI/UX: The UI has been implemented via Rimble UI and Rimble Web3 components and deployed on IPFS via Fleek. It also include a Filecoin Wallet (MetaMask-like for Filecoin), implemented via Textile Powergate APIs. Backend: On the Backend by leveraging on Textile Powergate APIs and Lotus, the DApp interacts with Filecoin Testnet to create a custodial wallet where to deposit Filecoins to wrap and mint automatically WFIL back to the user via a lambda function where an address has been granted the Minter Role by the owner of the WFIL contract.

Technologies used