<!-- canonical: https://0xsimao.com/findings/maple-finance-iv-usdc-usds-slightly-wrapper -->

# Usdc to Usds calculation in the Sky Strategy is slightly different than the Psm Usds Wrapper

Low/Info · Three Sigma · Institutional lending · 26th November, 2024

Finding 3S-Maple-N09 of the Maple Cash Strategies security review.

- Protocol: https://maple.finance/
- Report: /reports/maple-finance-iv
- Source: https://cdn.sanity.io/files/qoqld077/staging/a68d604be9eca467b1f656c2ca775e1cebc2a468.pdf

---

### Description

In the [psmWrapper](https://vscode.blockscan.com/ethereum/0xA188EEC8F81263234dA3622A406892F3D630f98c), the Usds amount from the gem is calculated as usdsInWad = gemAmt18
+ gemAmt18 * psm.tout() / WAD; , but in the Sky Strategy it is calculated as
(gemAmount_
* to18ConversionFactor * (WAD + tout)) / WAD; .

### Recommendation

Although the result is the same (including the rounding error), consider implementing the
same exact formula.

### Status

Addressed in [#771a479](https://github.com/maple-labs/maple-strategies/pull/40/commits/771a479f860a3ad08511aa95e187e9baf96fc14d).

---

Related findings:

- [BatchOut:executeBatchWithdrawFromStrategyWithSwap() gives unfairly different slippage depending on the chosen token](https://0xsimao.com/findings/clip-finance-i-withdraw-unfairly-slippage-depending): Clip Finance Strategies
