Wave Finance (Previously Salaried3)

Wave Finance (Previously Salaried3)

The most Flexible ERC20 native money streaming protocol

The problem Wave Finance (Previously Salaried3) solves

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 ?

First and foremost distinction is that it does not use wrapped super tokens.
Unlike both of the protocols, Salaried maintains an intermediary vault which stores the lump sum coming from DAOs/Orgs.
Tokens are locked which ensures that the stream remains on inspite of sender's default. Unlocking can only occur is case of stopped streams or updation.
Transfer tokens to others directly from the stream without transferring to wallet. Such tx are stored in Salaried Activity Log to detect the sender details.

🔷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 .

Challenges I ran into

The main challenge was to make the new additions to the streaming contract since none of the related docs existed and it had to be done through many trial and errors. Also to not change the current ERC20 token standard, I had figure out several work arounds for the protocol which would maintain the simplicity and the power of money stream without letting the user migrate to a whole new standard

Discussion