primitivefinance / portfolio

Portfolio is an automated market making protocol for implementing custom strategies at the lowest cost possible.

Home Page:https://www.primitive.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Useless amount pointer in `encodeSwap`

clemlak opened this issue · comments

The endodeSwap function is using an extra variable to point where the amount1 starts, however since we are using static types, the value of the pointer will always be the same (proof: it's even hardcoded right now).

I suggest we should get rid of it.

Cf: https://github.com/primitivefinance/hyper/blob/1.0.0-beta/contracts/libraries/EnigmaLib.sol#L224

Fixed here 576e00a

Not closing this because this branch (https://github.com/primitivefinance/portfolio/commits/feat/mega) is actually bringing back pointers, both for the decodeSwap and decodeClaim.

Can close right?