Closed sayantank closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
stake-pool-sdk | ✅ Ready (Inspect) | Visit Preview | Apr 22, 2022 at 5:41AM (UTC) |
i think we might need to add one more step to the test, which is to call
calcDeposit()
/calcWithdrawal()
on thelamportsStaked
/totalDropletsToUnstake
results returned by the inverse functions in order to make sure that the results >= the inputdropletsToReceive
/lamportsToReceive
. Otherwise a user could get shortchanged and receive 1 or 2 fewer droplets/lamports than what was desired.
Here, we know that lamportsStaked
returned by the inverse function will be lesser than the depositAmountLamports
, so when we do calcDeposit
with lamportsStaked
we wouldn't get >= dropletsReceived
right?
Here, we know that
lamportsStaked
returned by the inverse function will be lesser than thedepositAmountLamports
, so when we docalcDeposit
withlamportsStaked
we wouldn't get >=dropletsReceived
right?
Yeah, actually nvm then, we probably dont need the additional checks
closed #78