今日已更新 76 条资讯 | 累计 32406 条内容
关于我们

标签:#bloc

找到 89 篇相关文章

AI 资讯

Clean Architecture in Flutter with BLoC: A Practical Guide

Clean architecture in Flutter is the single biggest reason the production apps I ship stay maintainable after a year of feature churn. Over 4+ years building iOS and Android apps, I've watched "just put the logic in the widget" turn setState spaghetti into a codebase nobody wants to touch. This guide walks through how I actually split a Flutter app into domain , data , and presentation layers with BLoC — using one concrete feature so you can copy the structure into your own project today. I'll build a small "Todos" feature end to end: an entity, a use case, a repository with a DTO mapper, and a Cubit that drives the UI. The point isn't the todo list — it's the boundaries between layers and why each one earns its keep. Why clean architecture in Flutter pays off The core idea is the dependency rule : source-code dependencies point inward . The UI knows about the domain; the domain knows about nothing. Your business rules never import Flutter, Firebase, Dio, or Supabase. That inversion buys three things I care about on every project: Testability. Domain logic runs in plain Dart unit tests — no widget pump, no emulator, no network. Swappable infrastructure. Move from REST to GraphQL, or Firestore to a local SQLite cache, by rewriting one data-layer class. The domain and UI don't change. Parallel work. Once the domain contract exists, one person builds the API client while another builds the screen against a fake. Here's the layer breakdown I use, and what's allowed to live in each: Layer Knows about Contains Depends on Domain Nothing external Entities, repository interfaces , use cases Pure Dart only Data Domain + the outside world DTOs, mappers, repository implementations , data sources Domain Presentation Domain Blocs/Cubits, states, widgets Domain Notice the data and presentation layers both depend on domain, and domain depends on neither. That's the whole game. Folder structure that scales I organise by feature first, then by layer . A flat models/ , services/ , scr

2026-08-16 原文 →
AI 资讯

Who’s Tracking You? Use This New Service to Find Out

It can be daunting to determine who's responsible for showing ads on the websites we visit, or who's harvesting data from the mobile apps we use every day. That information is already semi-public, but it is not easily parsed and traditionally much of it has remained walled away in the hands of large advertising platforms. Not anymore: A powerful and free new service called DecryptAds scrapes and correlates this adtech data and makes it simple to quickly learn a great deal about the entities that are tracking you.

2026-08-14 原文 →
AI 资讯

MetaMask launches its agent wallet, Glamsterdam Testnet goes public, a lattice-crypto attack draws doubt, NEAR Intents unifies liquidity

Welcome to our weekly digest, where we unpack the latest in account and chain abstraction and the broader infrastructure shaping Ethereum. This week: MetaMask launches a self-custodial wallet built for AI agents; Ethereum core devs send Glamsterdam to a public testnet while Frame Transactions pick up client support for Hegota; a new quantum attack on lattice-based cryptography draws quick skepticism; and NEAR Intents grows into a single cross-chain liquidity layer. MetaMask Launches Its Agent Wallet Glamsterdam Testnet Goes Public as Hegota Advances A Lattice-Crypto Attack Draws Doubt NEAR Intents Becomes a Unified Liquidity Layer Please fasten your belts! MetaMask Launches Its Agent Wallet MetaMask launched its Agent Wallet , a self-custodial wallet built for AI agents to execute onchain actions inside rules the user sets. It lets traders and builders connect an agent framework, then define spend limits, allowlisted protocols, and a risk profile before the agent acts. The pitch is that safety is the product. Agent Wallet is not blind delegation, so supported transactions pass through MetaMask’s security pipeline, including transaction simulation, Blockaid-powered threat scanning, and MEV protection, and anything outside policy pauses for two-factor approval. Users pick between two modes. Guard Mode, the default, enforces daily spend limits, allowlists, and human approval for out-of-policy actions, while opt-in Beast Mode reduces approval interruptions but still runs security checks and still stops flagged transactions. On capabilities, agents can connect frameworks like Claude Code, Codex, and Cursor and execute across HyperLiquid and EVM chains such as Robinhood and Monad. They can run ERC-7821 batch swaps, and they never need a chain’s native gas token, since MetaMask settles the fee in the token being moved. This is account abstraction in a very practical form. Spend limits, allowlists, gasless execution, and batching are exactly the programmable account feature

