lindy-labs / opus_contracts

Opus Source Code
https://opus.money
Other
0 stars 0 forks source link

feat: transfer leftover absorbed assets due to loss of precision back to gate #542

Closed tserg closed 9 months ago

tserg commented 9 months ago

Fix for https://github.com/code-423n4/2024-01-opus-findings/issues/201

The tradeoff in this approach is that in a partial absorption, the remaining value of the liquidated trove is very slightly higher because it gains from the error that is transferred back to the Gate and rebased i.e. all yangs benefit. However, this is unlikely to be an issue once the system grows.