Commit Graph

30 Commits

Author SHA1 Message Date
Liviu
0740f2af2e D-070: AereGovernanceStaked retras in carte, cu dovada din bytecode ca nu poate detine nimic
Cheia era AereGovernanceStaked cu eticheta [@status CANONICAL] si o nota de patru
randuri deasupra. Nota spunea adevarul, dar eticheta citibila de masina spunea
contrariul, si numele nu oprea pe nimeni.

Masurat 2026-08-02 la blocul 11.967.896, cu eth_getProof, nu cu nonce-ul:
balance 0x0, codeHash 0x421a87e3...84e6, storageHash 0x269fcdee...8f496,
6.687 octeti, keccak(cod) == codeHash. owner() == Fundatia 0x0243A4...f3C3,
proposalCount() == 0.

Dovada POZITIVA din bytecode-ul desfasurat, nu dedusa dintr-o revenire goala:
mergand pe cei 6.687 de octeti ca instructiuni exista exact UN CALL, la pc 4507,
si exact UN opcode ADDRESS, la pc 4505, chiar in slotul de destinatie al acelui
CALL, cu GAS la pc 4506. In rest cinci STATICCALL si ZERO DELEGATECALL, CALLCODE,
CREATE, CREATE2, SELFDESTRUCT. Deci singurul apel care schimba stare pe care il
poate emite e address(this).call(...) catre el insusi, si nu poate exercita
niciodata onlyOwner pe ceva ce ar ajunge sa detina.

Gasit pe drum si scris in nota: staking() == 0xAbDb01d9...0DEc, adica
AereStaking_v1_DEPRECATED, nu AereStakingV2 0x1D95eF6D...55FC, si campul e
immutable, deci sursa puterii de vot nu se mai poate muta niciodata.

Retragerea e purtata in NUMELE cheii, nu doar intr-un @deprecated: TypeScript nu
face din @deprecated o eroare de tip, e doar un diagnostic de sugestie, deci o
constructie in CI ar fi ramas verde. Redenumirea e partea impusa de compilator.
Verificat: tsc --noEmit iese 0 si --listFiles arata ca addresses.ts chiar e
type-checked.
2026-08-15 14:01:26 +03:00
Liviu
319c3f5339 D-063: fabricile passkey vechi retrase in carte, cu adevarul ca nu pot fi oprite
AerePasskeyAccountFactory -> AerePasskeyAccountFactory_v1_DEPRECATED
AerePasskeyAccountFactoryV2 -> AerePasskeyAccountFactoryV2_DEPRECATED_FLAWED

Redenumirea cheii, nu doar o nota in comentariu: asa un consumator care inca
citeste numele vechi NU mai compileaza, in loc sa desfasoare in tacere un
portofel falsificabil. Plus @deprecated in JSDoc, ca editorul si typescript-eslint
no-deprecated sa il taie cu linie.

Constatarea 63 e despre fabrica V2 0x5FFa9a...4fdA, cea ale carei conturi accept
un cuvant de proprietar address(0) si o semnatura care recupereaza adresa zero.
Intrarea V1 0xfB0e...0739 era marcata CANONICAL si, mai rau, trimitea explicit
portofelele noi catre exact fabrica defecta. Ambele reparate.

MASURAT 2026-08-02, dovada pozitiva din bytecode, prin plimbarea codului viu ca
instructiuni si strangerea selectorilor PUSH4, niciodata dintr-o revenire goala:
  0xfB0e...0739  5.547 octeti, 17 selectori, createAccount(uint256,uint256,uint256)
                 0x4c1ed7f5 PREZENT
  0x5FFa9a...4fdA 9.722 octeti, 35 selectori, createAccount(bytes[],uint256)
                 0x3ffba36f PREZENT
Control negativ pe acelasi drum: un selector inventat iese absent pe toate trei.

CE NU S-A FACUT, spus ca sa nu fie confundat cu verde: niciuna dintre cele doua
fabrici nu are proprietar sau pauza, deci NU pot fi oprite pe lant. Retragerea
de aici e o poarta de documentatie, atat. Nu s-a trimis nicio tranzactie.