2026-08-13 原文 →
AI 资讯

TRON’s USDT Growth Is Changing What Developers Build Around

TRON processed $2.1 trillion in USDT transfers during Q2 2026, according to Messari. During the same quarter, circulating USDT on TRON reached $87.9 billion, putting it ahead of Ethereum. Those numbers point to something developers working with stablecoins have to consider more carefully: the blockchain underneath a token can shape the entire payment experience. USDT on TRON uses the TRC-20 token standard. That means a USDT transfer is a smart contract transaction rather than a native TRX transfer. The wallet signs the transaction, the network executes the token contract and the resulting balance change is recorded on-chain. For an application accepting USDT, this creates several technical requirements. The system needs to identify the correct token contract, monitor the relevant transfer events and wait for sufficient confirmation before crediting the user's balance. Checking the address balance alone is not enough. TRON's developer documentation provides APIs for retrieving TRC-20 transaction history and filtering transfers by contract address. A payment system can use this data to monitor incoming USDT deposits and associate them with the correct customer account. The transaction also has a resource cost. TRON uses Bandwidth and Energy to process transactions. Regular transactions consume Bandwidth, while smart contract execution requires Energy. When an account does not have enough available resources, TRX is burned to cover the remaining cost. This creates an operational detail that users may never see. Someone can hold USDT in a wallet and still need TRX to send it. A payment provider can handle this in several ways. It can maintain TRX balances, stake TRX for resources or use delegated Energy. Another design can leave the requirement with the user. The choice affects the product. The amount of Energy required can also change depending on the destination account. TRON's documentation notes that a USDT transfer to an address that already holds USDT generally re

2026-08-11 原文 →
AI 资讯

Idempotent File Anchoring: SHA-256 Dedup Before You Call the API

