osmosis-labs / mesh-security-sdk

MIT License
24 stars 12 forks source link

Add slashing tests #109

Closed maurolacy closed 10 months ago

maurolacy commented 10 months ago

Slashing scenarios tests.

Checks that tests work at the vault's level.

TODO:

maurolacy commented 10 months ago

Very nice to have some real numbers here. I added some question about the max lien amount. I am not sure if I have the correct understanding how they are calculated.

Take a look at https://github.com/osmosis-labs/mesh-security/blob/main/docs/provider/Vault.md#invariants and related, in case you're interested.

The tests cover the slash event on the consumer side and the event handling on the provider side. It would be great to also have the rebalance executed for the full cycle to ensure that the numbers match as well. This can be done in a new PR though.

Indeed. Will do that in a follow-up test.

I would be curious to see a slash on the provider side executed. But this can also be a new PR.

This would require the new version of the contracts (v0.9.0) which will be released soon. Let's release this version of the SDK, and then work on testing and releasing that.