seamless-protocol / seamless-interface

https://seamless-interface.vercel.app
Other
7 stars 6 forks source link

Error when supply cap is full #579

Closed kitanovicd closed 2 months ago

kitanovicd commented 2 months ago

Image

From a quick investigation I was able to see that the RPC call to maxDeposit is reverting from an overlow in the contract. So maybe some weird state from the virtual testnet but let's confirm that is the case and generallly that when a strategy is at max capacity things behave correctly and show correct error states.

Maybe this can be fixed by calling the getAssetsCap function instead of maxDeposit like we use to do in previous UI versions. I think actually this is a smart contract bug. It's possible that asset value is greater than the cap if strategy increased in value, the maxDeposit will revert and prevent new deposits but users can still redeem and do other functions

Slack thread: https://getseashell.slack.com/archives/C01TFRMV740/p1725666711167339?thread_ts=1725646753.704929&cid=C01TFRMV740