Building any intake pipeline, you'll hit the same problem eventually. Files arrive from multiple sources. Some you've already processed: re-uploads of the same document, copies from two different intake paths, items your worker errored on last run and re-queued. Call the anchoring API blindly and you end up with multiple proof records for identical bytes. The ProofLedger v1 API returns a duplicate_of field in its 201 response when it detects a hash it's already seen. But that's only half the solution. A network round-trip costs time and quota even when it comes back as a duplicate. Hash-based local deduplication is the other half. Here's how to build a worker that handles both layers. Hash Locally First The core pattern: compute the SHA-256 digest before making any API call. If you've seen this digest before, skip it. If you haven't, submit it. Two things you need: a persistent record of digests you've already anchored, and chunked hashing so large files don't blow memory. import hashlib import json from pathlib import Path SEEN_DB = Path ( " anchored_hashes.json " ) def load_seen (): if SEEN_DB . exists (): with open ( SEEN_DB ) as f : return json . load ( f ) return {} def save_seen ( db ): with open ( SEEN_DB , " w " ) as f : json . dump ( db , f , indent = 2 ) def hash_file ( path : str ) -> str : h = hashlib . sha256 () with open ( path , " rb " ) as f : for chunk in iter ( lambda : f . read ( 65536 ), b "" ): h . update ( chunk ) return h . hexdigest () 65536-byte chunks keep memory flat regardless of file size. The load_seen / save_seen pair gives you a persistent record that survives worker restarts. Submitting and Reading duplicate_of When duplicate_of appears in the API response, its value is the proof ID of the earliest anchor for that hash. That's the canonical ID. The new proof ID from this call is irrelevant. import requests API_URL = " https://proofledger.io/api/v1/proof " API_KEY = " sk_YOUR_KEY_HERE " def anchor_file ( file_path : str , seen : dict

2026-08-10 原文 →
AI 资讯

When Crypto Price Charts Learned to Sing: Building Real-Time Sonification for 1400+ Trading Pairs

I never intended to create an audio trading app. It happened by accident during a particularly frustrating week where my eyes couldn't keep up with fourteen monitor windows simultaneously. I was watching BTC oscillate around $62k while SOL dropped another 0.92%, and my brain just... seized. Too many numbers. Too much noise. What if instead of looking, I listened ? That question led me down a rabbit hole called sonification—the practice of converting data into sound. Today, August 2026, I'm running Confrontational Meditation®, and we're sonifying real-time price movements across 1400+ cryptocurrency pairs. It's unconventional. It's chaotic. It's also the clearest way I've ever understood market movement. The Problem With Eyes Traditional charting is exhausting. You stare at candlesticks, watch moving averages, monitor volume bars. Your visual cortex becomes the bottleneck. Traders develop tunnel vision literally—focusing so hard on one chart that you miss the market context around it. When BICO spiked +28.57% today while VIC crashed -19.19%, the traditional trader has to toggle between windows. The audio listener hears it all at once . Sonification inverts this problem. Your auditory system evolved to detect patterns in sound simultaneously across a frequency spectrum. A symphony has dozens of instruments playing at once, and you parse it instantly. The same neurobiology applies to price sonification. How We Map Markets to Music At Confrontational Meditation®, each cryptocurrency generates a unique tonal signature: Pitch correlates to price. Higher prices = higher frequencies. Lower prices = lower frequencies. Volume (loudness) reflects trading volume. Silent = illiquid. Loud = significant volume. Timbre is determined by asset class or volatility profile. BTC gets a warm, stable tone. Volatility assets like PIVX (down -23.94% today) get harsh, bright timbres. Here's the core logic I built for price-to-frequency mapping: const mapPriceToFrequency = ( currentPrice , pr

2026-08-10 原文 →
AI 资讯

Nodes and Networks: How Blockchains Actually Stay Decentralized

When someone says "Bitcoin has over 15,000 nodes worldwide," they mean 15,000+ independent computers are each running Bitcoin software and each maintaining their own full copy of the blockchain. No server owns the truth. Every node checks it for itself. That single fact — every node independently verifies every transaction and block against protocol rules — is the reason blockchains don't need a central authority. If one node tries to cheat, the rest simply ignore it. There's no admin account to compromise because there's no admin. Not All Nodes Do the Same Job Full Node Downloads and stores the entire blockchain, every block since genesis, and independently validates everything against consensus rules. Highest security ~500 GB for Bitcoin ~1 TB for Ethereum This is the backbone of network security. A full node doesn't trust anyone's summary of the chain; it recomputes validity itself. Light Node (SPV) Stores only block headers, not full transaction data. Uses Merkle proofs and relies on full nodes to verify transactions. Low storage, ~50 MB Trusts full nodes for verification What most mobile wallets run Mining/Validator Node A full node that also participates in block creation. Miners (Proof of Work) solve computational puzzles; validators (Proof of Stake) stake cryptocurrency as collateral. Both earn rewards for securing the network. Creates new blocks Earns rewards Requires specialized hardware (PoW) or capital at stake (PoS) Archive Node Everything a full node stores, plus historical state at every block height. Complete history ~15+ TB for Ethereum Used by explorers, analytics platforms, and enterprise tooling Why Peer-to-Peer Instead of Client-Server A traditional web service is client-server: your browser requests data from a company's servers. If those servers go down, the service is unavailable. That's a single point of failure by design. Blockchain networks use peer-to-peer (P2P) architecture instead. Every participant is simultaneously a client and a serv

2026-08-10 原文 →
AI 资讯

We generated ~32,000 self-contained build prompts for Midnight (and learned the hard way)

We generated ~32,000 self-contained build prompts for Midnight Midnight is a zero-knowledge L1: private state stays on the user's device, public state lands on chain, and the bridge between them is a circuit you write in a language called Compact. It's genuinely interesting technology. It also has one of the harshest first hours I've met in web3. Not because the concepts are hard. Because the environment is. A hackathon dev sits down with a good idea and spends the next four hours on: a package set where @midnight-ntwrk/midnight-js-* , the proof server Docker tag, the ledger, and the wallet SDK all have to agree on a version, or nothing works; a local proof server that needs Docker, which on Windows needs WSL2, which needs virtualization enabled in BIOS; WASM + top-level await + a missing Buffer polyfill, which together turn any SSR framework into a wall of stack traces; a testnet wallet with no tDUST and no obvious way to get any. None of that is the idea. All of it is tax. So we built Creative Midnight — a site whose entire job is to collapse that first hour into a copy-paste. This post is about how the prompt generator works, what the numbers actually are, and the failure modes we hit in the reference builds, with the fix for each. What the site is Three things, in order of usefulness: 1. 1,996 hackathon ideas. Ten creative disciplines — dance, music, visual art, video, photography, writing, film & animation, games, theater, fashion — each with a market anchor and a "quantum hook" (the private-state mechanic that makes ZK actually load-bearing rather than decorative). 996 of those are base ideas; the other 1,000 are agentic-commerce overlays (A2A/AP2 agent negotiation, UCP ZK-checkout, x402 paywalls with a mimic USDC), distributed across the same themes so you can filter within a discipline. 2. A build prompt per idea, per network. Not a stub — a multi-thousand-line, fully self-contained prompt that includes the pinned package set, the Compact toolchain commands,

2026-08-10 原文 →
AI 资讯

Redbelly Network Troubleshooting Guide: 22 Common Developer Errors and Their Fixes

description: "Fixes for the 22 errors developers hit most often on Redbelly Network — RPC and chain ID conflicts, MetaMask setup, USD-pegged gas, permissioned-network reverts, Hardhat deployment, Routescan verification, and the Eligibility SDK." tags: blockchain, web3, ethereum, solidity canonical_url: https://dev.to/isaac_atunbi_c2ed2489e89c/redbelly-network-troubleshooting-guide-22-common-developer-errors-and-their-fixes-1g26/edit cover_image: published: true Redbelly Network Troubleshooting Guide 22 common developer errors, with the exact command that fixes each one. Redbelly Network is an EVM-compatible L1 built for compliant asset tokenisation. "EVM compatible" gets you most of the way, but three things about Redbelly are genuinely different from every other EVM chain, and they account for most of the time developers lose here: It is a permissioned network. An address that has not claimed a network access credential cannot write to the chain. Transactions from it fail in a way that looks like an ordinary revert. Gas is priced in US dollars, not gwei. eth_gasPrice returns roughly 165,000 gwei . That is about four orders of magnitude above Ethereum, it is correct, and it breaks any tool with a hardcoded fee cap or a "that can't be right" sanity check. The two official documentation sites disagree with each other , including on the mainnet chain ID. One of them is stale. Every entry below follows the same shape — Symptom → Root Cause → Solution → Prevention — and every command is copy-pasteable. Every chain ID, URL, contract address and package name was read from a live source on the date in the footer, not from memory. Sources read: 8 August 2026. Every chain ID, URL, contract address and package name below was read from a live source on that date and is traced in sources.md . Execution status: the fixes here are derived from those sources and from the documented behaviour of the tooling; they have not yet been executed end-to-end against Redbelly Testnet . A ver

2026-08-08 原文 →
AI 资讯

Zero Knowledge Proofs: How to Win Every "Trust Me Bro" Argument With Math

A tutorial where you prove things without revealing things, and yes, the math actually maths. Here's something the internet doesn't want you to know: you overshare every single time you prove something. Prove you're over 21 at a bar? You hand over a card with your name, your address, your height, and your terrible 2019 haircut. Prove your income to a landlord? Here's every transaction I've made since college, please don't judge the 3am food delivery. We built the entire digital world on a verification model that boils down to "here's everything, trust me bro." Not anymore. There's a branch of cryptography that lets you prove a statement is true while revealing nothing else . It sounds fake. It's called a zero knowledge proof , and by the end of this article you'll understand one well enough to check it with Python. Then we'll look at Midnight , a blockchain that turned this party trick into a developer platform. Let's go. 🚀 🪪 The Trust Me Bro Problem Every verification system you use today works by disclosure . You prove things by showing the underlying data: Prove your age ➡️ show your whole ID Prove you can pay ➡️ show your bank statements Prove you're a real user ➡️ solve a CAPTCHA and sacrifice your data to the algorithm gods The data doesn't just get seen . It gets stored , and eventually it gets breached , and then a guy named xX_darkweb_Xx is selling your identity for the price of a burrito. The verifier never needed the data. They needed one bit of information : true or false. Everything else was collateral damage. In short: we've been answering yes or no questions with our entire life story. 🕵️ The Party Trick That Started It All Zero knowledge proofs let a prover convince a verifier that a statement is true without revealing why it's true. The classic example is Where's Waldo. Say I claim I found Waldo on the page and you don't believe me (fair, you've seen my code reviews). I could point at him, but then I've revealed the answer and ruined the puzzle. Ins

2026-08-08 原文 →
AI 资讯

BIP 110 and the Cost of Policing Bitcoin's Block Space

Originally published by InvisibleHill Research . This cross-post preserves the original research cut-off and source list. Research cut-off: July 30, 2026. Miner signaling is a live metric and may have changed after publication. BIP 110 begins with a problem that many Bitcoin users can recognize. A miner can collect a one-time fee for including an image, token payload, or other arbitrary data, while thousands of node operators absorb the cost of downloading, validating, and sometimes storing it. The proposal's authors see that mismatch as a subsidy for data storage and a threat to Bitcoin's use as money. Their answer is a temporary soft fork. For about one year, BIP 110 would make several currently valid transaction structures invalid under consensus rules. It would cap OP_RETURN outputs at 83 bytes, limit many data pushes and witness items to 256 bytes, restrict large output scripts and Taproot control blocks, and disable several Taproot upgrade paths and script features that can carry data. Adam Back agrees with the premise more than his opposition sometimes suggests. He has said that Bitcoin is about money and that spam has no place in its timechain. He also designed Hashcash to make spam costly. His objection is to the remedy. In Back's view, an annoyance that fits inside Bitcoin's existing block limit does not justify a contentious consensus change, especially one that can be bypassed, can interfere with legitimate scripts, and has not earned technical or economic agreement. That distinction is the center of the debate. BIP 110 asks whether Bitcoin should discourage an unwanted use through local policy and fees, or declare some forms of that use invalid for everyone. Back's case is stronger on this question. The proposal identifies a real externality, but it offers an asymmetric bargain: incomplete filtering in exchange for a new consensus precedent, a more complicated upgrade path, and a material risk of a minority chain. A policy dispute became a consensus pro

2026-08-08 原文 →
AI 资讯

🧹 From Urban Gardens to Clean Streets: Building a Decentralized Robot Ecosystem with MyZubster and Monero"

What started as a vision for mapping urban gardens has evolved into something much bigger. Over the past weeks, we've built a complete decentralized ecosystem that connects IoT sensors, robots, and communities using Monero (XMR) and MYZ tokens. The Journey: From Gardens to Streets It all began with a simple idea: create a map for urban gardens. But we quickly realized that a map alone wasn't enough. We needed a full system that could: Monitor soil health in real-time Automate irrigation and analysis Enable private, decentralized payments Connect communities and institutions Here's what we built. 🗺️ The Urban Garden Map Using Leaflet.js and a REST API, we created an interactive map where anyone can register their urban garden. The map supports: Geolocation with /nearby endpoint Full CRUD operations for gardens Search by name and city Check it out: Live Demo 📡 Arduino Sensors for Smart Agriculture We integrated Arduino sensors to monitor soil conditions in real-time: pH (0-14 scale) EC (Electrical Conductivity) Temperature and Humidity The data flows through Node.js APIs and is stored in MongoDB, making it accessible for analysis and reporting. 🦾 The Robot Ecosystem We built a family of software robots that can receive payments automatically in MYZ and XMR: 1. AgricoloBot - The Garden Assistant Monitors soil health Generates automatic reports Provides recommendations for farmers 2. Robot Arm - The Physical Gardener 4 DOF (Degrees of Freedom) Controlled via WebSocket Can water, plant, analyze, and harvest 3. CleanStreetBot - Street Cleaning Robot Reports waste with geolocation Automates zone cleaning Generates reports for municipalities 4. RecicloBot, PuliziaBot, CompostBot - Recycling and Waste Management Monitor containers and optimize collection routes Track composting and organic waste management 💰 Decentralized Payments with Monero and MYZ All robots receive automatic payments through an escrow system: 85% → Robot owner 2% → MyZubster platform 8% → Bosco Community

2026-08-06 原文 →
AI 资讯

solSafe

I sell Solana token facts for two cents a call, and refuse to give an opinion While building this I ranked a token's trading pairs by pool depth, which seemed obviously correct. It picked JUP's biggest pool — quoted in an obscure token — and reported a price of $943 against a real price of about $0.19. A 5000x error that would have silently poisoned everything downstream. Depth doesn't make a derived price trustworthy; what it's quoted against does. That bug is why the service now always prefers SOL/stablecoin-quoted pairs, and says so explicitly when the best available pair is still exotic. That's the whole design philosophy. solsafe returns measured values — mint and freeze authority, holder concentration, pool depth and age, pump.fun origin — and never a score, signal, or recommendation. You can reproduce every field against your own RPC. An opinion can be wrong in ways a null mint authority cannot. The other unusual part is billing. It's paid per request over x402: call it, get a 402 with machine-readable payment instructions, pay in USDC on Base, retry, get JSON. No API key, no signup, no dashboard — which is the point, because the intended caller is an autonomous agent that can't complete a signup flow. $0.02 for the raw facts, $0.15 for a written brief explaining them. Things I'd rather say up front than have you discover: holder concentration is permanently unavailable for the most widely held tokens, because Solana's RPC refuses that query outright. A failed or partial call isn't charged. And demand for this is entirely unproven — agent-native payments are early, and I might be wrong that anyone wants it. Code: github.com/newbieBuilderr/solsafe

2026-08-03 原文 →
AI 资讯

Building a browser game with client-side Groth16 proofs

A smart contract can't tell whether a submitted score came from a valid game or was simply made up. Dario Dash handles that by proving the run itself. I have been building Dario Dash , a small endless runner on Dusk. The game runs in the browser and does not require a wallet to play. After a ranked run, the browser can generate a Groth16 proof locally and submit the score to a smart contract. The contract does not trust the submitted score. It accepts it only after verifying the proof, binding it to the transaction sender and checking that the run seed has not already been used. The source is available on GitHub . What actually needs to be proven? A score by itself says almost nothing. A client could simply submit any number it wants. For Dario Dash, a valid run includes much more than the final score: the player movement and jump timing the seed-derived obstacle schedule obstacle clearance and collision windows item pickups damage and game-over conditions fireball kills transitions between Regular, Super, Fire and Cape forms the number of ticks played the resulting score The proof must establish that these rules were followed from the initial state until the claimed final state. It also needs to bind the run to the account submitting it, otherwise somebody could copy another player's proof. The architecture The repository is split into a few layers: dash_zk contains the deterministic game simulation used by the browser proving path. dash_core contains a separate 60 Hz simulation used by the RISC Zero path. dash_web exposes the Rust simulation to the browser through WebAssembly. zk_browser contains the Circom circuit and the JavaScript proof conversion code. contract verifies the proof and maintains the leaderboard on Dusk. web contains the playable Vite application. The important boundary is that the game logic is deterministic and integer-only. Floating point physics would be a mess to reproduce consistently across JavaScript, WebAssembly, the proof circuit and th

2026-07-27 原文 →
AI 资讯

Building Atomic Cross-Border Settlement on Stellar

Building Atomic Cross-Border Settlement on Stellar: The AnchorFX Story A technical deep-dive into Soroban escrow contracts, FX oracles, and mainnet deployment — from testnet prototype to production. se The Problem Cross-border payments still take 3-5 days and cost 6.5% on average. Correspondent banking chains are slow, opaque, and expensive. The $800B remittance market has no atomic settlement layer. Stellar was purpose-built for this. 5-second finality. Built-in DEX. Path payments at the protocol level. And now, with Soroban smart contracts, programmable settlement. AnchorFX is an open-source protocol that combines these primitives into trustless, atomic FX settlement between regulated financial anchors. Two Soroban contracts — an Escrow Factory and an FX Rate Oracle — communicate via cross-contract calls to lock, rate, and settle funds in a single atomic flow. Architecture Sender → [Escrow Contract] → Receiver │ [Oracle Contract] │ FX Rate Data Contract 1: Escrow Factory (995 lines, 23 tests) The escrow contract is a multi-escrow factory with per-escrow storage. Each escrow goes through a defined lifecycle: Created — Sender locks tokens with a timeout and settlement conditions CounterpartyApproved — Receiver signs off on the terms Settled — Admin releases funds at the locked FX rate Refunded — Sender reclaims after timeout expires Cancelled — Admin cancels (circuit breaker) pub fn create_escrow ( env : Env , sender : Address , receiver : Address , token : Address , amount : i128 , timeout_blocks : u32 , corridor : u32 , ) -> u64 { sender .require_auth (); // Read oracle rate at creation time — locks the rate let oracle_addr = env .storage () .instance () .get ( & ORACLE_KEY ) .unwrap (); let rate : u64 = env .invoke_contract ( & oracle_addr , & symbol_short! ( "get_rate" ), ... ); // Store escrow with locked rate // ... } Key security decisions: Per-escrow storage — O(1) reads, independent TTL per escrow Checks-effects-interactions — state saved before token trans

2026-07-26 原文 →
AI 资讯

Hunter-Base-Intelligence: Building a Local On-Chain Scanner & Paper-Trading Engine for Base EVM 🚀

Hello DEV Community! 👋 I wanted to share my latest open-source project: Hunter-Base-Intelligence (v17 Plus). It is a fully local-only cryptocurrency intelligence dashboard that scans DEX tokens on the Base blockchain, scores them using a multi-factor logic, and simulates a paper-trading shadow portfolio. 🛡️ Why Local-Only? Most on-chain analytics tools require sensitive private keys, leak user data, or rely heavily on slow, paid external infrastructure. I engineered this tool to be fully local —it requires no wallets, no seed phrases, and sends your data nowhere. Pure local analysis using Python , Flask , and SQLite . ⚙️ How It Works (Core Architecture) The ecosystem runs on a continuous ~60-second scan cycle: scanner.py : Discovers active and newly created tokens using DexScreener, BaseScan, and direct EVM RPC factory logs. scorer.py : Every token is evaluated across 6 independent dimensions (Momentum, Manual Trade Feasibility, Execution Reality, Money Flow, Multi-Timeframe Pulse, and Composite Rank). hunter_court.py : A proprietary "Court" analytics engine that runs a risk-free paper-trading shadow portfolio with realistic gas, fee, and slippage simulation. It evaluates its own past decisions to continuously calibrate scoring thresholds! 📊 System Features Adaptive Exit Parameters: Automated position sizing and execution simulation ( exit_engine.py ). System Guardian: Keeps the system running 24/7 with auto-restart on crashes and automatic local database backups ( system_guardian.py ). Beautiful Dashboard: Clean, real-time local web interface for tracking active simulated trades and market analytics. 📂 Explore and Contribute The project is licensed under the MIT License and is open for contributions. Whether you want to optimize the scoring algorithms, expand the web API endpoints, or improve the dashboard frontend, feel free to dive in! 👉 Check out the Repository here: https://github.com/shbadrconsulting-source/Hunter-Base-Intelligence I would love to hear your fe

2026-07-26 原文 →
AI 资讯

Why I Chose Slot Hashes Over VRF for Fair Random Selection on Solana

When I set out to build a provably-fair random selection system on Solana, the obvious choice for randomness was a VRF (Verifiable Random Function). Instead, I built the system around Solana's SlotHashes sysvar with a commit-reveal scheme. Here's why, and what I gave up to get there. The problem A fair-selection system needs a winner (or set of winners) chosen in a way that's fair, and just as important that participants can check for themselves without taking anyone's word for it. VRF services (Switchboard, ORAO, etc.) solve the fairness part well: they produce randomness that's unpredictable in advance and cryptographically provable after the fact. But they come with a dependency on an oracle, a fee per request, and a proof that most users will never actually verify they'll trust it because the crypto math says they can, not because they did. I wanted something a participant with no crypto background could check in a browser console. The approach: commit-reveal with slot hashes The core idea: commit to the participant list before you know the randomness, then derive the randomness from a slot hash you couldn't have predicted at commit time. rust fn derive_randomness(target_hash: &[u8; 32], participant_root: &[u8; 32]) -> [u8; 32] { let mut combined_seed = [0u8; 64]; combined_seed[..32].copy_from_slice(target_hash); // slot hash at reveal combined_seed[32..].copy_from_slice(participant_root); // Merkle root, locked at commit solana_keccak_hasher::hash(&combined_seed).to_bytes() } The flow: Commit: participant list is finalized and hashed into a Merkle root; this is written on-chain. Wait: a target slot in the future is chosen as the reveal point. Reveal: once that slot passes, its hash is pulled from SlotHashes and combined with the committed root to derive the randomness. Select: the randomness deterministically picks winners from the participant set; winners get their own Merkle root and proofs. Every draw ends up with an audit record like: rust pub struct AuditR

2026-07-24 原文 →
AI 资讯

AI agents are about to rediscover the oldest risk in modern finance

On 26 June 1974, German regulators withdrew the banking license of Bankhaus Herstatt, a mid-sized bank in Cologne, in the middle of the trading day. The timing is what made it famous. Herstatt's FX counterparties had already irrevocably paid the Deutsche Mark legs of that day's trades in Frankfurt. The corresponding dollar legs were due to settle hours later in New York. They never did. Banks that had done nothing wrong except pay first were left holding losses on trades that were half-settled: one leg complete, one leg gone. The episode was significant enough to name a category of risk - settlement risk, still called Herstatt risk - and it pushed the G10 central banks to form the Basel Committee on Banking Supervision later that same year. Here is the part worth sitting with: the actual fix took 28 years. The fix was a central utility CLS launched in 2002 with one job: settle FX trades payment-versus-payment. Both legs of a trade settle simultaneously, or neither does. There is no window in which one side has paid and the other has not. It works - CLS settles on the order of trillions of dollars a day - and it is the reason a Herstatt-style failure has not repeated at scale in the currencies it covers. But look at the shape of the solution. To make two legs atomic, traditional finance built one institution that every major bank trusts, connected the world's main currencies to it, and routed the trades through it. Atomicity was achieved by adding the most systemically important middleman in the history of payments. That was probably the only option available to 1990s banking infrastructure. It is not the only option available now. The agent economy is still in its payments era A study published last week by Keyrock, run with Coinbase and Tempo, put numbers on machine-to-machine commerce: 176 million transactions, $73 million settled between May 2025 and April 2026, average transaction size around $0.31. Those numbers describe a payments economy. A payment is a singl

2026-07-22 原文 →