Salaried - Project for Polygon Fellowship'22, a brief overview : A Payment Streams Tooling for DAOs/Orgs to stream salaries in ERC20 tokens over a period of time and allowing recipients to borrow under-collateral loans against upcoming salary.
The ERC20 Token streaming is based on the EIP1620, the tokens don't really get transferred to wallet in realtime, rather locked in the contract and calculated the withdrawal amount calculating rate and time locked.
🔷 How Salaried is different from Sablier and Superfluid ?
🔷How borrowing against salary work ?
The Loan contract detects the stream amount left, depending on that user can lend tokens from the AMM for the time period <= stream period.Repayment is calculated in this way, Borrow amount + Interest should be less that Stream Amount left for the user. It prevents overflowing streams or full liquidation of the pool.
Once the lending is done, the stream is directed towards the pool to fill it up,within the repayment period. Lenders are at negligible risk since the Vault has locked tokens which can be liquidated at any situation, even if the recipient's stream is updated or stopped.The Interest earned id distributed among the liquidity providers, DAOs/Orgs and the protocol itself. DAOs/Orgs are incentivised so that crypto payments shift more towards streams and also test practicality of under-collateral lending .
The biggest challenge as to now was to work on EIP1620 and create the ERC20 streaming contract.