tsc --noEmit iese 0 dupa redenumire; nimic din sdk nu mai citea cheile vechi,
codul de portofel folosea deja AerePasskeyAccountFactoryV2Fixed.

NOTA DE ONESTITATE: fisierul asta astepta necomis din 2026-06-01 si ajunsese la
mine purtand deja 400 si ceva de linii de lucru al altor sesiuni pe cartea de
adrese. Acest commit le duce si pe acelea. Ale mele sunt strict cele doua intrari
passkey.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 14:01:26 +03:00
Liviu
067dd3d242 Dovada vie a paznicului de fereastra, rulata pe punctul de productie
Paznicul StateWindowReader exista din 2026-08-01 si are 12 teste. Testele
ruleaza pe un nod fals. Un nod fals dovedeste ca acel cod face ce a crezut
autorul; nu dovedeste ca punctul public se mai poarta cum a masurat autorul.

state-window-live.ts inchide golul. Nu e in `npm test`, fiindca o suita care
cade cand pica internetul invata oamenii sa ignore rosul. Ruleaza asa:

  npm run test:live
  npm run test:live -- https://rpc2.aere.network

Ordinea conteaza si e deliberata:
  PASUL 1 ESEC PLANTAT.    Apelul brut chiar intoarce zeroul fals.
  PASUL 2 CONTROL NEGATIV. Cu paznicii opriti, cititorul da zeroul mai departe.
  PASUL 3 PAZNICUL.        Cu paznicii porniti, refuza.
  PASUL 4 MASOARA.         Cauta marginea in loc sa creada constanta.

Adevarul e ancorat intr-un CORP de bloc, nu in stare, deci proba nu depinde de
lucrul pe care il testeaza: blocul 8.236.382 spune ca 0xbeb33d20 a semnat cu
nonce 123.063.

MASURAT azi pe ambele puncte, iesire 0:
  rpc.aere.network   511 raspunde, 512 refuzat, nonce brut la adancime "0x0"
  rpc2.aere.network  511 raspunde, 512 refuzat, nonce brut la adancime "0x0"

Si paznicul a fost dovedit ca poate sa cada. Cu cei trei paznici inlocuiti cu
cioturi care accepta tot, in dist, 5 din 12 teste trec pe rosu si suita iese cu
1. Reconstruit dupa, dist/state-window.js identic octet cu octet cu inainte.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 14:01:26 +03:00
Liviu
7287d8ad11 Licence hygiene: Apache 2.0 section 4(b) change notices, and a LICENSE where there was none
Measured by the licence gate on 2026-08-11. Three separate defects, all real:

- the two patches modify files that are the work of Hyperledger Besu and did not
  say so. Section 4(b) of the Apache License requires modified files to carry a
  prominent notice. The notice now travels in the patch message, above the ---,
  so git am puts it in the tree.
- precompiles/Address.java and precompiles/MainnetPrecompiledContracts.java are
  copies of upstream files that the patches change. They kept the upstream
  copyright header, which 4(c) requires, but carried no notice that we changed
  them. They do now.
- grants had no LICENSE at all, and sdk-js had one that was never pushed. A
  public repository with no licence grants a reader nothing.
2026-08-11 23:40:39 +03:00
Liviu
e2eba2baff Add the MIT LICENSE file the package has always declared
package.json declares "license": "MIT" and three published pages call the SDK
"MIT licensed", but the public repository carried no LICENSE file at all. The
file existed locally and was simply never pushed, so anyone who checked the
claim found nothing behind it.

