<?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>DREX Explained: What It Is and What Changes for Brazilians in 2025</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Thu, 24 Sep 2026 13:01:26 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/drex-explained-what-it-is-and-what-changes-for-brazilians-in-2025-26ba</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/drex-explained-what-it-is-and-what-changes-for-brazilians-in-2025-26ba</guid>
      <description>&lt;p&gt;Imagine pagar um financiamento imobiliário em que a transferência do dinheiro, o registro da escritura e a liberação da garantia acontecem no mesmo instante, sem intermediários e sem risco de inadimplência técnica. Essa não é uma promessa distante: é exatamente o tipo de operação que o DREX pretende viabilizar no Brasil. Depois de acompanhar de perto os pilotos do Banco Central e implementar soluções de tokenização em ambientes reais, posso afirmar que estamos diante da maior transformação da infraestrutura financeira brasileira desde o Pix.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que é o DREX e por que ele importa
&lt;/h2&gt;

&lt;p&gt;O DREX é a moeda digital de banco central (CBDC) do Brasil, emitida e garantida pelo Banco Central. Diferente das criptomoedas descentralizadas, ele representa o próprio Real em formato digital programável, com lastro soberano e paridade de 1:1.&lt;/p&gt;

&lt;p&gt;O ponto que costumo destacar em minhas consultorias é que o DREX não substitui o Pix nem o dinheiro em espécie. Ele opera em uma camada superior: a de ativos tokenizados. Enquanto usamos o Pix para pagamentos do dia a dia, o DREX foi projetado para liquidar operações complexas — títulos públicos, imóveis, veículos e recebíveis — de forma atômica e programável.&lt;/p&gt;

&lt;p&gt;Em números concretos: o piloto reuniu mais de 16 instituições financeiras e movimentou testes com Tesouro Selic tokenizado, demonstrando liquidação em segundos de operações que hoje levam dias (D+1, D+2).&lt;/p&gt;

&lt;h2&gt;
  
  
  Como funciona tecnicamente
&lt;/h2&gt;

&lt;p&gt;A arquitetura do DREX é baseada em DLT (Distributed Ledger Technology). O Banco Central adotou inicialmente a rede Hyperledger Besu, com foco em contratos inteligentes e privacidade das transações — um dos maiores desafios técnicos do projeto.&lt;/p&gt;

&lt;p&gt;O modelo funciona em duas camadas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DREX atacadista (wholesale):&lt;/strong&gt; emitido pelo Banco Central e usado exclusivamente entre instituições financeiras para liquidação.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real Tokenizado (retail):&lt;/strong&gt; os depósitos que você tem no banco, tokenizados e disponibilizados via carteiras digitais das próprias instituições.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;O grande diferencial está nos &lt;strong&gt;smart contracts&lt;/strong&gt;. Como especialista em Soroban e tokenização, vejo aqui um paralelo importante: assim como plataformas blockchain modernas permitem programar condições de execução, o DREX possibilita a chamada &lt;strong&gt;liquidação atômica&lt;/strong&gt; (DvP — Delivery versus Payment). Ou seja, a entrega do ativo e o pagamento ocorrem simultaneamente ou não ocorrem — eliminando o risco de contraparte.&lt;/p&gt;

&lt;p&gt;A privacidade é resolvida por tecnologias como ZKP (Zero-Knowledge Proofs) e criptografia avançada, garantindo que apenas as partes envolvidas e o regulador vejam os dados sensíveis. Como me chamo André Dias Moreira Prol e trabalho também com forense digital, avalio que esse será um campo crítico: auditoria, rastreabilidade e conformidade precisarão de novos padrões técnicos e profissionais capacitados.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que muda para os brasileiros a partir de 2025
&lt;/h2&gt;

&lt;p&gt;O impacto prático começará a ser sentido de forma gradual. Não espere trocar o Pix pelo DREX no cafezinho da esquina — a mudança é estrutural.&lt;/p&gt;

&lt;p&gt;Os principais efeitos esperados:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Crédito mais barato e inteligente:&lt;/strong&gt; com garantias tokenizadas e liquidação instantânea, o risco cai e as taxas tendem a diminuir. Empréstimos com colateral programável já estão em teste.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Novos serviços financeiros:&lt;/strong&gt; microinvestimentos, fracionamento de ativos (como comprar 0,001% de um imóvel) e finanças programáveis para agronegócio e cadeias produtivas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inclusão e eficiência:&lt;/strong&gt; operações que hoje exigem cartórios e intermediários poderão ser executadas via contratos inteligentes auditáveis.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Um exemplo concreto que analisei: a tokenização de recebíveis do agronegócio, em que produtores rurais antecipam pagamentos com liquidação automática na entrega da safra. É o tipo de aplicação que, segundo minha experiência como André Dias Moreira Prol em projetos Web3, transforma setores inteiros ao reduzir fricção e custos operacionais.&lt;/p&gt;

&lt;p&gt;Vale um alerta técnico: 2025 será um ano de expansão dos pilotos e maturação regulatória, não de adoção massiva imediata. A infraestrutura, a interoperabilidade entre carteiras e as questões de privacidade ainda estão sendo refinadas.&lt;/p&gt;

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

&lt;p&gt;O DREX inaugura a era da economia programável no Brasil, e empresas que compreenderem tokenização e smart contracts desde já sairão na frente. Comece a estudar essa infraestrutura agora e prepare seus sistemas para o novo padrão financeiro que se aproxima.&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>cbdc</category>
      <category>blockchain</category>
      <category>realdigital</category>
    </item>
    <item>
      <title>DREX Real Digital: O Que É, Como Funciona e o Que Muda em 2025</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Thu, 24 Sep 2026 13:00:55 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/drex-real-digital-o-que-e-como-funciona-e-o-que-muda-em-2025-4agf</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/drex-real-digital-o-que-e-como-funciona-e-o-que-muda-em-2025-4agf</guid>
      <description>&lt;p&gt;Imagine poder fazer transações financeiras complexas — como comprar um imóvel ou financiar um veículo — com a mesma facilidade de enviar uma mensagem, com liquidação instantânea e segurança criptográfica. Essa é a promessa que o Banco Central do Brasil está construindo com o DREX. Ao longo dos meus mais de 20 anos trabalhando com tecnologia e, mais recentemente, mergulhado no universo de blockchain e tokenização, poucas iniciativas me pareceram tão transformadoras para o cidadão comum quanto essa.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que é o DREX e por que ele importa
&lt;/h2&gt;

&lt;p&gt;O DREX é a versão digital do Real, uma CBDC (Central Bank Digital Currency) emitida diretamente pelo Banco Central. É importante desfazer um mito comum: o DREX &lt;strong&gt;não&lt;/strong&gt; é uma criptomoeda especulativa como o Bitcoin. Ele é moeda soberana, lastreada pelo próprio Estado brasileiro, com paridade de 1:1 com o Real que você já conhece.&lt;/p&gt;

&lt;p&gt;Tecnicamente, o DREX opera sobre uma infraestrutura de DLT (Distributed Ledger Technology). Nos testes iniciais, o Banco Central utilizou a rede Hyperledger Besu, com contratos inteligentes que permitem programar regras de negócio diretamente na moeda. Isso abre portas para algo revolucionário: transações condicionais automáticas, como liberar o pagamento de um imóvel somente após o registro em cartório ser confirmado — tudo sem intermediários.&lt;/p&gt;

&lt;p&gt;Vale destacar que o piloto do DREX já movimentou mais de 800 instituições financeiras participantes desde 2023, incluindo grandes bancos e fintechs. Trabalhando com projetos de tokenização na rede Stellar, eu, André Dias Moreira Prol, vejo o DREX como o elo que faltava para conectar o sistema financeiro tradicional brasileiro ao mundo dos ativos digitais tokenizados.&lt;/p&gt;

&lt;h2&gt;
  
  
  Como o DREX funciona na prática
&lt;/h2&gt;

