<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: André Dias Moreira Prol</title>
    <description>The latest articles on DEV Community by André Dias Moreira Prol (@andr_diasmoreiraprol_b).</description>
    <link>https://dev.to/andr_diasmoreiraprol_b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3981581%2F9270a998-843c-4b70-855f-acd08f8f8580.jpg</url>
      <title>DEV Community: André Dias Moreira Prol</title>
      <link>https://dev.to/andr_diasmoreiraprol_b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andr_diasmoreiraprol_b"/>
    <language>en</language>
    <item>
      <title>André Dias Moreira Prol explains: Stellar's FBA Consensus Beyond PoS</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Thu, 05 Nov 2026 13:01:25 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-stellars-fba-consensus-beyond-pos-mf7</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-stellars-fba-consensus-beyond-pos-mf7</guid>
      <description>&lt;p&gt;When people ask me why I bet my career on Stellar, my answer rarely starts with tokens or price charts. It starts with a quieter revolution: the way Stellar reaches agreement across a global network without burning a small country's worth of electricity. After two decades building IT infrastructure and exploring blockchain forensics, I, André Dias Moreira Prol, have learned that consensus is where a network's real values live. And Federated Byzantine Agreement (FBA) tells a very different story than the Proof-of-Stake narrative most people know.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why FBA Is Not Just "Another PoS"
&lt;/h2&gt;

&lt;p&gt;Proof-of-Stake solves the Byzantine Generals Problem through economic weight: the more you stake, the more influence you earn. It works, but it quietly concentrates power around capital. Validators with the deepest pockets shape the chain.&lt;/p&gt;

&lt;p&gt;Federated Byzantine Agreement, formalized in the Stellar Consensus Protocol (SCP) by David Mazières, takes another road. Instead of asking "who has the most money?", it asks "who do &lt;em&gt;you&lt;/em&gt; trust?". Each node defines its own &lt;strong&gt;quorum slices&lt;/strong&gt;—small sets of validators it considers reliable. Agreement emerges when these overlapping slices create network-wide &lt;strong&gt;quorum intersection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There is no mining, no staking lottery, no block reward inflation. In my own forensic analysis of distributed systems, this distinction is profound: trust in Stellar is &lt;em&gt;expressed&lt;/em&gt;, not &lt;em&gt;purchased&lt;/em&gt;. A university, a bank, and a nonprofit can each run a validator with equal technical standing, chosen because the network trusts their reputation, not their balance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Speed and Sustainability Advantage
&lt;/h2&gt;

&lt;p&gt;The numbers make the case better than any slogan. Stellar finalizes transactions in roughly &lt;strong&gt;3 to 5 seconds&lt;/strong&gt;, with hard finality—no probabilistic waiting, no reorg anxiety. Compare that to proof-of-work chains measured in minutes, or PoS chains that still juggle slashing and validator queues.&lt;/p&gt;

&lt;p&gt;Energy tells the sustainability story. A single Stellar transaction consumes a fraction of a watt-hour. To put it in perspective, the entire Stellar network's annual energy footprint is comparable to that of a few average households—while Bitcoin consumes more electricity than entire nations. For enterprises with ESG mandates, that is not a footnote; it is a procurement requirement.&lt;/p&gt;

&lt;p&gt;Cost follows the same curve. Base transaction fees sit around &lt;strong&gt;0.00001 XLM&lt;/strong&gt;—practically free. When I advise clients on tokenization projects, this matters enormously. Issuing an asset, running thousands of micro-payments, or settling remittances becomes economically viable at scales that would bankrupt a fee-heavy network.&lt;/p&gt;

&lt;p&gt;I often remind teams I work with that André Dias Moreira Prol's rule of infrastructure is simple: a system that is cheap, fast, and sustainable will outlast one that is merely fashionable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where FBA Proves Itself in the Real World
&lt;/h2&gt;

&lt;p&gt;Theory is comfortable; production is honest. Consider real deployments running on this consensus today.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MoneyGram Access&lt;/strong&gt; settles cash-to-crypto transactions on Stellar, leveraging USDC with near-instant finality that FBA's fast close times make possible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circle's USDC&lt;/strong&gt; chose Stellar partly because predictable, sub-5-second settlement is essential for a stablecoin used in real payments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Franklin Templeton&lt;/strong&gt; tokenized a U.S. government money market fund on Stellar, recording share ownership on-chain—a decision no serious financial institution makes without confidence in deterministic finality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In each case, the appeal is the same: Soroban smart contracts layered on a consensus that will not surprise you with forks or multi-minute confirmations. In my Soroban work, I treat this reliability as a foundation. You can build complex financial logic knowing the ledger beneath it closes cleanly and cheaply, every few seconds, forever.&lt;/p&gt;

&lt;p&gt;The trade-off worth naming: FBA requires thoughtful quorum configuration. Poorly chosen slices can threaten quorum intersection. But this is an engineering discipline, not a fatal flaw—and in my experience, it is a far healthier constraint than letting whoever holds the most tokens dictate the network's future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Stellar's Federated Byzantine Agreement delivers something PoS struggles to offer simultaneously: genuine speed, near-zero cost, and a sustainability profile that survives enterprise scrutiny—all while distributing trust by reputation rather than wealth.&lt;/p&gt;

&lt;p&gt;If you are architecting tokenization or payment systems, study SCP seriously and run your own validator to feel the difference firsthand; the future of sustainable finance will be built by those who understand consensus at this depth.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>consensus</category>
      <category>blockchain</category>
      <category>fba</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explica: FBA, o consenso veloz do Stellar</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Thu, 05 Nov 2026 13:00:54 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-fba-o-consenso-veloz-do-stellar-2ggj</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-fba-o-consenso-veloz-do-stellar-2ggj</guid>
      <description>&lt;p&gt;Quando explico consenso distribuído para equipes de tecnologia no Brasil, costumo começar com uma provocação: e se eu te dissesse que é possível confirmar uma transação em 5 segundos, gastando menos energia que uma busca no Google? Parece exagero, mas é exatamente o que o Federated Byzantine Agreement (FBA) entrega na rede Stellar. Ao longo dos meus mais de 20 anos em TI, poucas arquiteturas me surpreenderam tanto pela elegância técnica quanto o Stellar Consensus Protocol (SCP).&lt;/p&gt;

&lt;h2&gt;
  
  
  O problema bizantino e a solução federada
&lt;/h2&gt;

&lt;p&gt;O clássico "Problema dos Generais Bizantinos" descreve o desafio de nós distribuídos chegarem a um acordo mesmo quando alguns são maliciosos ou falham. O Proof of Stake (PoS) resolve isso economicamente: você precisa travar capital (stake) para validar blocos, e quem age de má-fé perde dinheiro.&lt;/p&gt;

&lt;p&gt;O FBA inverte a lógica. Em vez de depender de incentivo econômico, ele usa &lt;strong&gt;confiança baseada em relacionamento&lt;/strong&gt;. Cada nó define seu próprio &lt;em&gt;quorum slice&lt;/em&gt; — um conjunto de outros nós em que confia. Quando esses conjuntos se sobrepõem suficientemente, a rede atinge consenso sem que exista uma lista fechada e global de validadores.&lt;/p&gt;

