RiskProtocol / core-protocol

1 stars 0 forks source link

Invariants in contracts #158

Open mz7mz7mz7 opened 7 months ago

mz7mz7mz7 commented 7 months ago

https://riskprotocolgroup.slack.com/archives/C04R3QM2S9E/p1695146100060899

To review if we can add some globally holding invariants to the sensitive operations on the underlying or user balances.

haidarally commented 7 months ago

We could possibly add some checks as below TotalSpply(riskOn) <= locked Underlying && TotalSpply(riskOff) <= locked Underlying

on withdraw and transfer @mz7mz7mz7 what do you think?