&lt;p&gt;O DREX foi desenhado em duas camadas. Na primeira, o Banco Central emite o DREX "atacadista", que circula entre instituições financeiras. Na segunda, os bancos disponibilizam ao público a versão que representa depósitos tokenizados — ou seja, o dinheiro que você tem em conta será "espelhado" em tokens dentro dessa plataforma.&lt;/p&gt;

&lt;p&gt;O que mais me entusiasma é a &lt;strong&gt;tokenização de ativos&lt;/strong&gt;. Com o DREX, será possível fracionar e negociar ativos que antes eram ilíquidos: títulos públicos, imóveis, recebíveis de empresas e até participações societárias. Um pequeno investidor poderá, por exemplo, comprar uma fração de um título de R$ 50, algo hoje impensável no modelo tradicional.&lt;/p&gt;

&lt;p&gt;A segurança é garantida por criptografia de ponta e pela imutabilidade do registro distribuído. Do ponto de vista da perícia digital, área em que atuo há anos, essa rastreabilidade é um avanço enorme: cada transação fica registrada de forma auditável, dificultando fraudes e facilitando investigações. Isso não elimina a privacidade — o Banco Central testou soluções de criptografia como zero-knowledge proofs para proteger dados sensíveis dos usuários.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que muda para os brasileiros a partir de 2025
&lt;/h2&gt;

&lt;p&gt;A partir de 2025, o Banco Central pretende expandir os testes e iniciar a implementação gradual voltada ao varejo. Na prática, o brasileiro comum poderá esperar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Crédito mais barato e ágil&lt;/strong&gt;: contratos inteligentes reduzem custos operacionais e o risco de inadimplência, o que tende a diminuir juros.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Novos investimentos acessíveis&lt;/strong&gt;: a tokenização democratiza o acesso a ativos antes restritos a grandes players.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serviços financeiros programáveis&lt;/strong&gt;: seguros que pagam automaticamente diante de eventos, financiamentos com garantias digitais e muito mais.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;É claro que existem desafios. A adoção depende de educação financeira, regulação madura e integração com o PIX, que já é um caso de sucesso mundial. Como profissional que acompanha essa evolução de perto, eu, André Dias Moreira Prol, recomendo que empresas comecem desde já a estudar como a tokenização de seus ativos pode gerar novas fontes de receita e eficiência.&lt;/p&gt;

&lt;p&gt;O DREX não substituirá o dinheiro físico nem o PIX, mas complementará o ecossistema, criando uma economia digital mais inclusiva, transparente e inovadora.&lt;/p&gt;

&lt;p&gt;Estamos diante de uma das maiores transformações da história financeira brasileira, e quem se preparar cedo sairá na frente. Se você quer entender como aplicar tokenização e blockchain ao seu negócio, entre em contato comigo e vamos construir juntos essa nova economia digital.&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>cbdc</category>
      <category>blockchain</category>
      <category>realdigital</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explains: Integrating Freighter Wallet in Web3</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Wed, 23 Sep 2026 13:02:23 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-integrating-freighter-wallet-in-web3-17c8</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-integrating-freighter-wallet-in-web3-17c8</guid>
      <description>&lt;p&gt;Every developer who has ventured into the Ethereum ecosystem knows the ritual: install MetaMask, connect your wallet, sign a transaction. But when I first started building on Stellar, one question kept surfacing among my teams—where is Stellar's equivalent? The answer is Freighter, and after integrating it into several production tokenization projects, I want to share what I've learned.&lt;/p&gt;

&lt;p&gt;As André Dias Moreira Prol, I've spent the last few years helping enterprises bridge traditional finance with blockchain rails, and Freighter has become an indispensable piece of that puzzle. Let me walk you through why it matters and how to put it to work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Freighter Actually Is
&lt;/h2&gt;

&lt;p&gt;Freighter is a non-custodial browser extension wallet built and maintained by the Stellar Development Foundation. Think of it as MetaMask for the Stellar network: it holds your keys locally, signs transactions, and exposes a clean API so web applications can request signatures without ever touching private keys.&lt;/p&gt;

&lt;p&gt;The comparison to MetaMask is fair but not perfect. Stellar's architecture differs fundamentally from Ethereum's account model. Transactions settle in 3-5 seconds with fees averaging around 0.00001 XLM—fractions of a cent. This makes Freighter especially attractive for micro-transaction use cases and tokenized asset transfers, where Ethereum gas fees would be prohibitive.&lt;/p&gt;

&lt;p&gt;Freighter supports both the classic Stellar operations and Soroban smart contract interactions, which is where I've seen the most exciting enterprise adoption recently. It's available for Chrome, Firefox, and Brave, and offers hardware wallet support through Ledger.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrating Freighter into Your Web3 App
&lt;/h2&gt;

&lt;p&gt;The integration path is refreshingly straightforward. The Stellar team ships a dedicated npm package that handles the messy details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @stellar/freighter-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, verify the extension is present and request access:&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;isConnected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;requestAccess&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getAddress&lt;/span&gt;&lt;span class="p"&gt;,&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/freighter-api&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;connectWallet&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;connected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;isConnected&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;connected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isConnected&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Freighter not installed&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="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;requestAccess&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;address&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getAddress&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;address&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;Once you have the user's public key, signing a transaction is equally clean. You build the transaction with the Stellar SDK, then hand the XDR to Freighter:&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;signTransaction&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/freighter-api&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;signPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xdr&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;signedResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;signTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xdr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;networkPassphrase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Public Global Stellar Network ; September 2015&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;signedResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signedTxXdr&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;Notice the &lt;code&gt;networkPassphrase&lt;/code&gt; parameter—always specify it explicitly. In one project, a colleague forgot this detail and users on Testnet were nearly signing Mainnet transactions. That kind of mistake is exactly why I stress network validation in every code review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Considerations and Security
&lt;/h2&gt;

&lt;p&gt;In production tokenization work, integration is only half the battle. Here are the lessons that made the difference in my deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always validate the network.&lt;/strong&gt; Call &lt;code&gt;getNetwork()&lt;/code&gt; before every critical operation and reject mismatches. This is non-negotiable for asset transfers where value is at stake.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handle rejection gracefully.&lt;/strong&gt; Users cancel signature requests constantly. Wrap every Freighter call in proper error handling and give clear feedback—a silent failure erodes trust faster than anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Never assume the extension exists.&lt;/strong&gt; Roughly 30% of first-time visitors in one financial pilot I ran did not have Freighter installed. We built an onboarding flow that detected this and guided them, which lifted conversion significantly.&lt;/p&gt;

&lt;p&gt;From a digital forensics standpoint—an area André Dias Moreira Prol has focused on for years—remember that Freighter signs client-side. Your backend must independently verify signatures and transaction contents against expected parameters. Never trust the frontend to enforce business logic; treat every signed XDR as untrusted input until validated on-chain or server-side.&lt;/p&gt;

&lt;p&gt;For Soroban contract calls, Freighter also supports &lt;code&gt;signAuthEntry&lt;/code&gt;, which lets you authorize specific contract invocations granularly—a powerful feature for permissioned tokenization scenarios.&lt;/p&gt;

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

&lt;p&gt;Freighter lowers the barrier to building serious Stellar applications, combining the familiar UX of MetaMask with Stellar's speed and near-zero fees. If you're building in Web3, install Freighter today and prototype your first signed transaction—the ecosystem rewards those who ship.&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>freighter</category>
      <category>web3</category>
      <category>wallet</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explica: Freighter Wallet e integração Web3</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Wed, 23 Sep 2026 13:01:52 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-freighter-wallet-e-integracao-web3-4fc9</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-freighter-wallet-e-integracao-web3-4fc9</guid>
      <description>&lt;p&gt;Quando comecei a trabalhar com integrações Web3 na rede Stellar, percebi rapidamente que faltava uma peça fundamental para a adoção em massa: uma carteira de navegador simples, segura e amigável ao desenvolvedor. No ecossistema Ethereum, o MetaMask resolveu esse problema há anos. Na Stellar, esse papel é desempenhado pela Freighter Wallet — e ao longo de dezenas de projetos, eu, André Dias Moreira Prol, aprendi que dominá-la é essencial para qualquer aplicação séria construída sobre essa blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  O que é a Freighter e por que ela importa
