Withdraw
WITHDRAW SYSTEM : You can withdraw in two ways
β’ You can withdraw stake + rewards for that stake in one go
1. If coolDown == 0
user can call withdraw
and immediately withdraw
function withdraw(
uint256 _amount,
uint256 stakeId
)
2. if coolDown > 0
user needs to first initiate withdraw request calling makeWithdrawRequest
function makeWithdrawRequest(
uint256 _amount,
uint256 stakeId
)
After coolDown period has passed user will initiate withdraw
function withdraw(
uint256 _amount,
uint256 stakeId
)id
β’ You can only withdraw earned rewards for all stakes by user calling
function withdrawRewards()
Last updated
Was this helpful?