{"id":"XE-16988","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"699","source_url":"https://github.com/xeprotocol/xe/issues/699","reporter_id":2920,"title":"[Low] client.GetLeases returns at most 100 leases with no pagination — silently truncated","area":"sdk-docs-web","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T08:13:52.120786+00:00","updated_at":"2026-11-22T23:26:15.009872+00:00","source_created_at":"2026-11-17T08:12:32+00:00","told_at":"2026-11-22T23:26:15.031589+00:00","status_changed_at":"2026-11-22T23:26:15.018312+00:00","url":"https://bounty.xe.network/XE-16988","body":"## Summary\n\n`client.GetLeases` returns at most 100 leases with no pagination — silently truncated. The server paginates and returns a bare array with no total, and the SDK issues a single `GET /leases` with no params and returns the one page as if complete.\n\n## Root Cause\n\n- Server `handleGetLeases` (`api/handler.go:808`) paginates via `parsePagination` (default limit 100) and returns a bare array with **no total**.\n- SDK `GetLeases` (`client/client.go:142`) issues a single `GET /leases` with no params and returns the one page as if complete.\n- Contrast `GetChain` (`client/client.go:35`), which loops over pages (pageLimit 1000, offset loop).\n\n## Verification\n\nExecuted PoC against the real `api.Handler` (httptest + fake backend):\n\n```\nGetLeases: backend=250 SDK returned=100 (silently truncated, no total in response)\n```\n\n## Note on related reports\n\nSearched `GetLeases pagination client` and `leases truncated 100 limit SDK` — no hits. Distinct from #647 (GetChain loop termination) and #390 (server ignores `?offset=` on `/blocks/recent` — different endpoint, server-side mechanism).\n\n## Suggested fix\n\nLoop over pages in `GetLeases` like `GetChain` does, or return the total/pagination metadata so callers can detect truncation.\n","patch_refs":[],"thread":[{"id":18846,"source":"desk","source_ref":"reply:16523","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-16988 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:15.009872+00:00"}]}