# Gatekeeped APY formula missing -1: inflated display at zero fees

**URL:** <https://ghostforum.org/t/gatekeeped-apy-formula-missing-1-inflated-display-at-zero-fees/150>\
**Category:** Bug Bounty\
**Tags:** ghost-dao-interface\
**Created:** [October 6, 2026, 2:48am UTC](https://ghostforum.org/t/gatekeeped-apy-formula-missing-1-inflated-display-at-zero-fees/150 "2026-10-06T02:48:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rusdiwireng](https://ghostforum.org/letter_avatar_proxy/v4/letter/r/9de0a6/32.png) [@Rusdiwireng](https://ghostforum.org/u/Rusdiwireng)\
**Post date:** [October 6, 2026, 2:48am UTC](https://ghostforum.org/t/gatekeeped-apy-formula-missing-1-inflated-display-at-zero-fees/150/1 "2026-10-06T02:48:43Z")

</div>

**Component:** `ghost-dao-interface` @ `a911859`, `src/hooks/staking/index.js:66`; displayed in `src/containers/Breakout/BreakoutModal.jsx:314` (“Start Stake² at: X% APY”) and `src/containers/TreasuryDashboard/components/ProtocolDetails.jsx:128`.

**Description:** The fee-component annualization uses:

```js
const gatekeepedApy = Math.pow(1 + result, power) * 100;

```

It should be `(Math.pow(1 + result, power) - 1) * 100`. At zero fee revenue (`result = 0`) this component returns **100** instead of 0. Combined:

```js
gatekeepedApy: apyInner + gatekeepedApy + (apyInner * gatekeepedApy) / 100

```

so the total displays `2 x apyInner + 100` even with no fees at all.

**Impact:** The advertised APY used to lure users into bridging (“Stake²”) is systematically inflated.

**Reproduction:** Numeric verification (node, replicating lines 59-69 `useGatekeeperApy` exactly with zero fees): zero fees, apyInner=500% → displays **1,100%** (should be 500%); 1%/period fees, apyInner=500% → displays 1,105.12% (should be about 501.7%).

**Severity: Low.** Reason: genuinely wrong and can mislead bridge decisions, but display-only: no direct fund loss and no transaction payload change.

**Recommendation:** `const gatekeepedApy = (Math.pow(1 + result, power) - 1) * 100;`. Also handle `deployedAt = 0` (metadata load failure → `power` approx 1.5e-7 → result about 100 + apyInner, misleading) and negative denominators (currently yields `NaN% APY` via `Math.pow` with negative base).

**Verification:** VERIFIED.