Measured 2026-08-11: LICENSE returned HTTP 404 on the public repository while
the claim was live on the site. This adds the file that was always meant to be
there rather than removing the claim.
2026-08-11 20:54:32 +03:00
Liviu
b45682d578 feat(corebook): CoreBookClient + AereCoreBookClient selector fixes + AERE_COREBOOK markets gate
- CoreBookClient: full read/write surface for AereCoreBookV0 (placeGTC/IOC/
  withSlippage/Protected, cancel, claim base+quote, flushFees; bestBid/bestAsk/
  marketInfo/depth/openOrdersOf via Lens), price math mirrors (_computeQuote,
  _lockBuyFunds incl. 256-wei buffer), orderId derivation (pre-incremented
  nonce keccak), event decode for OrderPlaced/Filled/OrderCancelled/Claimed.
  Verified 63/63 against ethers v6 ground truth.
- AereCoreBookClient (pre-existing): fixed 11 wrong read selectors (bestBid,
  bestAsk, pendingSinkFee, TAKER_FEE_BPS, PRICE_TICK, LOT_SIZE, decimals
  factors, PRICE_SCALE, cancel-delay constants) - every read would have
  thrown before.
- addresses.ts: AERE_COREBOOK = { markets: {} } - founder gate, no market
  listed until explicit approval.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:44:18 +03:00
Liviu
094688d1d1 feat(addresses): 21 audit-pass-stack contracts deployed 2026-06-09
sAERE, AereSink, BugBountyVault, Sanctions/TravelRule/Forensic/ZKScreen/
AIProof/Attestation/BestEx, SettlementHub, CoinbaseSplitterV2, Agent +
AERE402Facilitator (CREATE-predicted pair), Delegate7702 + DelegationRegistry,
InsuranceFund, NavOracle, StateChannels, RaaSFactory.

Deployed via Foundation MetaMask through aere.network/deploy.html (standalone
HTML deploy page after React AdminDeploy SPA had MetaMask-mobile issues).

Pending USDC.e bridge bootstrap: CoreBookV0, LendingMarket x 6,
CompliancePool, SpokePool, Hyperlane Warp Routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 21:22:33 +03:00
Liviu
fbc6d4f68a feat(sdk): R5+R6 surfaces — CoreBook client + sAERE drip + Compliance challenge bond
New & expanded clients reflecting all R4/R5/R6 contract hardening:

- corebook/AereCoreBookClient.ts (NEW):
  - Side+TimeInForce enums; pre-computed selectors for place/placeProtected/
    placeWithSlippage/placeWithSlippageProtected/iocFill/cancel/flushFees/
    sweepDust/claim
  - read* helpers for bestBid, bestAsk, pendingSinkFee, TAKER_FEE_BPS,
    PRICE_TICK, LOT_SIZE, QUOTE_DECIMALS_FACTOR, BASE_DECIMALS_FACTOR,
    PRICE_SCALE, totalClaimableQuote/Base, per-user claimable lookups
  - computeQuote(price, qty) helper mirrors on-chain formula
  - recommendedSlippage(side, limit, qty, bps) computes maxAvgPriceWei for
    real sandwich protection — discourages naive iocFill
  - Docstrings explicitly state which entrypoint to use for crossing vs
    resting orders (R6 HIGH-5/MED-9 enforcement)

- saere/sAEREClient.ts (R5/R6):
  - atomicState() — single-call snapshot of {bal, totalAssets, undist,
    totalSupply, rewardRate, periodFinish, lastObservedBalance} eliminating
    cross-block drift in fuzz/dashboard reads
  - readUndistributed(), readRewardRate(), readPeriodFinish()
  - encodeSync() — permissionless drip refresh

- compliance/NewComplianceClients.ts (R5/R6):
  - proposeAssociationRoot + challengeAssociationRoot (bond required) +
    dismissChallenge entrypoints
  - challengeBond(), maxDismissalsPerRoot(), dismissCount(root),
    challenger(root), isKnownRoot(root), getLastRoot(), nextLeafIndex()
  - removed publishDepositRoot (R5: roots are on-chain Merkle, not pushed)
  - static computeActualLeaf helper note: leaf = keccak256(commitment, sender)
    so SDK consumers build ZK proofs against the bound leaf