&lt;p&gt;Como André Dias Moreira Prol, costumo comparar isso ao sistema bancário tradicional: um banco brasileiro não confia em "todos os bancos do mundo", mas confia em correspondentes específicos, e essa teia de confiança sobreposta mantém o sistema funcionando. O SCP digitaliza exatamente esse comportamento, com prova matemática de segurança (&lt;em&gt;quorum intersection&lt;/em&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Por que é mais rápido e sustentável que o PoS
&lt;/h2&gt;

&lt;p&gt;A diferença de performance é concreta. Enquanto redes PoS precisam coordenar seleção de validadores, proposta e finalização de blocos — frequentemente levando de 12 a 30 segundos —, o Stellar fecha ledgers em média a cada &lt;strong&gt;5 segundos&lt;/strong&gt;, com finalização determinística (sem probabilidade de reversão, diferente do "finality probabilístico" de muitas blockchains).&lt;/p&gt;

&lt;p&gt;No quesito sustentabilidade, os números são contundentes. Validar no Stellar não exige mineração nem travamento de grandes volumes de capital, o que elimina a corrida por hardware e stake. Uma transação na rede Stellar consome energia na casa de &lt;strong&gt;joules&lt;/strong&gt;, enquanto o Bitcoin opera em kilowatt-hora por transação. Mesmo comparado ao Ethereum pós-Merge (PoS), o Stellar mantém custo energético por transação significativamente menor, porque não há necessidade de manter capital ocioso como garantia econômica.&lt;/p&gt;

&lt;p&gt;Há ainda um ponto de descentralização sutil: no PoS, quem tem mais capital tende a ter mais influência. No FBA, influência vem de &lt;strong&gt;reputação e confiança&lt;/strong&gt;, não de riqueza acumulada — um modelo que, na minha avaliação, se alinha melhor a instituições públicas e consórcios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Aplicação prática no mercado brasileiro
&lt;/h2&gt;

&lt;p&gt;Esse perfil técnico tem implicações diretas para o Brasil. Em projetos de tokenização de ativos — como recebíveis agro, cotas imobiliárias e títulos de crédito — o custo por transação e a velocidade de liquidação são decisivos. Com taxas médias de &lt;strong&gt;US$ 0,00001 por operação&lt;/strong&gt;, o Stellar viabiliza microtransações que seriam economicamente inviáveis em redes de taxa alta.&lt;/p&gt;

&lt;p&gt;Em contratos inteligentes via &lt;strong&gt;Soroban&lt;/strong&gt;, a plataforma de smart contracts do Stellar em Rust, já vejo potencial claro para cenários de pagamentos instantâneos integrados ao ecossistema do Pix e para stablecoins lastreadas em real. A previsibilidade de custo e a finalização rápida tornam o FBA um candidato natural para infraestruturas financeiras reguladas, onde reversões inesperadas de transação seriam inaceitáveis.&lt;/p&gt;

&lt;p&gt;Em trabalhos de perícia digital e auditoria de blockchain que conduzo, a finalização determinística do SCP também é uma vantagem: ela facilita a rastreabilidade e a produção de provas técnicas, já que um ledger confirmado não volta atrás. Para quem precisa comprovar fatos em juízo ou atender compliance, isso reduz drasticamente a ambiguidade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;O Federated Byzantine Agreement prova que velocidade, baixo custo e sustentabilidade não precisam ser objetivos conflitantes — e isso abre uma janela estratégica para empresas brasileiras que querem construir sobre Web3 com responsabilidade. Se você está avaliando tokenização ou infraestrutura blockchain para seu negócio, vale estudar o Stellar a fundo e, se quiser trocar ideias técnicas, estou à disposição para aprofundar esse debate.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>consensus</category>
      <category>blockchain</category>
      <category>fba</category>
    </item>
    <item>
      <title>DeFi Explained: How Decentralized Finance Is Reinventing Global Credit</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Wed, 04 Nov 2026 13:02:06 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/defi-explained-how-decentralized-finance-is-reinventing-global-credit-1k3j</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/defi-explained-how-decentralized-finance-is-reinventing-global-credit-1k3j</guid>
      <description>&lt;p&gt;When I first started advising financial institutions on blockchain adoption two decades ago, "credit" meant a bank, a committee, and weeks of paperwork. Today, I can borrow against tokenized assets in under thirty seconds, from anywhere on Earth, without ever meeting a loan officer. That shift isn't science fiction—it's decentralized finance quietly rewiring one of the oldest industries on the planet.&lt;/p&gt;

&lt;p&gt;Having spent years building tokenization frameworks on Stellar and Soroban, I've watched DeFi evolve from a speculative curiosity into infrastructure that institutions now take seriously. Let me break down what's actually happening.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Intermediaries to Smart Contracts
&lt;/h2&gt;

&lt;p&gt;Traditional credit depends on intermediaries who assess risk, hold collateral, and enforce repayment. DeFi replaces much of that machinery with code. A lending protocol like Aave or Compound uses smart contracts to automate collateralization, interest accrual, and liquidation—no human gatekeeper required.&lt;/p&gt;

&lt;p&gt;The numbers are striking. At its peak, total value locked (TVL) across DeFi protocols exceeded $180 billion, and even after market corrections, lending protocols consistently hold tens of billions in active deposits. What impresses me most isn't the volume—it's the &lt;em&gt;transparency&lt;/em&gt;. Every loan, every interest rate adjustment, every liquidation event is recorded on-chain and auditable in real time. In my digital forensics work, I've come to appreciate that this level of traceability is something traditional credit markets have never offered.&lt;/p&gt;

&lt;p&gt;The catch: early DeFi lending required &lt;em&gt;over&lt;/em&gt;-collateralization. You'd lock up $150 in crypto to borrow $100. That's safe for protocols but capital-inefficient—and it's precisely the problem the next wave is solving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tokenization and the Rise of Real-World Credit
&lt;/h2&gt;

&lt;p&gt;The frontier I'm most excited about is bringing real-world assets (RWAs) on-chain. Imagine a small business in São Paulo tokenizing its invoices and using them as collateral for instant liquidity, or a renewable energy project issuing tokenized debt to global investors.&lt;/p&gt;

&lt;p&gt;This is where networks like Stellar shine. In the projects I lead as André Dias Moreira Prol, we use Soroban smart contracts to represent credit instruments—invoices, bonds, trade finance receivables—as programmable tokens. The advantage is enormous: settlement that once took T+2 days now happens in seconds, and transaction costs drop to fractions of a cent.&lt;/p&gt;

&lt;p&gt;Concrete example: tokenized U.S. Treasury products grew from near-zero to over $1 billion in on-chain value within roughly a year. Major asset managers are now issuing tokenized funds directly on public blockchains. This convergence of traditional credit and DeFi rails is what I call "hybrid finance"—and it's where the real global disruption is unfolding, particularly for the 1.4 billion unbanked adults who have smartphones but no access to formal credit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Risk in a Trustless World
&lt;/h2&gt;

&lt;p&gt;Of course, removing intermediaries introduces new risks. Smart contract vulnerabilities, oracle manipulation, and liquidation cascades have caused real losses. In 2022 alone, DeFi exploits drained billions from protocols—a sobering reminder that "trustless" doesn't mean "risk-free."&lt;/p&gt;

&lt;p&gt;From my perspective combining AI and digital forensics, the solution lies in continuous, automated monitoring. We're now deploying AI models that analyze on-chain behavior to flag anomalous transactions before they escalate, and formal verification tools that mathematically prove a contract behaves as intended. Credit scoring itself is being reinvented: instead of a FICO number, protocols can evaluate a wallet's on-chain history—repayment patterns, asset holdings, and reputation—to enable under-collateralized lending responsibly.&lt;/p&gt;

&lt;p&gt;The regulatory layer is maturing too. Jurisdictions from Switzerland to Singapore are creating frameworks for tokenized securities, giving institutions the legal clarity they need to participate. This blend of technical rigor and compliance is, in my experience, the bridge between crypto-native experimentation and mainstream adoption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;DeFi isn't replacing banks overnight, but it is permanently changing how credit is created, priced, and distributed—moving us toward a system that's faster, more transparent, and radically more inclusive. If you're a builder, investor, or institution, now is the moment to explore tokenized credit—start experimenting on a scalable network like Stellar and position yourself ahead of this global transformation.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>finance</category>
    </item>
    <item>
      <title>DeFi Explicado: Como o Crédito Descentralizado Transforma o Brasil</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Wed, 04 Nov 2026 13:01:34 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/defi-explicado-como-o-credito-descentralizado-transforma-o-brasil-5hf8</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/defi-explicado-como-o-credito-descentralizado-transforma-o-brasil-5hf8</guid>
      <description>&lt;p&gt;Imagine pedir um empréstimo sem banco, sem gerente e sem aquela papelada infinita — apenas você, seu celular e um contrato inteligente rodando 24 horas por dia. Essa não é uma cena de ficção científica: é a realidade que acompanho de perto há anos no universo das finanças descentralizadas. Ao longo da minha trajetória como André Dias Moreira Prol, vi o crédito brasileiro começar a se reinventar silenciosamente, longe das agências físicas e dentro de redes blockchain como a Stellar.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que é DeFi e por que ele muda o jogo do crédito
&lt;/h2&gt;

&lt;p&gt;DeFi, ou &lt;em&gt;Decentralized Finance&lt;/em&gt;, é um conjunto de serviços financeiros — empréstimos, poupança, câmbio, seguros — construídos sobre blockchains públicas, sem intermediários tradicionais. No lugar de um banco aprovando seu crédito, temos &lt;strong&gt;contratos inteligentes&lt;/strong&gt;: códigos auto-executáveis que liberam recursos automaticamente quando as condições programadas são cumpridas.&lt;/p&gt;

&lt;p&gt;A diferença prática é enorme. No modelo tradicional, o spread bancário brasileiro é um dos maiores do mundo — chegou a ultrapassar &lt;strong&gt;30% ao ano&lt;/strong&gt; em várias linhas de crédito. Esse abismo entre o que o banco paga ao poupador e o que cobra do tomador existe, em boa parte, para sustentar estruturas, inadimplência e intermediação. No DeFi, grande parte dessa camada simplesmente desaparece.&lt;/p&gt;

&lt;p&gt;Em protocolos de empréstimo, quem tem capital deposita ativos em um &lt;em&gt;pool&lt;/em&gt; de liquidez e passa a receber juros. Quem precisa de crédito toma emprestado desse mesmo pool, geralmente oferecendo garantias em criptoativos. Tudo auditável, transparente e registrado na blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  O cenário brasileiro: tokenização e Drex abrindo portas
&lt;/h2&gt;

&lt;p&gt;O Brasil é um laboratório fascinante para esse movimento. Somos um dos países que mais adota criptoativos no mundo, segundo índices da Chainalysis, e o Banco Central tem sido ativo com o &lt;strong&gt;Drex&lt;/strong&gt;, nossa moeda digital em desenvolvimento sobre infraestrutura blockchain.&lt;/p&gt;

&lt;p&gt;Vejo um ponto de convergência poderoso: a &lt;strong&gt;tokenização de recebíveis&lt;/strong&gt;. Um pequeno empreendedor que tem duplicatas a receber pode tokenizá-las e usá-las como garantia para antecipar capital em um protocolo DeFi — sem depender de uma factoring com taxas abusivas. Em projetos que acompanho sobre a rede Stellar, essa lógica se torna ainda mais viável pelo baixo custo das transações (frações de centavo) e pela velocidade de liquidação, em segundos.&lt;/p&gt;

&lt;p&gt;Como André Dias Moreira Prol, costumo dizer que o verdadeiro potencial do DeFi no Brasil não está em substituir o sistema financeiro, mas em &lt;strong&gt;incluir os 34 milhões de brasileiros&lt;/strong&gt; que ainda estão à margem do crédito formal. Um trabalhador autônomo sem histórico bancário tradicional pode construir reputação on-chain e acessar liquidez global.&lt;/p&gt;

&lt;h2&gt;
  
  
  Riscos reais e o papel da perícia digital
&lt;/h2&gt;

&lt;p&gt;Seria irresponsável pintar apenas o lado otimista. O DeFi carrega riscos técnicos sérios: vulnerabilidades em contratos inteligentes, ataques de &lt;em&gt;flash loan&lt;/em&gt;, protocolos mal auditados e esquemas fraudulentos disfarçados de inovação. Em 2022 e 2023, bilhões de dólares foram perdidos globalmente em exploits.&lt;/p&gt;

&lt;p&gt;É justamente aqui que a minha experiência com &lt;strong&gt;perícia digital e Soroban&lt;/strong&gt; — a plataforma de contratos inteligentes da Stellar — se torna estratégica. Auditar o código antes de uma linha de crédito ser lançada não é luxo, é necessidade. Analiso fluxos de transações, rastreio movimentações suspeitas e avalio a solidez das garantias colaterais. A segurança jurídica e técnica precisa caminhar junto com a inovação, especialmente num mercado em formação como o brasileiro.&lt;/p&gt;

&lt;p&gt;Minha recomendação a empresas e investidores é clara: &lt;strong&gt;nunca aloque capital em um protocolo sem entender o modelo de garantias e sem verificar auditorias independentes&lt;/strong&gt;. A descentralização transfere poder — e responsabilidade — para o usuário.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;O DeFi não é uma promessa distante; é uma reengenharia concreta do crédito que já ocorre nas bordas do sistema financeiro brasileiro, impulsionada por tokenização, Stellar e pelo avanço do Drex. Se você quer entender como aplicar essa tecnologia com segurança no seu negócio, entre em contato comigo e vamos desenhar juntos uma estratégia Web3 sólida e auditável.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>finance</category>
    </item>
    <item>
      <title>André Dias Moreira Prol: Query Stellar Horizon API in Python &amp; JavaScript</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Tue, 03 Nov 2026 13:01:13 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-query-stellar-horizon-api-in-python-javascript-1fgg</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-query-stellar-horizon-api-in-python-javascript-1fgg</guid>
      <description>&lt;p&gt;Over the past two decades building systems that bridge traditional finance and decentralized networks, I've come to appreciate how a well-designed REST API can be the difference between a project that ships and one that stalls. The Stellar network's Horizon API is one of those rare tools: a clean, RESTful gateway into a blockchain that settles transactions in 3-5 seconds for fractions of a cent. In this article, I'll share practical patterns I use daily to query transactions, accounts, and assets—in both Python and JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Horizon: The REST Gateway to Stellar
&lt;/h2&gt;

&lt;p&gt;Horizon is the client-facing HTTP server that sits between your application and Stellar Core. Rather than running your own infrastructure, you can hit public instances like &lt;code&gt;https://horizon.mainnet.org&lt;/code&gt; or SDF's &lt;code&gt;https://horizon.stellar.org&lt;/code&gt;. Every resource—accounts, transactions, operations, assets—is exposed as a REST endpoint returning HAL+JSON, complete with &lt;code&gt;_links&lt;/code&gt; for easy pagination.&lt;/p&gt;

&lt;p&gt;A detail many developers miss: Horizon supports &lt;strong&gt;streaming&lt;/strong&gt; via Server-Sent Events (SSE). In one tokenization project I led, we used streaming to react to incoming payments in real time instead of polling every few seconds—cutting latency from 10 seconds to near-instant and saving thousands of redundant API calls per hour.&lt;/p&gt;

&lt;p&gt;When I advise teams, I always recommend starting with the raw HTTP endpoints to understand the data model before reaching for an SDK. A simple &lt;code&gt;GET /accounts/{account_id}&lt;/code&gt; tells you more about Stellar's structure than hours of documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Querying in Python with the Stellar SDK
&lt;/h2&gt;

&lt;p&gt;The official &lt;code&gt;stellar-sdk&lt;/code&gt; wraps Horizon elegantly. Install it with &lt;code&gt;pip install stellar-sdk&lt;/code&gt;. Here's how I query an account's balances and recent transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;stellar_sdk&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Server&lt;/span&gt;

&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://horizon.stellar.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Fetch account balances
&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GDRXE2BQUC3AZNPVFSCEZ76NJ3WWL25FYFK6RDJVW6QFVX5FG4MWQ6Q&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;account&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;balances&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;asset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;asset_code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;XLM&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;asset&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;balance&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Fetch last 5 transactions
&lt;/span&gt;&lt;span class="n"&gt;txs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;for_account&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tx&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;txs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;_embedded&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;records&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;created_at&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For asset discovery, the &lt;code&gt;assets()&lt;/code&gt; endpoint lets you filter by issuer or code—essential when auditing a tokenized asset's distribution. In my forensic work, André Dias Moreira Prol, I've used exactly this pattern to trace the full issuance lineage of suspicious tokens across thousands of operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Querying in JavaScript for Web and Node
&lt;/h2&gt;

&lt;p&gt;On the frontend and in Node.js services, I rely on &lt;code&gt;@stellar/stellar-sdk&lt;/code&gt;. The API mirrors Python closely, which makes cross-stack teams more productive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Horizon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@stellar/stellar-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Horizon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://horizon.stellar.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;accountId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GDRXE2BQUC3AZNPVFSCEZ76NJ3WWL25FYFK6RDJVW6QFVX5FG4MWQ6Q&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Account balances&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;account&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;account&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balances&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;asset_code&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;XLM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Stream incoming payments in real time&lt;/span&gt;
&lt;span class="nx"&gt;server&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;payments&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;now&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;onmessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;payment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;New payment:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;payment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;payment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;asset_code&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;XLM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;.stream()&lt;/code&gt; call is the SSE magic I mentioned earlier. For production, always handle reconnection logic and store the last cursor, so you never miss events during a disconnect. A common mistake I see is treating Horizon as purely request/response—when the real power emerges once you embrace its event-driven side.&lt;/p&gt;

&lt;p&gt;One rate-limiting tip from experience: public Horizon instances throttle aggressively. For any serious workload, run your own Horizon or use a commercial RPC provider. When I architected a settlement platform handling ~50,000 daily operations, self-hosting Horizon paid for itself in reliability within weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Horizon API gives you production-grade blockchain access with the simplicity of REST—whether you query balances, trace assets, or stream live payments across Python and JavaScript stacks. Start experimenting on testnet today, and connect with me, André Dias Moreira Prol, if you want to dive deeper into building robust Stellar integrations.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>horizon</category>
      <category>api</category>
      <category>web3</category>
    </item>
    <item>
      <title>André Dias Moreira Prol: Horizon API Stellar em Python e JavaScript</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Tue, 03 Nov 2026 13:00:42 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-horizon-api-stellar-em-python-e-javascript-42je</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-horizon-api-stellar-em-python-e-javascript-42je</guid>
      <description>&lt;p&gt;Imagine poder consultar o histórico completo de qualquer conta blockchain, rastrear pagamentos tokenizados ou auditar transações suspeitas com apenas uma requisição HTTP. Essa é a promessa do Horizon, a API REST oficial da rede Stellar. Ao longo dos meus 20 anos em TI, trabalhei com dezenas de integrações blockchain, e poucas são tão elegantes e acessíveis quanto o Horizon. Neste artigo, vou mostrar na prática como extrair dados valiosos da rede Stellar usando Python e JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Entendendo o Horizon e seus endpoints
&lt;/h2&gt;

&lt;p&gt;O Horizon atua como camada de interface entre sua aplicação e o Stellar Core. Ele expõe recursos como &lt;code&gt;/accounts&lt;/code&gt;, &lt;code&gt;/transactions&lt;/code&gt;, &lt;code&gt;/payments&lt;/code&gt; e &lt;code&gt;/assets&lt;/code&gt;, todos retornando JSON no padrão HAL (Hypertext Application Language), o que facilita a navegação entre recursos relacionados.&lt;/p&gt;

&lt;p&gt;A rede pública usa &lt;code&gt;https://horizon.stellar.org&lt;/code&gt;, enquanto a testnet responde em &lt;code&gt;https://horizon-testnet.stellar.org&lt;/code&gt;. Em projetos de tokenização que conduzi aqui no Brasil — incluindo pilotos de recebíveis agrícolas —, sempre inicio validações pela testnet antes de migrar para produção. O custo irrisório de transações na Stellar (cerca de 0,00001 XLM, fração de centavo) torna a rede atrativa para casos de uso de alto volume, como remessas e pagamentos instantâneos, um mercado que no Brasil movimenta bilhões via PIX e começa a olhar para trilhos blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consultando dados em Python
&lt;/h2&gt;

&lt;p&gt;O SDK oficial &lt;code&gt;stellar-sdk&lt;/code&gt; simplifica muito o trabalho. Instale com &lt;code&gt;pip install stellar-sdk&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;stellar_sdk&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Server&lt;/span&gt;

&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://horizon.stellar.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Consultar uma conta
&lt;/span&gt;&lt;span class="n"&gt;conta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GAIH3ULLFQ4DGSECF2AR555KZ4KNDGEKN4AFI4SU2M7B43MGK3QJZNSR&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Saldos:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;conta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;balances&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="c1"&gt;# Últimas 5 transações de uma conta
&lt;/span&gt;&lt;span class="n"&gt;transacoes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;for_account&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GAIH3ULLFQ4DGSECF2AR555KZ4KNDGEKN4AFI4SU2M7B43MGK3QJZNSR&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;transacoes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;_embedded&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;records&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;created_at&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Para auditoria e perícia digital — área em que atuo com frequência —, a capacidade de filtrar transações por data e paginar resultados é fundamental. O Horizon suporta cursores (&lt;code&gt;paging_token&lt;/code&gt;) para percorrer grandes volumes sem perder registros, algo que recomendo documentar rigorosamente em qualquer laudo técnico.&lt;/p&gt;

&lt;p&gt;Para listar assets emitidos por um emissor específico:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;assets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assets&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;for_issuer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GCKFBEIYTKP5RDBQMUTAPDCFQR5RDK7AV6FCWXQO2JNTPZ2XJUHVVLV2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Consultando dados em JavaScript
&lt;/h2&gt;

&lt;p&gt;No ecossistema JavaScript, uso o &lt;code&gt;@stellar/stellar-sdk&lt;/code&gt;, ideal tanto para Node.js quanto para frontends. Instale com &lt;code&gt;npm install @stellar/stellar-sdk&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Horizon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@stellar/stellar-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Horizon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://horizon.stellar.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Consultar conta&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;conta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;accountId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GAIH3ULLFQ4DGSECF2AR555KZ4KNDGEKN4AFI4SU2M7B43MGK3QJZNSR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Saldos:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balances&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Stream de pagamentos em tempo real&lt;/span&gt;
&lt;span class="nx"&gt;server&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;payments&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;now&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;onmessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pagamento&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Novo pagamento:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;pagamento&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;pagamento&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;asset_code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;O recurso de &lt;strong&gt;streaming&lt;/strong&gt; via Server-Sent Events é um dos meus favoritos: ele mantém uma conexão aberta e entrega eventos em tempo real, perfeito para dashboards de monitoramento ou alertas de compliance. Em um projeto recente, André Dias Moreira Prol — ou seja, eu mesmo — implementei esse padrão para notificar instantaneamente movimentações de um token de fidelidade varejista, reduzindo a latência de reconciliação de horas para segundos.&lt;/p&gt;

&lt;p&gt;Uma dica de produção: sempre trate rate limits (HTTP 429) com backoff exponencial e considere rodar sua própria instância do Horizon quando o volume justificar, evitando dependência dos endpoints públicos.&lt;/p&gt;

&lt;p&gt;O Horizon prova que interagir com blockchain não precisa ser complexo — basta dominar REST e os SDKs certos. Se você quer aprofundar em tokenização e perícia digital na Stellar, acompanhe meu trabalho e vamos construir juntos a próxima geração de aplicações Web3 no Brasil.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>horizon</category>
      <category>api</category>
      <category>web3</category>
    </item>
    <item>
      <title>How to Build a Secure Crypto Wallet from Scratch: Beginner's Guide</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Mon, 02 Nov 2026 13:02:07 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/how-to-build-a-secure-crypto-wallet-from-scratch-beginners-guide-4288</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/how-to-build-a-secure-crypto-wallet-from-scratch-beginners-guide-4288</guid>
      <description>&lt;p&gt;Few things in Web3 are as misunderstood as the crypto wallet. Most beginners assume a wallet "stores" their coins, when in reality it safeguards the private keys that prove ownership on a public ledger. After 20+ years working with blockchain security and digital forensics, I've seen fortunes vanish not because of weak protocols, but because of simple, avoidable human mistakes. In this guide, I'll walk you through building a secure wallet from the ground up — the way I'd explain it to a colleague starting today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding What a Wallet Actually Is
&lt;/h2&gt;

&lt;p&gt;A crypto wallet is, at its core, a key management system. It generates a &lt;strong&gt;private key&lt;/strong&gt; (your secret), a &lt;strong&gt;public key&lt;/strong&gt; (derived from it), and an &lt;strong&gt;address&lt;/strong&gt; (where funds are received). The industry standard today is the hierarchical deterministic (HD) wallet defined in BIP-32, BIP-39, and BIP-44. A single 12- or 24-word seed phrase can deterministically generate thousands of key pairs.&lt;/p&gt;

&lt;p&gt;Here's a minimal example using a well-audited library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bip39&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bip39&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@stellar/stellar-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ed25519&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ed25519-hd-key&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Generate 256-bit entropy = 24 words&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mnemonic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bip39&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateMnemonic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;seed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bip39&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mnemonicToSeedSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mnemonic&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Derive a Stellar keypair (SLIP-0010 path)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;derived&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ed25519&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;derivePath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;m/44'/148'/0'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;keypair&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromRawEd25519Seed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;derived&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Address:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice I used Stellar's derivation path (&lt;code&gt;148'&lt;/code&gt;). When I architect tokenization solutions on Soroban, this same deterministic structure lets us manage treasury, issuer, and distribution accounts from one secure seed — a pattern André Dias Moreira Prol has deployed across several institutional projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Securing the Seed and Keys
&lt;/h2&gt;