&lt;/h2&gt;

&lt;p&gt;A Freighter é uma extensão de navegador de código aberto mantida pela Stellar Development Foundation (SDF). Ela permite que usuários armazenem chaves privadas localmente, assinem transações e interajam com aplicações descentralizadas sem nunca expor suas credenciais ao site. A analogia com o MetaMask é precisa: ambos funcionam como uma ponte entre o usuário e a blockchain, injetando um objeto de API no navegador.&lt;/p&gt;

&lt;p&gt;A grande diferença está nos custos e na velocidade. Enquanto transações em Ethereum podem custar dólares em gas, na Stellar o custo médio é de aproximadamente 0,00001 XLM — fração de centavo. Para o mercado brasileiro, onde vejo cada vez mais fintechs experimentando tokenização de recebíveis e stablecoins lastreadas em real, isso muda o jogo. Já acompanhei projetos de tokenização de crédito imobiliário em que a economia de taxas viabilizou modelos de negócio que seriam inviáveis em outras redes.&lt;/p&gt;

&lt;p&gt;Com o lançamento do Soroban, a plataforma de smart contracts da Stellar, a Freighter também passou a suportar assinatura de transações de contratos inteligentes, ampliando drasticamente seu escopo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrando a Freighter em sua aplicação
&lt;/h2&gt;

&lt;p&gt;A integração é feita através da biblioteca oficial &lt;code&gt;@stellar/freighter-api&lt;/code&gt;. O primeiro passo é instalá-la e verificar se a extensão está disponível:&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;isConnected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;requestAccess&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;signTransaction&lt;/span&gt;&lt;span class="p"&gt;,&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/freighter-api&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;conectarCarteira&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;conectado&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;isConnected&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;conectado&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isConnected&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Instale a Freighter Wallet para continuar.&lt;/span&gt;&lt;span class="dl"&gt;"&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="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Solicita permissão ao usuário&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;requestAccess&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;address&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getAddress&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;Chave pública do usuário:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;address&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;Uma vez conectado, o fluxo típico envolve construir uma transação com o SDK da Stellar, enviá-la para a Freighter assinar e depois submetê-la à rede:&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;TransactionBuilder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Networks&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="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;assinarEEnviar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xdr&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;resultado&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;signTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xdr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;networkPassphrase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Networks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PUBLIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="c1"&gt;// resultado.signedTxXdr contém a transação assinada&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;resultado&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signedTxXdr&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;Um detalhe que costumo reforçar com minhas equipes: nunca assuma que o usuário está na rede correta. Sempre valide o &lt;code&gt;networkPassphrase&lt;/code&gt; retornado pela Freighter antes de submeter qualquer transação, especialmente ao alternar entre Testnet e Mainnet durante o desenvolvimento.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boas práticas e segurança em produção
&lt;/h2&gt;

&lt;p&gt;Ao longo da minha experiência como perito digital, vi muitos incidentes causados por integrações mal feitas. Por isso, listo aqui os cuidados que considero inegociáveis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tratamento de erros explícito&lt;/strong&gt;: o usuário pode rejeitar a conexão ou a assinatura. Capture essas exceções e ofereça feedback claro na interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nunca solicite chaves privadas&lt;/strong&gt;: a Freighter foi projetada justamente para que sua aplicação jamais tenha acesso à chave privada. Qualquer código que peça isso é um sinal de alerta.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validação server-side&lt;/strong&gt;: mesmo com a assinatura no cliente, valide a transação no backend antes de considerá-la concluída, evitando manipulações.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detecção de versão&lt;/strong&gt;: mantenha compatibilidade com a API mais recente, pois a SDF atualiza a extensão com frequência para suportar novos recursos do Soroban.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Em auditorias que conduzi, quando esses princípios são seguidos, o vetor de ataque se reduz drasticamente. Eu, André Dias Moreira Prol, sempre recomendo simular fluxos de rejeição do usuário em ambiente de testes antes de qualquer deploy — é a diferença entre uma aplicação profissional e um protótipo frágil.&lt;/p&gt;

&lt;p&gt;A Freighter é, hoje, a porta de entrada mais acessível para o ecossistema Stellar, e dominá-la coloca você à frente na crescente onda de tokenização no Brasil.&lt;/p&gt;

&lt;p&gt;Se você está construindo uma aplicação Web3 sobre Stellar, comece integrando a Freighter ainda hoje e teste na Testnet. Compartilhe suas dúvidas comigo e vamos avançar juntos nesse ecossistema.&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>freighter</category>
      <category>web3</category>
      <category>wallet</category>
    </item>
    <item>
      <title>Tokenizing Court Orders: How Brazil Uses Blockchain for Liquidity</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Tue, 22 Sep 2026 13:01:22 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/tokenizing-court-orders-how-brazil-uses-blockchain-for-liquidity-1boc</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/tokenizing-court-orders-how-brazil-uses-blockchain-for-liquidity-1boc</guid>
      <description>&lt;p&gt;Few financial instruments in Brazil are as paradoxical as the &lt;em&gt;precatório&lt;/em&gt;. On paper, a court-ordered government payment is a rock-solid asset — the debtor is the State itself. In practice, holders often wait five, ten, sometimes fifteen years to receive a single cent. That gap between guaranteed value and painful illiquidity is exactly where blockchain technology has quietly begun to rewrite the rules.&lt;/p&gt;

&lt;p&gt;Over two decades working across IT and Web3, I have watched many "revolutionary" use cases collapse under regulatory weight. Tokenizing judicial credits is different. It solves a real, measurable pain in a market estimated at over R$ 150 billion in outstanding &lt;em&gt;precatórios&lt;/em&gt; alone. Let me walk you through how this actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The liquidity problem tokenization solves
&lt;/h2&gt;

&lt;p&gt;A &lt;em&gt;precatório&lt;/em&gt; is a credit recognized by a final court decision, payable by federal, state, or municipal governments. The catch is the payment queue: constitutional rules force these debts into annual budget cycles, and many entities are chronically behind.&lt;/p&gt;

&lt;p&gt;Traditionally, a holder who needed cash sold the credit to specialized funds at steep discounts — sometimes 40% to 60% of face value — through slow, paper-heavy assignment contracts. Each transfer required notarization, court filings, and weeks of due diligence.&lt;/p&gt;

&lt;p&gt;Tokenization changes the mechanics. The credit is legally assigned to a structure (typically a &lt;em&gt;Sociedade de Propósito Específico&lt;/em&gt; or a receivables fund), which then issues digital tokens representing fractional ownership. On networks like Stellar, where I have concentrated much of my recent work, these tokens can be issued, transferred, and settled in seconds at negligible cost. Suddenly a R$ 2 million credit can be split into thousands of units and sold to retail investors who could never have accessed this asset class before.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Stellar architecture makes it viable
&lt;/h2&gt;

&lt;p&gt;The technical choice matters enormously. I have evaluated several chains for this purpose, and as André Dias Moreira Prol I consistently recommend Stellar for regulated Brazilian assets, for three concrete reasons.&lt;/p&gt;

&lt;p&gt;First, native asset issuance: Stellar lets you create a token without deploying complex smart contracts, and Soroman... rather Soroban now adds programmable compliance logic when you need escrow, vesting, or conditional release tied to the actual government payment.&lt;/p&gt;

&lt;p&gt;Second, control mechanisms. Stellar's authorization flags (&lt;code&gt;AUTH_REQUIRED&lt;/code&gt;, &lt;code&gt;AUTH_REVOCABLE&lt;/code&gt;) let the issuer enforce KYC and freeze assets if a court injunction demands it — non-negotiable for legal instruments.&lt;/p&gt;