- index.ts: export corebook surface

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-09 12:56:44 +03:00
Liviu
99abfff98a feat(sdk): SDK clients for the 2026-06-08 ship batch
Six new clients (dependency-free EIP-1193 wrappers, precomputed
4-byte selectors, ABI tuple/string encoders inline):

- AereAgentBondClient        — bondOf, isBonded, postBond, requestWithdraw,
                               withdraw, slash; oracle-only on slash
- AereAIReputationClient     — scoreOf, statsOf, attest (delta -1/0/+1)
- AereInferNetClient         — modelEpochCount, registerModel, commitEpoch;
                               EU AI Act Article 12 provider surface
- AereAgentMemoryVaultClient — grant, revoke, write, canReadNow,
                               permissionOf; user-owned namespace
- AereAttestationGatewayClient — publishSchema, setAttestor, attest,
                                 revoke, isValidNow, subjectCurrentlyAttested
- AereCompliancePoolClient   — deposit, withdraw, publishAssociationRoot,
                               setComplianceProvider; Privacy Pools surface

All exported from the package barrel. Zero TS errors.
2026-06-08 03:33:52 +03:00
Liviu
1917a4cd20 feat(bestex): MiCA Article 78 best-execution receipt SDK client
BestExClient (dependency-free EIP-1193 wrapper, precomputed selectors):
- caspOf / receiptNonce / issuedCount / nextReceiptId / caspIsActive
- executionLatencyMs (decision → execution latency view)
- encodeRegisterCasp / encodeSetCaspPaused (Foundation calldata)
- encodeIssueReceipt (full ABI tuple encoder with string tail)

Exports OrderType + ClientClass enums (Market/Limit/StopLoss/StopLimit/
TWAP/VWAP/RFQ/Other; Retail/Professional/Eligible) and the Receipt +
CaspRegistration types from the package barrel.

Matches the contract shipped 2026-06-08 (172/172 tests). Selector for
issueReceipt confirmed at 0x5360fb18 via keccak256 round-trip.
2026-06-08 03:33:52 +03:00
Liviu
136b95c3a4 feat(sdk): add AereSinkClient + sAereClient (Week-1 flywheel surface)
Two new typed clients for the Week-1 flywheel contracts, dependency-light
(no viem/ethers import required — accepts any EIP-1193-style provider).

src/sink/AereSinkClient.ts
  - readConfig(): all 8 immutable parameters in one batched eth_call sequence
    (AERE token, BURN_VAULT, SAERE_VAULT, DEX_ROUTER, 4 bps values, slippage cap).
  - readSplitPercentages(): convenience that returns burn/buyback/staker
    as human-readable percentages.
  - encodeFlush(token, amount): calldata for the integrator-side flush call.
  - encodeSweepDust(token): calldata for the permissionless dust-sweep.

src/saere/sAEREClient.ts
  - readVaultState(): live snapshot — underlying address, totalAssets,
    totalSupply, pricePerShare, decimals.
  - balanceOf(user): per-user sAERE share balance.
  - convertToAssets / convertToShares: round-trip conversion helpers.
  - encodeDeposit / encodeWithdraw / encodeRedeem: ERC-4626 write calldata.

Both clients precompute 4-byte function selectors at module load so the
SDK doesn't depend on a keccak helper. ABI-encoded address and uint
arguments built manually so consumers can use this with either a
high-level library (viem, ethers) or raw fetch against rpc.aere.network.

Re-exported from src/index.ts under 'export * from sink/saere' so the
SDK keeps a single import path.
2026-06-08 03:33:52 +03:00
AERE Foundation
88626e43ae v0.16.1 — Tier 1.14–1.16 additions, Tier 1.17 reverted (AereUSDC removed)
Tier 1.11 sub-second blocks (no new contracts), Tier 1.14 zkVerifier stack (SP1 gateway + Plonk + RISC Zero router + AereProofRegistry), Tier 1.15 passkey wallets v1, Tier 1.16 Universal Login v2 (MultiOwnable + ERC-4337 + EIP-1271 + Foundation relayer).