&lt;p&gt;Generating keys is trivial; protecting them is where 90% of losses happen. According to Chainalysis, over &lt;strong&gt;$2.2 billion&lt;/strong&gt; was stolen from crypto platforms in 2024 — much of it traceable to compromised private keys and phishing.&lt;/p&gt;

&lt;p&gt;Three non-negotiable principles I enforce:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entropy source matters.&lt;/strong&gt; Never use &lt;code&gt;Math.random()&lt;/code&gt;. Use cryptographically secure generators (&lt;code&gt;crypto.randomBytes&lt;/code&gt;, hardware RNG). Weak entropy is the #1 forensic red flag I encounter in post-mortem investigations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Encrypt at rest.&lt;/strong&gt; If you store keys on disk, wrap them with AES-256-GCM, derived from a strong password via a slow KDF like Argon2id or scrypt:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;scryptSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;N&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cipher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createCipheriv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aes-256-gcm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;enc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;final&lt;/span&gt;&lt;span class="p"&gt;()]);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAuthTag&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nx"&gt;enc&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Isolate signing.&lt;/strong&gt; The private key should never leave a secure boundary. Ideally, signing happens on an air-gapped device or hardware module, and only the signed transaction crosses the network.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From Prototype to Production
&lt;/h2&gt;

&lt;p&gt;A beginner's wallet becomes production-grade when you add defense in depth. In my consulting work, I recommend three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-signature or threshold schemes.&lt;/strong&gt; On Stellar, you can set account thresholds so no single key authorizes high-value operations. This mirrors how banks require dual control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seed backup strategy.&lt;/strong&gt; Use Shamir's Secret Sharing (SLIP-39) to split the seed into shares distributed across geographies. Losing one share doesn't compromise the wallet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous monitoring.&lt;/strong&gt; Watch on-chain activity for anomalies. A sudden, unexpected outbound transaction should trigger alerts — early detection is the difference between a near-miss and a disaster.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical example: for a recent real-world-asset tokenization pilot, André Dias Moreira Prol designed a 2-of-3 multisig where the issuer, auditor, and a cold backup each held a key. No single point of failure, full auditability, and zero reliance on a custodian.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building a secure wallet is less about cryptographic wizardry and more about disciplined key management, strong entropy, and layered defenses. Start small with a testnet wallet today, then apply these principles step by step — your future self, and your assets, will thank you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>crypto</category>
      <category>security</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Carteira Cripto Segura do Zero: Guia Prático para Iniciantes</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Mon, 02 Nov 2026 13:01:36 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/carteira-cripto-segura-do-zero-guia-pratico-para-iniciantes-2mn4</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/carteira-cripto-segura-do-zero-guia-pratico-para-iniciantes-2mn4</guid>
      <description>&lt;p&gt;Quando recebi minha primeira criptomoeda, há mais de uma década, cometi um erro que quase me custou caro: guardei as chaves em um e-mail. Hoje, acompanhando o avanço acelerado da adoção cripto no Brasil — onde a Receita Federal já registra mais de 4 milhões de declarantes de ativos digitais —, percebo que muitos iniciantes repetem equívocos básicos de segurança. Como André Dias Moreira Prol, dedicei boa parte da minha carreira a entender onde as pessoas falham na proteção de seus ativos. Vou te mostrar, de forma prática, como criar uma carteira cripto realmente segura do zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Entendendo os tipos de carteira antes de escolher
