<!-- canonical: https://0xsimao.com/findings/ostium-trade-size-variable-automation -->

# Unused Trade Size Variable in OstiumTrading::executeAutomationOrder()

Low/Info · Three Sigma · RWA perpetuals DEX · 19th February, 2024

Finding 3S-OS-N02 of the Ostium security review.

- Protocol: https://www.ostium.com/
- Report: /reports/ostium
- Source: https://cdn.sanity.io/files/qoqld077/production/a95b9c69e0f65d1d6b0e649f0d62a362358ca8ce.pdf

---

### Description

The leveragedPos variable in OstiumTrading::executeAutomationOrder() is calculated
on [L443](https://github.com/0xOstium/smart-contracts-threeSigma/blob/1b70cffbac621d39e321c159e45c048b703add92/src/OstiumTrading.sol#L443) and [L465](https://github.com/0xOstium/smart-contracts-threeSigma/blob/1b70cffbac621d39e321c159e45c048b703add92/src/OstiumTrading.sol#L465), but its value isn't utilized anywhere in the function.

### Status

Addressed in [#27e6f2c](https://github.com/0xOstium/smart-contracts-threeSigma/pull/58/commits/27e6f2c19653c03a0e34edfa4617e27da793955a).
