The current implementation of the portal gives the same energy for staking the same amount of tokens, regardless of their prices. This means users receive the same amount of energy even if they choose a portal with a more expensive token. The portal should consider the price of the principal token when calculating energy to ensure a fair distribution of yield.
Imagine two portals—one with HLP tokens and the other with WETH tokens. Right now, both portals give the same energy for staking the same amount of tokens, regardless of their prices. For example, if User A puts 1e18 tokens in the HLP portal, and User B puts the same amount in the WETH portal, both get the same energy. This energy can be converted to PSM tokens.
Impact\
The current implementation can result in users receiving less profit if they choose a portal with a more expensive token.
Attachments\
Proof of Concept (PoC) File
Revised Code File (Optional)
It's recommended to adjust the portal energy calculation to consider the price of the principal token. This ensures that users receive energy based on the actual value of their staked tokens, providing a fair distribution of yield.
@PossumLabsCrypto Sorry for this submission,
this issue is invalid, by changing _FUNDING_EXCHANGE_RATIO value, the portal could consider the principal token price.
Github username: @0xmahdirostami Twitter username: 0xmahdirostami Submission hash (on-chain): 0xebec665eb9822b2ea49df386822c2e9e49aa15c767e34dea384a261f682a2f74 Severity: high
Description: Description\
The current implementation of the portal gives the same energy for staking the same amount of tokens, regardless of their prices. This means users receive the same amount of energy even if they choose a portal with a more expensive token. The portal should consider the price of the principal token when calculating energy to ensure a fair distribution of yield.
Imagine two portals—one with HLP tokens and the other with WETH tokens. Right now, both portals give the same energy for staking the same amount of tokens, regardless of their prices. For example, if User A puts 1e18 tokens in the HLP portal, and User B puts the same amount in the WETH portal, both get the same energy. This energy can be converted to PSM tokens.
Impact\ The current implementation can result in users receiving less profit if they choose a portal with a more expensive token.
Attachments\
Proof of Concept (PoC) File
Revised Code File (Optional)
It's recommended to adjust the portal energy calculation to consider the price of the principal token. This ensures that users receive energy based on the actual value of their staked tokens, providing a fair distribution of yield.