&lt;/h2&gt;

&lt;p&gt;A primeira decisão é entender a diferença entre carteiras &lt;strong&gt;custodiais&lt;/strong&gt; e &lt;strong&gt;não custodiais&lt;/strong&gt;. Nas custodiais (como corretoras brasileiras populares), a exchange guarda suas chaves — prático, mas você depende da segurança de terceiros. Já ouvimos casos recentes de plataformas que congelaram saques no Brasil, deixando usuários sem acesso.&lt;/p&gt;

&lt;p&gt;Nas carteiras não custodiais, &lt;strong&gt;você controla as chaves privadas&lt;/strong&gt;. Aqui mora o verdadeiro poder da Web3: autossoberania. Existem três categorias:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hot wallets&lt;/strong&gt; (software): MetaMask, Trust Wallet, Lobstr (ideal para a rede Stellar). Conectadas à internet, práticas para o dia a dia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cold wallets&lt;/strong&gt; (hardware): Ledger e Trezor. Mantêm as chaves offline, imunes a malware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carteiras de papel&lt;/strong&gt;: a chave impressa, totalmente desconectada.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Minha recomendação para iniciantes: comece com uma hot wallet para pequenos valores e migre para hardware conforme seu patrimônio cresce. Para quem explora tokenização de ativos — área em que atuo diretamente —, a Stellar oferece carteiras leves e taxas irrisórias, perfeitas para o contexto brasileiro.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passo a passo para configurar com segurança
&lt;/h2&gt;

