Uniflash is a simple and decentralized protocol for flash loans, trying to follow the design of Uniswap. It supports both Eth and ERC20 tokens. All the fee goes to users.
Note that Uniflash is not audited yet, though there are enough test cases. It's currently deployed on the Ropsten network for testing.
For discussing and contributing to the next of Uniflash, please join this telegram group @Uniflash
One could use any smart contract interactor to play with Uniflash, e.g. https://justsmartcontracts.dev/. It's able to add a front-end similar to Uniswap later if the community likes the project.
Testing on Ropsten network:
getEthFlashwith any interest factor from 1 to 10 (e.g. 9 means 0.09% fee rate)
abi/uniflash-eth.jsonwith the address fetched in Step 3
removeLiquidityto deposit and withdraw your Eth
One can create a Pool for any ERC20 token using
uniflash-factory, and then following similar steps to deposit and withdraw your ERC20 tokens in the flash loan pool.
For each token (including Eth), there are 10 pools initialized with fee rate ranging from 0.01%, 0.02%, to 0.10%. Users are free to choose a pool with a matched fee rate.
Why not a dynamic fee rate? The reasons are: 1. It's done on purpose to avoid using any price oracle to quantify the volume of each pool, so as to keep the protocol as simple as possible. 2. If the initial fee is high, then nobody would use it. The protocol would be stuck in the cold-start phase. However, with the current design, users are able to switch between pools with different fee rates. 3. Even though discrete fee rates are used, the pool sizes could change according to demands and supplies.
Thank Uniswap for its pioneering work on DeFi design and implementation.