HydraDX-node icon indicating copy to clipboard operation
HydraDX-node copied to clipboard

omnipool - ensure only mint or burn of lrna in liquidity operations

Open enthusiastmartin opened this issue 2 years ago • 0 comments

currently, we have a function which updates LRNA based on the value calculated.

it receives a parameter which tells whether it should burn some or mint some.

however, all liquidity operations can perform only mint or burn.

having such possibility could lead into scenarios where some lrna can be minted or burned incorrectly (eg. due some bug found in future ).

it would be better and safer to allow only burn or mint based on operation and return error in other case.

add token, add liquidity should only mint lrna. remove liquidity should only burn lrna

sell/buy can only burn some fee - this is already done.

enthusiastmartin avatar Sep 02 '22 08:09 enthusiastmartin