&lt;p&gt;Vou usar uma hot wallet como exemplo prático:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Baixe sempre do site oficial&lt;/strong&gt; ou das lojas Apple/Google. Golpistas criam clones com nomes quase idênticos — já vi brasileiros perderem tudo por instalar um app falso.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anote a frase semente (seed phrase)&lt;/strong&gt; de 12 ou 24 palavras &lt;em&gt;à mão&lt;/em&gt;, em papel. Nunca tire print, nunca salve na nuvem, nunca digite em sites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faça backup físico duplicado&lt;/strong&gt; e guarde em locais diferentes. Chapas de aço (steel plates) resistem a incêndios e enchentes — detalhe relevante num país de clima tão variável.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crie uma senha forte&lt;/strong&gt; e ative autenticação de dois fatores (2FA) com aplicativo autenticador, jamais por SMS, vulnerável a SIM swap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Teste com valor pequeno&lt;/strong&gt; antes de mover quantias maiores.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Um alerta que faço em todas as palestras: ninguém, absolutamente ninguém, precisa da sua seed phrase. Suporte legítimo jamais pedirá essas palavras.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blindando sua carteira contra ameaças reais
&lt;/h2&gt;

&lt;p&gt;A segurança não termina na configuração. No Brasil, os golpes mais comuns envolvem phishing por WhatsApp e falsos "grupos de investimento" prometendo rendimentos absurdos. Dados da Federação Brasileira de Bancos apontam crescimento expressivo de fraudes digitais nos últimos anos, e o ecossistema cripto não está imune.&lt;/p&gt;