Tier 1.17 AereUSDC + AereBridge were deployed without explicit approval and removed same day. AERE remains the only token on chain 2800.
2026-06-01 14:58:41 +03:00
Liviu
2b966e5cd3 v0.13.0 — Tier-1.10 Fee Monetization (devs + Foundation treasury) 2026-05-31 20:28:51 +03:00
Liviu
d7e25d13e6 v0.12.0 — Tier-1.9 batch-auction DEX (CoW-style) 2026-05-31 20:13:54 +03:00
Liviu
8f21df96d2 v0.11.0 — Tier-1.8 coinbase splitter (37.5% burn flow) 2026-05-31 19:37:23 +03:00
Liviu
aef6eb0ccd v0.10.0 — Tier-1.7 drand randomness (AereRandomnessBeacon + AereDrandConsumer) 2026-05-31 18:45:23 +03:00
Liviu
78d1437d55 v0.9.0 — Tier-1.6 oracle stack (AerePyth + AereOracleAdapter) 2026-05-31 17:40:56 +03:00
Liviu
5cdb4cb1ce v0.8.0 — Tier-1.5 intent cross-chain (AereSpokePool + AereERC7683) 2026-05-31 13:28:26 +03:00
Liviu
765d6a7440 v0.7.0 — Tier-1.4 cross-chain messaging stack (AereMessenger + AereIGP) 2026-05-31 13:12:58 +03:00
Liviu
e0104594f8 v0.6.0 — paymaster stack (EntryPoint + 4 paymasters) for gasless UX 2026-05-31 12:56:30 +03:00
Liviu
68a81dc2ba v0.5.0 — Fusaka activated; Pectra+Fusaka parity with Ethereum mainnet 2026-05-31 12:44:00 +03:00
Liviu
6436157753 v0.4.0 — Pectra ruleset live on chain 2800 (EIP-7702, EIP-2537, EIP-2935 + Cancun) 2026-05-31 04:00:39 +03:00
Liviu
49ab3a42e0 v0.3.3 — remove AereUSD/dUSD + AereLending (AERE is the only token) 2026-05-31 02:48:01 +03:00
Liviu
fe3af609a3 v0.3.2 — add AereMiningDistributor (Merkle-claim AireFlow payouts) 2026-05-31 01:58:00 +03:00
Liviu
498f5de716 v0.3.1 — add Tier-1 DeFi contracts (FeeBurnVault, YieldFarm, AereUSD, Lending) 2026-05-31 01:43:24 +03:00
Liviu
2b89126004 v0.3.0 — align with live 16-contract mainnet (genesis-v2)
- addresses.ts: full canonical 16-contract manifest
  - Add AereGovernanceStaked, AereLockedStaking, AereSwapFactory,
    AereBridge, AereMiningSubscription, AereNFT, AereNFTMarketplace
  - Remove references to undeployed contracts (Lending, Stable,
    LightningChannels, AA stack, etc.) — moved to roadmap section
- client.ts: prune handles for undeployed contracts; rename
  staking->lockedStaking with correct AereLockedStaking ABI
  (stake/unstake/lockCount/getLock)
- README.md: rewrite as canonical manifest for BVI legal opinion
  — network parameters, genesis allocation, all 16 contract
  addresses + purposes, roadmap of NOT-deployed subsystems
- package.json: bump 0.2.1 -> 0.3.0, add ./addresses subpath export
2026-05-31 00:53:47 +03:00
architect
fc5f9562b9 v0.2.1 — add AereAirdrop to address book 2026-05-03 17:26:09 +03:00
architect
0e0f669459 Address book sync — add Airdrop + InsurancePool + Multicall 2026-05-03 17:21:48 +03:00
architect
38ccaaad4e v0.2.0 — add AA stack, NameService, Router, dUSD, MultiSig, Vesting, Subscriptions, Launchpad, InsurancePool, Multicall, TWAP 2026-05-03 17:17:55 +03:00
architect
83f837b9b0 Initial @aere/sdk v0.1.0 — typed contract clients for AERE L1 2026-05-03 16:09:06 +03:00