solace-fi / solace-core

solace.fi smart contracts
GNU General Public License v3.0
6 stars 3 forks source link

Vault - Cooldown withdraw #161

Closed leonardishere closed 3 years ago

leonardishere commented 3 years ago

A sneaky capital provider could watch for exploits and withdraw their capital before claims are paid. We need a two step withdraw process to prevent that

1 - start timer, wait seven days 2 - withdraw

The capital provider could also start their timer long in advance so they can withdraw at any time. The timer should also have a max period to prevent this