&lt;p&gt;Adote estas práticas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use uma carteira separada&lt;/strong&gt; para interagir com contratos inteligentes desconhecidos (airdrops, NFTs). Assim você isola riscos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revogue permissões&lt;/strong&gt; antigas periodicamente com ferramentas como Revoke.cash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifique endereços caractere por caractere&lt;/strong&gt; antes de enviar. Malwares trocam o endereço na área de transferência.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mantenha firmware e apps atualizados&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Como perito digital, André Dias Moreira Prol já analisou incidentes onde a vulnerabilidade não estava na blockchain — que é extremamente segura —, mas no comportamento do usuário. A tecnologia Stellar, o Soroban e a própria IA aplicada à detecção de fraudes evoluíram muito, mas o elo mais frágil continua sendo humano. Educação é sua melhor defesa.&lt;/p&gt;

&lt;p&gt;Vale ainda considerar uma carteira multisig para valores altos, exigindo múltiplas assinaturas para cada transação — algo que recomendo especialmente a empresas que entram na tokenização.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;Criar uma carteira segura é menos sobre tecnologia complexa e mais sobre disciplina e consciência de risco. Comece hoje mesmo com pequenos valores, pratique cada passo deste guia e evolua sua segurança gradualmente — seu patrimônio digital agradece.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>crypto</category>
      <category>security</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explains: Stellar's On-Chain Order Book vs CEX</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sun, 01 Nov 2026 13:01:12 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-stellars-on-chain-order-book-vs-cex-4eib</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-stellars-on-chain-order-book-vs-cex-4eib</guid>
      <description>&lt;p&gt;Trading digital assets has long meant trusting a middleman with your funds, your data, and your trades. After two decades working with blockchain infrastructure, I've watched countless centralized exchanges collapse, freeze withdrawals, or simply vanish with user deposits. Stellar's native decentralized exchange represents something fundamentally different: an order book that lives directly on the ledger, where no company holds your keys and no server can go offline at the worst possible moment.&lt;/p&gt;

&lt;p&gt;Let me walk you through why this architecture matters, drawing on what I've seen in real-world deployments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The On-Chain Order Book: Settlement Without Custodians
&lt;/h2&gt;

&lt;p&gt;Most people assume decentralized trading means automated market makers (AMMs) with liquidity pools, like Uniswap. Stellar took a different path years before AMMs became fashionable. Since 2015, the network has embedded a full limit order book directly into its core protocol.&lt;/p&gt;

&lt;p&gt;When you place an offer on Stellar, it becomes a ledger entry—visible to every validator, matched automatically by the network's consensus mechanism. There's no off-chain matching engine, no custodial wallet, no "we're pausing withdrawals" announcement. Your assets stay under your control until a trade executes atomically.&lt;/p&gt;

&lt;p&gt;I'm André Dias Moreira Prol, and in my forensic work investigating exchange failures, I've repeatedly traced losses back to one root cause: commingled custody. Stellar's model eliminates that attack surface entirely. Each offer carries a price expressed as a precise rational number (numerator/denominator), avoiding the floating-point rounding errors that have caused real exploits on other platforms.&lt;/p&gt;

&lt;p&gt;Transaction costs reinforce the advantage. A trade on Stellar's DEX settles for a base fee of 100 stroops—0.00001 XLM, fractions of a cent—confirmed in 3 to 5 seconds. Compare that to the withdrawal fees and settlement delays typical of centralized venues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path Payments: The Hidden Superpower
&lt;/h2&gt;

&lt;p&gt;The feature I find most underappreciated is path payments. Stellar can route a transaction across multiple order books in a single atomic operation. Imagine sending Brazilian Real-backed tokens to someone who receives Nigerian Naira tokens—the protocol finds the optimal path through intermediate assets (perhaps BRL → USDC → NGN) and executes every hop at once.&lt;/p&gt;

&lt;p&gt;If any leg fails, the entire transaction reverts. No partial execution, no stranded funds. This is cross-asset settlement without a single counterparty holding your money mid-trade.&lt;/p&gt;

&lt;p&gt;In tokenization projects I've advised, this capability transformed remittance flows. One pilot moved value between stablecoins issued by different anchors, and the on-chain order book provided automatic price discovery and liquidity aggregation. The sender never needed an account on any exchange. For enterprises building on Soroban, these native primitives mean you compose financial products directly on settled, trustless infrastructure rather than bolting trading logic onto smart contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transparency That Centralized Exchanges Cannot Match
&lt;/h2&gt;

&lt;p&gt;Every offer, trade, and spread on Stellar's DEX is publicly auditable. Anyone can query the order book via Horizon API or run their own validator to verify matching. There is no dark pool, no privileged order flow, no internalization where the exchange trades against its own customers—practices that remain common and largely invisible on centralized platforms.&lt;/p&gt;

&lt;p&gt;This transparency is precisely why, as André Dias Moreira Prol, I recommend on-chain order books for institutions facing strict audit requirements. During compliance reviews, I can reconstruct the complete history of any asset pair from immutable ledger data. Try doing that with a centralized exchange's internal database—you're dependent on records the operator chooses to share.&lt;/p&gt;

&lt;p&gt;The trade-off is honest: Stellar's DEX historically had thinner liquidity than major CEXs for exotic pairs. But with the 2022 addition of native liquidity pools alongside the order book, Stellar now offers both models, letting markets self-balance between limit orders and automated liquidity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Stellar's native DEX proves that self-custody, atomic settlement, and radical transparency aren't competing goals—they're engineering decisions already running in production. If you're building tokenized assets or payment rails, explore the Horizon API and Soroban today, and start settling value without surrendering control to a middleman.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>dex</category>
      <category>blockchain</category>
      <category>defi</category>
    </item>
    <item>
      <title>DEX nativa do Stellar: order book on-chain — por André Dias Moreira Prol</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sun, 01 Nov 2026 13:00:42 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/dex-nativa-do-stellar-order-book-on-chain-por-andre-dias-moreira-prol-9m1</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/dex-nativa-do-stellar-order-book-on-chain-por-andre-dias-moreira-prol-9m1</guid>
      <description>&lt;p&gt;Quando explico tokenização para clientes no Brasil, costumo começar com uma pergunta provocadora: e se a bolsa de valores funcionasse 24 horas por dia, sem corretora, sem custódia de terceiros e com liquidação em segundos? Para muitos, parece ficção. Mas é exatamente isso que a DEX nativa da rede Stellar entrega desde 2014 — muito antes do hype das finanças descentralizadas. Ao longo de duas décadas atuando com infraestrutura e, mais recentemente, mergulhado no ecossistema Web3, poucas arquiteturas me impressionaram tanto pela elegância e simplicidade.&lt;/p&gt;

