Can I get Sui back if I destroy an object

After I created an owned object with drop property, if I delete the object do I get Sui back for incentive?

Hi @tahlil, if you are able to delete an object you own, then yes, you will get the storage rebate back for it. The storage rebate is currently calculated as 90% of the original storage cost for that version of the object.

Note that even if you modify an object, you are effectively getting back the storage rebate for the old version of the object and paying the storage cost for the new version of the object. This means that if the storage cost in your current epoch is lower than the storage cost at the time your object was last modified, you may get a storage rebate, for modifying the object, even if its size on-chain has not changed.

Your original question also mentions drop. Note that any object that you can own directly must have the key ability, which in turn means that it must contain an id: UID as its first field. The UID type does not have drop, which prevents the object’s type from having drop as well. Put another way, no type can have both key and drop – same applies for key and copy for similar reasons. Objects (types that have key) can be deleted by using explicit burn functions though, just like any other type that does not have drop.

1 Like