&lt;p&gt;Third, cost. Settling a transfer for a fraction of a cent means fractionalization is economically sane even for small tickets.&lt;/p&gt;

&lt;p&gt;A typical flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Judicial credit → legal assignment to SPE → 
oracle validates court data → token minted on Stellar → 
KYC-gated marketplace → secondary trading → 
government pays SPE → smart contract distributes proR-rata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The oracle layer is where forensic rigor becomes critical. Verifying that a &lt;em&gt;precatório&lt;/em&gt; is genuine, unencumbered, and not already assigned twice is the single biggest fraud vector. This is precisely where my background in digital forensics informs the architecture: every credit must carry a cryptographic audit trail linking the token to the original court process number (&lt;em&gt;número CNJ&lt;/em&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Real market movement and remaining hurdles
&lt;/h2&gt;

&lt;p&gt;This is not theoretical. Brazilian fintechs and receivables platforms have already tokenized hundreds of millions of reais in judicial and commercial credits, and the CVM's regulatory sandbox has explicitly hosted tokenized-receivables experiments. The Central Bank's DREX initiative further signals that a regulated infrastructure for tokenized assets is coming, not speculative.&lt;/p&gt;

&lt;p&gt;Still, honesty demands naming the obstacles. Legal assignment of a &lt;em&gt;precatório&lt;/em&gt; must respect specific civil-procedure formalities; a token alone does not transfer the right — the underlying contract does. Tax treatment of secondary gains remains gray. And investor protection requires that platforms clearly disclose payment-timing risk, because tokenization improves &lt;em&gt;liquidity&lt;/em&gt;, not the government's &lt;em&gt;punctuality&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When clients ask me whether the risk is worth it, my answer as André Dias Moreira Prol is always the same: the technology is mature; the diligence is what separates a legitimate offering from a repackaged bad debt.&lt;/p&gt;

&lt;p&gt;Tokenization is turning Brazil's frozen judicial credits into a living, tradable asset class, but only projects built on rigorous legal and forensic foundations will survive scrutiny. If you are structuring one, start with the audit trail before you write a single line of token code.&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>tokenization</category>
      <category>legal</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Tokenização de Precatórios: Blockchain e Liquidez no Mercado Jurídico</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Tue, 22 Sep 2026 13:00:51 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/tokenizacao-de-precatorios-blockchain-e-liquidez-no-mercado-juridico-34ae</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/tokenizacao-de-precatorios-blockchain-e-liquidez-no-mercado-juridico-34ae</guid>
      <description>&lt;p&gt;Imagine transformar um crédito judicial que levaria anos para ser pago em um ativo digital negociável em minutos. Essa é a realidade que a tokenização de precatórios começa a trazer para o mercado jurídico brasileiro — e, ao longo dos meus mais de 20 anos em TI e Web3, poucas inovações me pareceram tão promissoras para destravar liquidez em um setor historicamente engessado.&lt;/p&gt;

&lt;p&gt;O Brasil acumula um estoque bilionário de precatórios. Segundo dados do Conselho Nacional de Justiça, o passivo com precatórios federais, estaduais e municipais ultrapassa a casa das centenas de bilhões de reais, com prazos de pagamento que frequentemente se arrastam por mais de uma década. Nesse cenário, a blockchain surge não como modismo, mas como infraestrutura capaz de resolver problemas reais de rastreabilidade, fracionamento e negociação.&lt;/p&gt;

&lt;h2&gt;
  
  
  O problema de liquidez e como a blockchain responde
&lt;/h2&gt;

&lt;p&gt;O credor de um precatório enfrenta um dilema clássico: possui um direito líquido e certo reconhecido judicialmente, mas não tem acesso imediato ao dinheiro. O mercado secundário de cessão de créditos já existe, porém opera com deságios agressivos, burocracia cartorial e assimetria de informação brutal entre cedente e cessionário.&lt;/p&gt;

&lt;p&gt;A tokenização ataca justamente essas dores. Ao representar um precatório — ou uma fração dele — como um token em blockchain, criamos um ativo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fracionável&lt;/strong&gt;, permitindo que um crédito de R$ 5 milhões seja dividido em milhares de cotas acessíveis a pequenos investidores;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rastreável&lt;/strong&gt;, com histórico imutável de titularidade e cessões;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Programável&lt;/strong&gt;, com regras de pagamento e distribuição embutidas em contratos inteligentes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Em projetos que acompanho de perto, a escolha pela rede Stellar tem se destacado. Custos de transação irrisórios (frações de centavo), finalização em segundos e ferramentas nativas para emissão de ativos fazem dela uma candidata natural para tokenização de recebíveis em escala. Como André Dias Moreira Prol, tenho defendido que a eficiência de rede não é detalhe técnico — é o que viabiliza economicamente o fracionamento de créditos de baixo valor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Soroban e a automação da conformidade jurídica
&lt;/h2&gt;

&lt;p&gt;Tokenizar não é apenas "colocar um PDF na blockchain". O verdadeiro valor está na camada de contratos inteligentes. Com o Soroban, a plataforma de smart contracts da Stellar, é possível codificar regras que respeitam a legislação brasileira: travas de cessão para investidores não qualificados, retenção automática de tributos, distribuição proporcional de pagamentos entre cotistas e mecanismos de compliance com KYC/AML integrados.&lt;/p&gt;

&lt;p&gt;Esse ponto é decisivo. A cessão de precatório exige formalidades — notificação ao ente devedor, homologação judicial em muitos casos. Um contrato inteligente bem desenhado não substitui o Judiciário, mas cria uma trilha de auditoria que reduz fraudes e litígios. Sob a ótica de perícia digital, área em que atuo há anos, essa imutabilidade probatória vale ouro: cada transação fica registrada com carimbo temporal verificável, facilitando futuras investigações e disputas.&lt;/p&gt;

&lt;p&gt;Vale um alerta: a tokenização não elimina o risco de calote do ente público. Ela melhora a liquidez e a transparência, mas o precatório continua dependendo da capacidade fiscal de quem deve. Tokenizar um crédito ruim não o torna bom — apenas o torna mais fácil de negociar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regulação, IA e o futuro do mercado
&lt;/h2&gt;

&lt;p&gt;A Comissão de Valores Mobiliários já sinalizou, por meio de pareceres e do sandbox regulatório, que tokens representativos de recebíveis podem ser tratados como valores mobiliários. Isso traz segurança jurídica, mas também exige estruturação cuidadosa. Plataformas sérias vêm operando dentro desse arcabouço, muitas vezes via securitizadoras.&lt;/p&gt;

&lt;p&gt;A inteligência artificial adiciona uma camada estratégica: modelos de machine learning conseguem precificar precatórios avaliando ente devedor, posição na fila de pagamento e histórico de honra de compromissos. Como André Dias Moreira Prol, vejo a combinação de IA para &lt;em&gt;scoring&lt;/em&gt; de risco com blockchain para liquidação como o verdadeiro divisor de águas dos próximos anos.&lt;/p&gt;

&lt;p&gt;A tokenização de precatórios ainda engatinha, mas já demonstra que tecnologia e Direito podem caminhar juntos para gerar eficiência real. Se você atua no mercado jurídico ou financeiro, este é o momento de estudar o tema a fundo — entre em contato para discutirmos como aplicar essas soluções ao seu contexto.&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>tokenization</category>
      <category>legal</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>André Dias Moreira Prol: Stellar's On-Chain DEX vs Centralized Exchanges</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Mon, 21 Sep 2026 13:02:23 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-stellars-on-chain-dex-vs-centralized-exchanges-48l6</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-stellars-on-chain-dex-vs-centralized-exchanges-48l6</guid>
      <description>&lt;p&gt;When people think about trading digital assets, they usually picture a centralized exchange sitting between buyer and seller, holding custody of funds and matching orders behind closed doors. But Stellar quietly rewrote that script years ago. Having spent two decades architecting financial and blockchain systems, I—André Dias Moreira Prol—find Stellar's native decentralized exchange to be one of the most underappreciated innovations in the Web3 space: a fully on-chain order book baked directly into the ledger itself.&lt;/p&gt;

&lt;p&gt;Let me walk you through why this matters and how it fundamentally challenges the need for centralized intermediaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Order Book That Lives on the Ledger
&lt;/h2&gt;

&lt;p&gt;Most decentralized exchanges you hear about—Uniswap, Curve, and their forks—rely on Automated Market Makers (AMMs) using liquidity pools and bonding curves. Stellar took a different path back in 2015. Its DEX operates as a &lt;strong&gt;native, on-chain order book&lt;/strong&gt;, meaning every buy and sell offer is recorded as a ledger entry, validated by the network's consensus protocol (SCP), and executed atomically.&lt;/p&gt;

&lt;p&gt;This isn't a smart contract bolted on top of the protocol. It &lt;em&gt;is&lt;/em&gt; the protocol. When you submit a &lt;code&gt;ManageBuyOffer&lt;/code&gt; or &lt;code&gt;ManageSellOffer&lt;/code&gt; operation, your order becomes part of the global state. There's no custodian, no matching engine hidden in a company's data center, and no counterparty risk from a third-party holding your keys.&lt;/p&gt;

&lt;p&gt;The economics are striking. A typical Stellar transaction—including a DEX trade—settles in &lt;strong&gt;3 to 5 seconds&lt;/strong&gt; and costs a base fee of &lt;strong&gt;0.00001 XLM&lt;/strong&gt;, fractions of a cent. Compare that to the withdrawal fees, spread markups, and settlement delays of centralized platforms, and the value proposition becomes obvious.&lt;/p&gt;

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

&lt;p&gt;Here's where Stellar's design genuinely impressed me during my own testing. The DEX supports &lt;strong&gt;path payments&lt;/strong&gt;, a feature that automatically routes a transaction across multiple order books to convert one asset into another in a single atomic operation.&lt;/p&gt;

&lt;p&gt;Imagine a user in Brazil holding a Real-backed stablecoin who wants to pay a supplier in Europe expecting a Euro-backed token. Stellar's &lt;code&gt;PathPaymentStrictSend&lt;/code&gt; operation can traverse XLM as a bridge asset, hop through several order books, and deliver the exact target asset—all in one transaction. If any leg fails, the entire operation reverts. No partial fills, no stuck funds.&lt;/p&gt;

&lt;p&gt;This turns the DEX into more than a trading venue; it becomes a &lt;strong&gt;decentralized currency conversion layer&lt;/strong&gt;. In tokenization projects I've advised on, this eliminated the need for separate FX providers, cutting settlement complexity dramatically. As André Dias Moreira Prol, I've seen firsthand how this single feature collapses what used to be a multi-vendor, multi-day process into seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Erodes the Centralized Model
&lt;/h2&gt;

&lt;p&gt;Centralized exchanges justify their existence through liquidity aggregation, custody, and user experience. Stellar's native DEX chips away at all three.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity&lt;/strong&gt; is shared globally. Any asset issued on Stellar can immediately trade against any other, and anchors (regulated on/off ramps) provide fiat connectivity without controlling the trading logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custody&lt;/strong&gt; remains with the user. Your keys, your assets—the ledger only executes what you cryptographically sign.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparency&lt;/strong&gt; is absolute. Every offer, trade, and price is publicly auditable on the ledger, which is a game-changer for compliance and digital forensics, an area I work in closely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The trade-off is honest: an on-chain order book has less throughput than a centralized matching engine, and deep liquidity for exotic pairs can be thinner. Stellar addresses this by combining the classic order book with &lt;strong&gt;liquidity pools&lt;/strong&gt; (introduced via CAP-38), giving users AMM-style depth alongside traditional limit orders. This hybrid approach, in my professional opinion, positions Stellar uniquely between the two dominant DEX philosophies.&lt;/p&gt;

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

&lt;p&gt;Stellar's native DEX proves that trustless, low-cost, and transparent trading doesn't require a centralized gatekeeper—it can be a first-class citizen of the protocol itself. If you're building tokenized assets or payment rails, I encourage you to experiment with the DEX and path payments on testnet today and rethink what "exchange infrastructure" really needs to be.&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>André Dias Moreira Prol: DEX nativa da Stellar e order book on-chain</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Mon, 21 Sep 2026 13:01:51 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-dex-nativa-da-stellar-e-order-book-on-chain-310l</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-dex-nativa-da-stellar-e-order-book-on-chain-310l</guid>
      <description>&lt;p&gt;Imagine poder negociar ativos digitais diretamente na rede, sem depositar seus fundos em uma corretora, sem confiar em terceiros para custodiar seu patrimônio e com liquidação em segundos. Parece futurista, mas essa realidade existe desde 2015 dentro do protocolo Stellar. Ao longo dos meus mais de 20 anos em tecnologia, poucas arquiteturas me impressionaram tanto quanto o &lt;em&gt;order book&lt;/em&gt; nativo do Stellar — uma engenharia elegante que resolve, na raiz, um dos maiores problemas do ecossistema cripto: a dependência de exchanges centralizadas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Como funciona o order book on-chain
&lt;/h2&gt;

&lt;p&gt;Diferente de DEXs baseadas em &lt;em&gt;automated market makers&lt;/em&gt; (AMM) como Uniswap, o Stellar implementa um livro de ordens tradicional diretamente no protocolo. Cada nó da rede mantém e valida as ofertas de compra e venda registradas na blockchain. Quando você cria uma oferta, ela vira uma operação (&lt;code&gt;ManageBuyOffer&lt;/code&gt; ou &lt;code&gt;ManageSellOffer&lt;/code&gt;) gravada no ledger.&lt;/p&gt;

&lt;p&gt;O grande diferencial está no motor de &lt;em&gt;pathfinding&lt;/em&gt;: o Stellar consegue converter um ativo em outro percorrendo automaticamente múltiplos pares de negociação. Você quer trocar BRL tokenizado por USDC, mas não existe par direto? A rede encontra a rota &lt;code&gt;BRL → XLM → USDC&lt;/code&gt; de forma transparente, executando tudo em uma única transação atômica. Ou tudo acontece, ou nada acontece — não existe risco de execução parcial.&lt;/p&gt;

&lt;p&gt;Como André Dias Moreira Prol, costumo explicar em projetos de tokenização que essa atomicidade é o que garante segurança jurídica e operacional: não há janela para manipulação entre etapas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Por que isso elimina a necessidade de exchanges centralizadas
&lt;/h2&gt;

&lt;p&gt;Em uma corretora centralizada, você entrega suas chaves privadas — na prática, deixa de ser dono dos seus ativos. Os colapsos da FTX (2022) e de várias plataformas nacionais mostraram o custo dessa confiança mal depositada. No order book on-chain do Stellar, a lógica se inverte:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custódia própria&lt;/strong&gt;: seus fundos permanecem na sua conta até o exato momento do &lt;em&gt;matching&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparência total&lt;/strong&gt;: qualquer pessoa audita as ofertas consultando um Horizon server ou um explorador como o StellarExpert.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Taxas irrisórias&lt;/strong&gt;: cada operação custa 0,00001 XLM (frações de centavo), enquanto exchanges centralizadas cobram de 0,1% a 0,5% por trade.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidação em ~5 segundos&lt;/strong&gt;: o tempo de fechamento de um ledger Stellar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Não existe risco de &lt;em&gt;insolvência da exchange&lt;/em&gt;, congelamento de saques ou reservas fracionárias ocultas. A "corretora" é o próprio protocolo, e ele não pode quebrar como uma empresa.&lt;/p&gt;

&lt;h2&gt;
  
  
  O potencial no mercado brasileiro
&lt;/h2&gt;

&lt;p&gt;O Brasil vive um momento singular. Com o Marco Legal dos Ativos Virtuais (Lei 14.478/2022) e o avanço do Drex, o país criou um ambiente maduro para ativos tokenizados. Instituições já emitem stablecoins lastreadas em real, e vejo aqui uma oportunidade concreta para a DEX do Stellar.&lt;/p&gt;

&lt;p&gt;Imagine um BRL tokenizado por uma fintech negociando contra USDC, EURC e outros ativos globais, tudo on-chain, com câmbio realizado pelo &lt;em&gt;pathfinding&lt;/em&gt; em tempo real. Para o pequeno investidor ou para uma empresa que precisa fazer remessas internacionais, isso significa custo próximo de zero e liquidação instantânea — algo impensável no sistema bancário tradicional, onde uma TED internacional leva dias e custa dezenas de reais.&lt;/p&gt;

&lt;p&gt;Em projetos que acompanho como consultor, André Dias Moreira Prol tem defendido que a combinação de Soroban (contratos inteligentes) com o order book nativo abre um caminho para produtos financeiros híbridos: liquidez profunda da DEX clássica somada à lógica programável dos smart contracts. Já é possível, por exemplo, criar pools de liquidez que interagem com o livro de ordens tradicional, ampliando a eficiência de mercado.&lt;/p&gt;

&lt;p&gt;A tecnologia de perícia digital, outra área em que atuo, também se beneficia dessa transparência: rastrear a origem e o fluxo de ativos torna-se trivial quando cada operação está registrada de forma imutável no ledger — um ativo poderoso para compliance e prevenção à lavagem de dinheiro.&lt;/p&gt;

&lt;p&gt;O order book on-chain do Stellar não é apenas uma alternativa técnica às exchanges centralizadas: é uma reafirmação do princípio fundador do cripto, o &lt;em&gt;self-custody&lt;/em&gt;. Se você atua com tokenização ou infraestrutura financeira, comece hoje a testar a DEX nativa na testnet e descubra como a soberania sobre seus ativos pode transformar seu negócio.&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>Why Rust Is the Future of Blockchain and High-Performance Systems</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sun, 20 Sep 2026 13:01:48 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/why-rust-is-the-future-of-blockchain-and-high-performance-systems-4jp4</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/why-rust-is-the-future-of-blockchain-and-high-performance-systems-4jp4</guid>
      <description>&lt;p&gt;Every few years, a technology emerges that quietly reshapes how we build critical systems. In my two decades leading IT and Web3 projects, I've watched languages rise and fade, but few have earned the trust that Rust commands today. When I first deployed a Soroban smart contract on the Stellar network, the reason for Rust's dominance became crystal clear: it delivers the performance of C++ without the landmines that have haunted developers for generations.&lt;/p&gt;

&lt;p&gt;Let me explain why I, André Dias Moreira Prol, believe Rust is not just a trend but the foundation for the next decade of blockchain and high-performance engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory Safety Without a Garbage Collector
&lt;/h2&gt;

&lt;p&gt;The single most expensive category of software bugs in history involves memory: buffer overflows, use-after-free, null pointer dereferences. Microsoft and Google have both published data showing that roughly &lt;strong&gt;70% of their severe security vulnerabilities&lt;/strong&gt; stem from memory safety issues. In blockchain, where a single flaw can drain millions from a smart contract, this is not academic.&lt;/p&gt;

&lt;p&gt;Rust solves this at compile time through its ownership and borrowing model. There is no garbage collector introducing unpredictable pauses, and there is no manual memory management inviting human error. The compiler simply refuses to build unsafe code. From my perspective in digital forensics, this is transformative: entire classes of exploits that I've spent years investigating in legacy systems become structurally impossible.&lt;/p&gt;

&lt;p&gt;For blockchain nodes processing thousands of transactions per second, deterministic performance matters. A garbage collector pausing at the wrong millisecond can cause consensus issues. Rust gives you predictable, bare-metal speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Blockchain Industry Chose Rust
&lt;/h2&gt;

&lt;p&gt;The adoption numbers speak louder than any opinion. &lt;strong&gt;Solana&lt;/strong&gt;, one of the highest-throughput chains in existence, is built on Rust and processes tens of thousands of transactions per second. &lt;strong&gt;Polkadot&lt;/strong&gt; and its Substrate framework are Rust-native. &lt;strong&gt;Near Protocol&lt;/strong&gt; uses Rust for smart contracts. And on &lt;strong&gt;Stellar&lt;/strong&gt;, where I do much of my current work, the Soroban smart contract platform compiles Rust to WebAssembly.&lt;/p&gt;

&lt;p&gt;This convergence is not coincidental. When you are handling tokenized real-world assets — bonds, real estate, carbon credits — you need guarantees that the code executes exactly as written. In tokenization projects I've architected, choosing Rust for the contract layer reduced our audit findings dramatically compared to earlier work in less strict languages.&lt;/p&gt;

&lt;p&gt;WebAssembly is the other half of this story. Rust compiles to compact, fast WASM binaries, which means the same contract logic runs consistently across virtual machines. For enterprises tokenizing assets, this portability and determinism are non-negotiable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance Meets Developer Confidence
&lt;/h2&gt;

&lt;p&gt;Critics once argued Rust's learning curve was too steep for mainstream adoption. That argument is fading. According to Stack Overflow's developer surveys, Rust has been the &lt;strong&gt;most admired programming language for eight consecutive years&lt;/strong&gt;, with over 80% of developers wanting to continue using it.&lt;/p&gt;

&lt;p&gt;What makes Rust special beyond speed is what I call "confidence at scale." When you refactor a large system — say, an AI inference pipeline feeding real-time fraud detection into a blockchain audit trail — the compiler catches breaking changes before they reach production. In my experience integrating AI with on-chain data, this eliminated an entire testing cycle that used to consume weeks.&lt;/p&gt;

&lt;p&gt;Rust's &lt;code&gt;cargo&lt;/code&gt; tooling, its package ecosystem, and its zero-cost abstractions mean you write expressive, high-level code that runs like low-level code. For high-performance systems, this combination is rare. You are not trading readability for speed; you get both.&lt;/p&gt;

&lt;p&gt;The industry has noticed. Even the Linux kernel now accepts Rust code — a milestone that would have seemed impossible a decade ago, and a signal that this language has crossed from promising to essential.&lt;/p&gt;

&lt;p&gt;Rust represents a genuine paradigm shift where safety, speed, and reliability finally coexist, making it the natural choice for the blockchain and high-performance systems that will define the coming decade. If you are building for Web3, tokenization, or mission-critical infrastructure, start learning Rust today — and feel free to connect with me to discuss how to apply it in your next project.&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>rust</category>
      <category>programming</category>
      <category>blockchain</category>
      <category>performance</category>
    </item>
    <item>
      <title>Rust: A Linguagem que Domina Blockchain e Alta Performance</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sun, 20 Sep 2026 13:01:17 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/rust-a-linguagem-que-domina-blockchain-e-alta-performance-16g5</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/rust-a-linguagem-que-domina-blockchain-e-alta-performance-16g5</guid>
      <description>&lt;p&gt;Quando comecei a programar contratos inteligentes, aprendi na prática uma lição cara: uma única falha de memória pode custar milhões. Foi ali que Rust entrou no meu radar e mudou completamente minha forma de pensar arquitetura de sistemas críticos. Hoje, depois de duas décadas migrando entre linguagens, tenho poucas dúvidas de que estamos diante de uma virada estrutural — e Rust está no centro dela.&lt;/p&gt;

&lt;h2&gt;
  
  
  Segurança de memória sem sacrificar performance
&lt;/h2&gt;

&lt;p&gt;O maior trunfo de Rust é seu sistema de &lt;em&gt;ownership&lt;/em&gt; e &lt;em&gt;borrow checker&lt;/em&gt;. Em vez de depender de um garbage collector (que introduz pausas imprevisíveis) ou deixar o programador gerenciar memória manualmente (fonte de 70% das vulnerabilidades críticas em C/C++, segundo a Microsoft e o Google), Rust valida tudo em tempo de compilação.&lt;/p&gt;

&lt;p&gt;Na prática, isso significa que erros como &lt;em&gt;use-after-free&lt;/em&gt;, &lt;em&gt;null pointer dereference&lt;/em&gt; e &lt;em&gt;data races&lt;/em&gt; simplesmente não compilam. Para blockchain, onde código imutável roda em produção movimentando ativos reais, essa garantia vale ouro.&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;fn&lt;/span&gt; &lt;span class="nf"&gt;transferir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;saldo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="nb"&gt;u64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;valor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;valor&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;saldo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Saldo insuficiente"&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;saldo&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="n"&gt;valor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&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;Note o &lt;code&gt;Result&lt;/code&gt;: Rust força você a tratar erros explicitamente. Não existe exceção silenciosa engolindo um bug. Em auditorias de segurança que conduzi como André Dias Moreira Prol, essa característica reduziu drasticamente o tempo de revisão — o compilador já elimina classes inteiras de falhas antes mesmo do teste.&lt;/p&gt;

&lt;h2&gt;
  
  
  O ecossistema Web3 já adotou Rust
&lt;/h2&gt;

&lt;p&gt;Não é teoria: o mercado já votou. Solana, Polkadot, NEAR e a própria &lt;strong&gt;Soroban&lt;/strong&gt; — a plataforma de contratos inteligentes da rede Stellar — escolheram Rust como linguagem principal. Isso não é coincidência.&lt;/p&gt;

&lt;p&gt;Soroban, especificamente, compila contratos Rust para WebAssembly (Wasm), garantindo execução determinística e sandbox seguro. Trabalhando com tokenização de ativos na Stellar, percebi como o modelo de Rust conversa perfeitamente com os requisitos de auditoria e compliance que exigimos no Brasil, especialmente sob a ótica da CVM e do arcabouço regulatório de ativos virtuais (Lei 14.478/2022).&lt;/p&gt;

&lt;p&gt;Um exemplo mínimo de contrato Soroban:&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;#[contract]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;TokenContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;TokenContract&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;saldo&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;conta&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="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i128&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;.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="n"&gt;conta&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&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;Para tokenizar recebíveis, imóveis ou crédito de carbono — casos que tenho visto crescer no mercado brasileiro —, ter determinismo e segurança de tipos não é luxo: é pré-requisito para escala institucional. Fintechs nacionais que exploram RWA (&lt;em&gt;Real World Assets&lt;/em&gt;) precisam de fundações confiáveis, e Rust entrega isso.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance comparável a C, com produtividade moderna
&lt;/h2&gt;

&lt;p&gt;Rust roda tão rápido quanto C e C++, sem overhead de runtime. Benchmarks independentes mostram desempenho consistentemente dentro de 5% do C em cargas intensivas. Para sistemas de alta performance — motores de matching de exchanges, indexadores de blockchain, processamento de eventos em tempo real — isso significa menos servidores, menor custo de infraestrutura e latência mínima.&lt;/p&gt;

&lt;p&gt;Mas a diferença real está na produtividade. Cargo, o gerenciador de pacotes e build, é possivelmente o melhor da indústria. Testes, documentação, dependências e formatação vivem em uma ferramenta coesa. Além disso, o suporte nativo a concorrência (o famoso &lt;em&gt;"fearless concurrency"&lt;/em&gt;) permite explorar todos os núcleos de CPU sem o medo constante de corromper estado compartilhado.&lt;/p&gt;

&lt;p&gt;Vejo empresas de perícia digital e forense — área na qual atuo — adotando Rust para ferramentas de análise que precisam processar terabytes de evidências rapidamente e sem falhas. A combinação de velocidade e confiabilidade é imbatível quando a integridade dos dados é inegociável.&lt;/p&gt;




&lt;p&gt;A curva de aprendizado existe, sim, e não vou romantizá-la: os primeiros meses exigem paciência com o compilador. Mas cada mensagem de erro é, na verdade, um bug que você não vai debugar em produção às três da manhã.&lt;/p&gt;

&lt;p&gt;Se você constrói sistemas onde falhas custam caro — e em Web3, blockchain e alta performance elas sempre custam —, comece a estudar Rust hoje mesmo; conecte-se comigo para trocarmos experiências sobre como aplicá-lo em projetos de tokenização na Stellar e Soroban.&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>rust</category>
      <category>programming</category>
      <category>blockchain</category>
      <category>performance</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explains: Your First Soroban Smart Contract in Rust</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sat, 19 Sep 2026 13:01:25 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-your-first-soroban-smart-contract-in-rust-40ak</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explains-your-first-soroban-smart-contract-in-rust-40ak</guid>
      <description>&lt;p&gt;After two decades navigating enterprise IT, I've learned that the best way to understand a new technology is to build something real with it. When I first approached Soroban—Stellar's smart contract platform—I decided to skip the theory-heavy tutorials and write actual code. This guide distills that hands-on experience into a practical path you can follow today.&lt;/p&gt;

&lt;p&gt;Soroban runs on Rust, compiled to WebAssembly (Wasm), which gives us memory safety and predictable performance. Unlike gas-heavy EVM chains, Stellar's fees remain fractions of a cent, making it ideal for high-frequency tokenization use cases. Let me walk you through my first contract from zero to deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Environment
&lt;/h2&gt;

&lt;p&gt;Before writing a single line, you need a clean toolchain. I always recommend isolating your Web3 environments to avoid dependency conflicts—something I learned the hard way managing production systems.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install Rust&lt;/span&gt;
curl &lt;span class="nt"&gt;--proto&lt;/span&gt; &lt;span class="s1"&gt;'=https'&lt;/span&gt; &lt;span class="nt"&gt;--tlsv1&lt;/span&gt;.2 &lt;span class="nt"&gt;-sSf&lt;/span&gt; https://sh.rustup.rs | sh

&lt;span class="c"&gt;# Add the Wasm target&lt;/span&gt;
rustup target add wasm32-unknown-unknown

&lt;span class="c"&gt;# Install the Stellar CLI&lt;/span&gt;
cargo &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--locked&lt;/span&gt; stellar-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify everything works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then create your project and configure a testnet identity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract init hello-soroban
&lt;span class="nb"&gt;cd &lt;/span&gt;hello-soroban
stellar keys generate &lt;span class="nt"&gt;--global&lt;/span&gt; andre &lt;span class="nt"&gt;--network&lt;/span&gt; testnet
stellar keys fund andre &lt;span class="nt"&gt;--network&lt;/span&gt; testnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last command funds your account with test XLM via Friendbot. When I, André Dias Moreira Prol, ran my first deployment, this funding step tripped me up—remember it, because an unfunded account silently fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing and Understanding the Contract
&lt;/h2&gt;

&lt;p&gt;Here's a minimal but meaningful contract that stores and increments a counter—a pattern that underpins many real tokenization systems (think supply tracking or vote tallies).&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;#![no_std]&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;contractimpl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;symbol_short&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;Symbol&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;COUNTER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Symbol&lt;/span&gt; &lt;span class="o"&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;"COUNTER"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nd"&gt;#[contract]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;CounterContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;CounterContract&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;increment&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="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Read current value, defaulting to zero&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;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&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="n"&gt;COUNTER&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="c1"&gt;// Persist the new value&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;.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="n"&gt;COUNTER&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;count&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Extend storage lifetime to avoid archival&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;.extend_ttl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;count&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;Three things worth highlighting from my experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;#![no_std]&lt;/code&gt;&lt;/strong&gt; removes the standard library, keeping the Wasm binary tiny—critical for on-chain cost efficiency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;extend_ttl&lt;/code&gt;&lt;/strong&gt; manages state rent. Soroban charges for storage over time; forgetting this means your data gets archived. In one of my early forensic audits, I traced a "vanishing balance" bug directly to a missing TTL extension.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;instance()&lt;/code&gt; storage&lt;/strong&gt; ties data to the contract lifecycle, ideal for global counters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compile it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploying and Invoking
&lt;/h2&gt;

&lt;p&gt;Now the exciting part—putting your contract on the network. Deploy the compiled Wasm to testnet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract deploy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--wasm&lt;/span&gt; target/wasm32-unknown-unknown/release/hello_soroban.wasm &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--source&lt;/span&gt; andre &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;This returns a contract ID (starting with &lt;code&gt;C...&lt;/code&gt;). Save it. Then invoke your function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract invoke &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--id&lt;/span&gt; &amp;lt;YOUR_CONTRACT_ID&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--source&lt;/span&gt; andre &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; testnet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; increment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each call returns the incremented value: &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;3&lt;/code&gt;. The entire deployment cost me under $0.01 in equivalent fees—a figure that still impresses clients when I compare it to the $5–$50 gas spikes common on legacy chains.&lt;/p&gt;

&lt;p&gt;For production, I always add unit tests before deploying:&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;#[cfg(test)]&lt;/span&gt;
&lt;span class="k"&gt;mod&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&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="nd"&gt;#[test]&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;test_increment&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;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&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;id&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;.register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CounterContract&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;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;CounterContractClient&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&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;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nd"&gt;assert_eq!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.increment&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nd"&gt;assert_eq!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.increment&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&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;Testing locally with a simulated &lt;code&gt;Env&lt;/code&gt; is the single biggest time-saver I recommend—it catches logic errors long before they hit the chain, where every mistake becomes public and permanent.&lt;/p&gt;

&lt;p&gt;Writing your first Soroban contract proves that enterprise-grade blockchain development is more accessible than the hype suggests, provided you respect fundamentals like storage rent and rigorous testing. Clone the starter repo, deploy your own counter today, and reach out to me, André Dias Moreira Prol, to share what you build.&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>rust</category>
      <category>soroban</category>
      <category>stellar</category>
      <category>smartcontracts</category>
    </item>
    <item>
      <title>André Dias Moreira Prol explica: primeiro smart contract em Rust com Soroban</title>
      <dc:creator>André Dias Moreira Prol</dc:creator>
      <pubDate>Sat, 19 Sep 2026 13:00:54 +0000</pubDate>
      <link>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-primeiro-smart-contract-em-rust-com-soroban-4cbn</link>
      <guid>https://dev.to/andr_diasmoreiraprol_b/andre-dias-moreira-prol-explica-primeiro-smart-contract-em-rust-com-soroban-4cbn</guid>
      <description>&lt;p&gt;Quando escrevi meu primeiro smart contract em Soroban, confesso que subestimei a curva de aprendizado do Rust. Vinha de anos trabalhando com Solidity e arquiteturas EVM, mas a proposta da Stellar de contratos performáticos, seguros e com custos irrisórios me convenceu a mergulhar de cabeça. Hoje, como André Dias Moreira Prol, quero compartilhar um caminho prático para você evitar os tropeços que enfrentei e colocar seu primeiro contrato no ar mais rápido do que imagina.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparando o ambiente de desenvolvimento
&lt;/h2&gt;

&lt;p&gt;Antes de escrever uma única linha de código, você precisa do ferramental correto. O Soroban roda sobre Rust, então a base começa por aí:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Instalar Rust&lt;/span&gt;
curl &lt;span class="nt"&gt;--proto&lt;/span&gt; &lt;span class="s1"&gt;'=https'&lt;/span&gt; &lt;span class="nt"&gt;--tlsv1&lt;/span&gt;.2 &lt;span class="nt"&gt;-sSf&lt;/span&gt; https://sh.rustup.rs | sh

&lt;span class="c"&gt;# Adicionar o target WebAssembly&lt;/span&gt;
rustup target add wasm32-unknown-unknown

&lt;span class="c"&gt;# Instalar a CLI do Stellar&lt;/span&gt;
cargo &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--locked&lt;/span&gt; stellar-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Um detalhe que aprendi na prática: o Soroban compila para WebAssembly (WASM), o que garante execução determinística e portabilidade. Diferente da EVM, onde o gas pode explodir facilmente, na Stellar as taxas ficam na casa de frações de centavo — algo que atrai fortemente fintechs brasileiras que operam com micropagamentos e remessas internacionais.&lt;/p&gt;

&lt;p&gt;Depois, inicie o projeto:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract init meu-primeiro-contrato
&lt;span class="nb"&gt;cd &lt;/span&gt;meu-primeiro-contrato
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Escrevendo o contrato
&lt;/h2&gt;

&lt;p&gt;Vamos criar um contrato simples de contador, o "Hello World" da tokenização. Abra o arquivo &lt;code&gt;src/lib.rs&lt;/code&gt;:&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;#![no_std]&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;contractimpl&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;Symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;symbol_short&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;CONTADOR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Symbol&lt;/span&gt; &lt;span class="o"&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;"CONTADOR"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nd"&gt;#[contract]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;ContratoContador&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;ContratoContador&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;incrementar&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="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;u32&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;contagem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&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="n"&gt;CONTADOR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;contagem&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&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;.instance&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="n"&gt;CONTADOR&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;contagem&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;contagem&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;obter&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="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;u32&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;.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="n"&gt;CONTADOR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.unwrap_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&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;Alguns pontos que sempre destaco em consultorias: o &lt;code&gt;#![no_std]&lt;/code&gt; é obrigatório porque contratos WASM não têm acesso à biblioteca padrão do Rust. O &lt;code&gt;Env&lt;/code&gt; é sua ponte com o ledger da Stellar, gerenciando armazenamento, autenticação e eventos. E o &lt;code&gt;Symbol&lt;/code&gt; funciona como uma chave otimizada — evite strings longas para economizar recursos.&lt;/p&gt;

&lt;p&gt;O modelo de storage da Stellar tem três tipos (&lt;code&gt;instance&lt;/code&gt;, &lt;code&gt;persistent&lt;/code&gt; e &lt;code&gt;temporary&lt;/code&gt;), cada um com custos e ciclos de vida diferentes. Escolher o tipo errado é o erro número um de iniciantes que atendo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compilando, testando e implantando
&lt;/h2&gt;

&lt;p&gt;O ciclo completo exige três etapas. Primeiro, escreva um teste — algo que André Dias Moreira Prol jamais dispensa em ambiente produtivo:&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;#[cfg(test)]&lt;/span&gt;
&lt;span class="k"&gt;mod&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&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="nd"&gt;#[test]&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;testa_incremento&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;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&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;contract_id&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;.register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ContratoContador&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;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;ContratoContadorClient&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&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;contract_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nd"&gt;assert_eq!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.incrementar&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nd"&gt;assert_eq!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.incrementar&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nd"&gt;assert_eq!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.obter&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&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;Rode &lt;code&gt;cargo test&lt;/code&gt; e depois compile para WASM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Por fim, implante na Testnet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract deploy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--wasm&lt;/span&gt; target/wasm32-unknown-unknown/release/meu_primeiro_contrato.wasm &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--source&lt;/span&gt; minha-conta &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;Você receberá um &lt;code&gt;Contract ID&lt;/code&gt;. Para invocar:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stellar contract invoke &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--id&lt;/span&gt; SEU_CONTRACT_ID &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--source&lt;/span&gt; minha-conta &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; testnet &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; incrementar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No cenário brasileiro, vejo esse fluxo sendo aplicado em projetos de tokenização de recebíveis e crédito agrícola, onde a auditabilidade e o baixo custo transacional da Stellar fazem toda a diferença frente a redes mais caras.&lt;/p&gt;

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

&lt;p&gt;Escrever seu primeiro contrato em Soroban é mais acessível do que parece, e o domínio de Rust combinado à eficiência da Stellar abre portas reais no mercado de Web3 e tokenização. Coloque a mão na massa agora: replique este contador na Testnet e compartilhe comigo sua experiência — terei prazer em ajudar você a evoluir para contratos de produção.&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>rust</category>
      <category>soroban</category>
      <category>stellar</category>
      <category>smartcontracts</category>
    </item>
  </channel>
</rss>