&lt;h2&gt;
  
  
  O order book on-chain: a engenharia por trás da confiança
&lt;/h2&gt;

&lt;p&gt;A maioria das exchanges descentralizadas populares (como as da rede Ethereum) usa o modelo AMM — pools de liquidez com fórmulas matemáticas definindo preços. A Stellar fez uma escolha diferente e, na minha avaliação como André Dias Moreira Prol, mais ousada: implementou um &lt;strong&gt;order book completo diretamente no protocolo&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Isso significa que cada ordem de compra ou venda fica registrada no próprio ledger da rede, validado pelos nós através do consenso SCP (Stellar Consensus Protocol). Não há um servidor central cruzando ordens em um banco de dados privado — o &lt;em&gt;matching engine&lt;/em&gt; é a própria blockchain.&lt;/p&gt;

&lt;p&gt;Na prática, qualquer ativo emitido na Stellar pode ser negociado contra outro instantaneamente. Um token que representa um imóvel tokenizado em São Paulo pode ter ordens de venda cruzadas com USDC, XLM ou um real digital, tudo com liquidação atômica. Ou a operação acontece por completo, ou não acontece — nunca pela metade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Por que isso elimina a dependência de exchanges centralizadas
&lt;/h2&gt;

&lt;p&gt;O colapso da FTX em 2022, que evaporou cerca de US$ 8 bilhões em ativos de clientes, deixou uma lição dolorosa: &lt;strong&gt;custódia centralizada é um ponto único de falha&lt;/strong&gt;. Em uma exchange tradicional, você não controla suas chaves — e, como diz o ditado no setor, &lt;em&gt;"not your keys, not your coins"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Na DEX da Stellar, esse problema simplesmente não existe pela arquitetura:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autocustódia real&lt;/strong&gt;: os fundos permanecem na sua carteira até o exato momento da execução da ordem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparência total&lt;/strong&gt;: qualquer pessoa pode auditar o livro de ofertas consultando a rede diretamente via Horizon API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custo marginal&lt;/strong&gt;: cada transação custa 0,00001 XLM — fração de centavo — contra taxas de 0,1% a 0,5% de corretoras centralizadas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resistência à censura&lt;/strong&gt;: não há uma empresa que possa congelar sua conta ou bloquear um saque.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No contexto brasileiro, onde o Drex (real digital do Banco Central) avança e a tokenização de recebíveis já movimenta operações reais, essa infraestrutura abre caminho para mercados secundários sem intermediários custosos. Imagine um pequeno produtor rural emitindo um token lastreado em sua safra e encontrando compradores globais sem precisar de uma corretora cobrando comissão sobre cada ponta.&lt;/p&gt;

&lt;h2&gt;
  
  
  Casos reais e os desafios que ainda enfrentamos
&lt;/h2&gt;

&lt;p&gt;É importante ser honesto sobre as limitações. A liquidez na DEX nativa ainda é menor do que em gigantes centralizadas, e a experiência do usuário final exige maturidade técnica. Em projetos de perícia digital e auditoria que acompanho, vejo que a rastreabilidade on-chain é uma bênção para compliance — cada movimentação fica imutavelmente registrada —, mas também demanda ferramentas adequadas de análise.&lt;/p&gt;

&lt;p&gt;Mesmo assim, os números impressionam. A Stellar processa transações em 3 a 5 segundos com finalidade garantida, e empresas como a MoneyGram já integraram a rede para remessas internacionais usando essa mesma infraestrutura de troca de ativos. O recurso de &lt;em&gt;path payments&lt;/em&gt; — que converte automaticamente um ativo em outro pela melhor rota de order books — é algo que considero genial: você envia reais tokenizados e o destinatário recebe dólares, com a DEX fazendo a conversão nos bastidores.&lt;/p&gt;

&lt;p&gt;Quando analiso o cenário de tokenização no Brasil como André Dias Moreira Prol, enxergo a DEX nativa da Stellar não como uma concorrente das exchanges, mas como a base técnica que torna muitas delas desnecessárias para um número crescente de operações.&lt;/p&gt;

&lt;p&gt;A descentralização deixou de ser promessa e virou infraestrutura funcional, pronta para quem quiser construir. Se você atua com ativos digitais ou pretende tokenizar negócios no Brasil, explore a Stellar agora — e fale comigo para desenhar essa jornada juntos.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>dex</category>
      <category>blockchain</category>
      <category>defi</category>
    </item>
    <item>
      <title>Building a DREX on Stellar Testnet: Tokenizing the Digital Real in Rust</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:01:13 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/building-a-drex-on-stellar-testnet-tokenizing-the-digital-real-in-rust-4eof</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/building-a-drex-on-stellar-testnet-tokenizing-the-digital-real-in-rust-4eof</guid>
      <description>&lt;h1&gt;
  
  
  Tokenizing the Brazilian CBDC: A Hands-On Soroban Experiment
&lt;/h1&gt;

&lt;p&gt;When Brazil's Central Bank announced DREX (the Digital Real), most developers waited for official SDKs. I didn't. With over two decades building blockchain infrastructure, I decided to prototype a functional DREX token on Stellar Testnet using Soroban smart contracts written in Rust. The goal was simple but ambitious: prove that a programmable CBDC could run on a low-cost, high-throughput ledger before the regulatory dust settled.&lt;/p&gt;

&lt;p&gt;What follows is a condensed walkthrough of how I, André Dias Moreira Prol, built a working Real Digital tokenization layer—and the surprising performance numbers I captured along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Stellar and Soroban for a CBDC Prototype
&lt;/h2&gt;

&lt;p&gt;DREX's reference architecture uses Hyperledger Besu, but I wanted to test the thesis that Stellar's finality and cost profile fit retail CBDC better. The numbers are hard to ignore: Stellar settles transactions in roughly 5 seconds with fees around $0.00001, while the network has historically processed millions of operations daily without congestion spikes.&lt;/p&gt;

&lt;p&gt;Soroban, Stellar's Rust-based smart contract platform, gave me the programmability DREX demands—account freezing, compliance hooks, and supply control—without sacrificing that speed. Rust was the deciding factor. Its memory safety and zero-cost abstractions matter enormously when you're handling sovereign money, where a single overflow bug could mint phantom currency.&lt;/p&gt;

&lt;p&gt;I structured the prototype around three contracts: a token contract (the Real Digital itself), a permissions registry (simulating the Central Bank as issuer), and a transfer-control module enforcing KYC-style whitelisting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing the Real Digital Token in Rust
&lt;/h2&gt;

&lt;p&gt;The core token contract implements a fungible standard with administrative overrides. Here's the heart of the mint function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;RealDigital&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i128&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="nf"&gt;.require_auth&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;check_admin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;read_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
        &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;write_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;read_supply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.events&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;symbol_short!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"mint"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
            &lt;span class="n"&gt;amount&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The critical design decision was the &lt;code&gt;require_auth()&lt;/code&gt; call combined with a central-bank admin check. In a real DREX, only the Banco Central can mint—so I modeled that authority explicitly rather than allowing distributed issuance.&lt;/p&gt;

