Flow of Funds
- The user submits a transaction that moves their funds to the buffer. This submitted transaction is relatively cheap because tokens are only being sent from X to Y.
- Funds are held in the buffer, waiting to be deployed into the protocol.
- The funds either match with a user that withdraws an equal- or bigger share (again, to optimize capital efficiency) OR the funds are deposited into the selected strategies according to the Spool Smart Vault its current portfolio weighting.
- The user makes a request for the withdrawal which gets buffered up.
- After DoHardWork() is executed, the respective user can claim the amount they just requested to withdraw.
- This is done to achieve higher capital efficiency and lower gas costs.