Skip to content
Request an audit

‹ All findings

Implement _transferShares() to prevent having to convert shares/wAVAX twice in glAVAX

Low/InfoGlacier·Three Sigma · Liquid staking · 12th July, 20233S-GLACIER-N03

Description

Sometimes the quantity of shares on hand is available instead of the corresponding wAVAX amount. In this case, if shares are to be transferred internally, it's easier to use _transferShares() instead of having the shares, converting to amount and calling _transfer(), which converts back to shares.

Recommendation

For example, in cancel(), the shares are available from request.shares, are converted to wAVAX amount and then back to shares again in _transfer().

Status

Currently being reviewed by the team.