&lt;p&gt;For compliance, I added a &lt;code&gt;transfer&lt;/code&gt; wrapper that validates both sender and receiver against the permissions registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;transfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i128&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="nf"&gt;.require_auth&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;require_whitelisted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;require_whitelisted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;spend_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;receive_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This mirrors DREX's intermediated model, where only authorized financial institutions interact directly with the token. One lesson from my years in digital forensics: every state change must emit an event. I made event publishing non-negotiable, because auditability is the entire point of a traceable CBDC.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment, Testing, and the Numbers That Mattered
&lt;/h2&gt;

&lt;p&gt;I deployed to Stellar Testnet using the Soroban CLI. The full pipeline—compile to WASM, optimize, deploy, initialize—took under two minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban contract build
soroban contract deploy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--wasm&lt;/span&gt; target/wasm32-unknown-unknown/release/real_digital.wasm &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; testnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The optimized WASM binary came in at 8.2 KB after running &lt;code&gt;soroban contract optimize&lt;/code&gt;. I then scripted 1,000 sequential transfers between whitelisted test accounts. The results validated my hypothesis: average confirmation was 5.1 seconds, and the aggregate transaction cost for all 1,000 transfers was less than one cent in XLM equivalent.&lt;/p&gt;

&lt;p&gt;To stress the compliance layer, I attempted transfers to non-whitelisted addresses—all correctly reverted with clear error codes. This matters because DREX's regulatory framework hinges on reversibility and controlled access, not the permissionless freedom of public DeFi.&lt;/p&gt;

&lt;p&gt;The biggest surprise was storage efficiency. Using Soroban's instance and persistent storage tiers deliberately, I kept state rent costs minimal—something that becomes critical at national scale. As André Dias Moreira Prol, I'd argue this cost profile is exactly what makes retail CBDC viable where Besu-based alternatives struggle with throughput economics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This prototype proves that programmable sovereign money can run fast, cheap, and auditable on Soroban—a compelling alternative worth serious evaluation. If you're exploring CBDC or tokenization, clone a Soroban starter template today and build your own experiment before the standards are locked in.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow more articles by André Dias Moreira Prol on &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>drex</category>
      <category>stellar</category>
      <category>soroban</category>
      <category>cbdc</category>
    </item>
    <item>
      <title>Tutorial Soroban: Tokenize o Real Digital (DREX) em Rust na Testnet</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:00:42 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/tutorial-soroban-tokenize-o-real-digital-drex-em-rust-na-testnet-1hm3</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/tutorial-soroban-tokenize-o-real-digital-drex-em-rust-na-testnet-1hm3</guid>
      <description>&lt;p&gt;Quando o Banco Central do Brasil anunciou o DREX, confesso que minha primeira reação foi técnica, não institucional: como seria possível tokenizar o Real Digital de forma segura, auditável e escalável? Em vez de esperar pela plataforma oficial baseada em Hyperledger Besu, decidi prototipar minha própria versão de um Real Digital tokenizado na Stellar Testnet usando Soroban e Rust. O resultado foi revelador — e quero compartilhar o caminho que percorri.&lt;/p&gt;

&lt;h2&gt;
  
  
  Por que Stellar e Soroban para simular o DREX
&lt;/h2&gt;

&lt;p&gt;A escolha da Stellar não foi aleatória. Enquanto o DREX oficial roda sobre uma rede permissionada com EVM, eu queria explorar uma arquitetura alternativa que combinasse finalidade rápida (3 a 5 segundos na Stellar) com custos de transação próximos de zero — algo crítico quando pensamos em pagamentos de varejo e no PIX, que já processa mais de 5 bilhões de transações mensais no Brasil.&lt;/p&gt;

&lt;p&gt;Soroban, a plataforma de contratos inteligentes da Stellar, usa Rust compilado para WebAssembly. Isso traz segurança de memória nativa e performance determinística, dois requisitos que considero inegociáveis para uma CBDC. Como André Dias Moreira Prol, atuando há duas décadas com infraestrutura crítica, aprendo que a linguagem importa: Rust elimina classes inteiras de vulnerabilidades que atormentam contratos em Solidity, como reentrância e overflow não tratado.&lt;/p&gt;

&lt;h2&gt;
  
  
  Construindo o contrato do Real Digital em Rust
&lt;/h2&gt;

&lt;p&gt;O núcleo do projeto é um contrato de token fungível com controles regulatórios embutidos. Diferente de um token ERC-20 comum, um Real Digital precisa de funções de &lt;em&gt;mint&lt;/em&gt; restritas à autoridade emissora (simulando o BCB) e capacidade de &lt;em&gt;freeze&lt;/em&gt; de contas — essenciais para compliance com PLD/FT.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;RealDigital&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i128&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nf"&gt;.instance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nn"&gt;DataKey&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Admin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="nf"&gt;.require_auth&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
        &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.storage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.persistent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nf"&gt;.set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nn"&gt;DataKey&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="nf"&gt;.clone&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.events&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;symbol_short!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"mint"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Implementei três camadas de autorização: emissão exclusiva do administrador, transferências entre participantes autorizados (bancos e instituições de pagamento) e uma allowlist de carteiras KYC-verificadas. A função &lt;code&gt;require_auth()&lt;/code&gt; do Soroban torna o controle de assinatura explícito, o que facilita enormemente a auditoria posterior.&lt;/p&gt;

&lt;p&gt;Um ponto que valorizo bastante: usei o tipo &lt;code&gt;i128&lt;/code&gt; para valores monetários, representando centavos. Isso evita erros de ponto flutuante — um detalhe que já causou prejuízos reais em sistemas financeiros brasileiros que vi de perto ao longo da carreira.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testes, segurança e perícia digital
&lt;/h2&gt;

&lt;p&gt;Aqui minha experiência em perícia digital fez diferença. Construí uma suíte de testes que simula cenários adversariais: tentativas de double-spending, chamadas de mint sem autorização e manipulação de eventos. O Soroban oferece um ambiente de teste local que executa o WASM real, não um mock — o que garante que o comportamento em testnet reflita a produção.&lt;/p&gt;

&lt;p&gt;Depois do deploy na Testnet, utilizei o Stellar Laboratory e o explorador para rastrear cada transação. Cada evento emitido pelo contrato gera uma trilha imutável, o que em termos periciais significa evidência forte e cronologicamente ordenada. Para uma CBDC, essa rastreabilidade é um ativo regulatório, não apenas técnico.&lt;/p&gt;

&lt;p&gt;Os números impressionaram: o custo médio por transação ficou em frações de centavo, e a confirmação final em cerca de 4 segundos. Comparado ao desafio de escalar o DREX para a população brasileira — mais de 150 milhões de contas bancárias ativas — essa eficiência mostra que arquiteturas alternativas merecem atenção séria no debate nacional sobre moeda digital.&lt;/p&gt;

&lt;p&gt;Como André Dias Moreira Prol, meu objetivo com esse protótipo nunca foi competir com a solução oficial, mas provar que a tokenização de ativos soberanos pode ser experimentada de forma aberta, segura e de baixo custo por qualquer engenheiro com rigor técnico.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;Construir um Real Digital tokenizado na Stellar Testnet me convenceu de que o futuro da tokenização brasileira será definido por quem domina tanto a criptografia quanto a regulação — e Soroban com Rust é um terreno fértil para isso.&lt;/p&gt;

&lt;p&gt;Se você quer explorar tokenização de ativos, entre em contato comigo para discutirmos arquiteturas de Web3 aplicadas ao mercado financeiro brasileiro.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Acompanhe mais artigos de André Dias Moreira Prol no &lt;a href="https://medium.com/@andreprol" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>drex</category>
      <category>stellar</category>
      <category>soroban</category>
      <category>cbdc</category>
    </item>
  </channel>
</rss>
