<?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: Keshav Sharma</title>
    <description>The latest articles on DEV Community by Keshav Sharma (@keshav_simplieap).</description>
    <link>https://dev.to/keshav_simplieap</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%2F1946444%2Fd377ec7d-8216-499b-94f1-706168c7f628.gif</url>
      <title>DEV Community: Keshav Sharma</title>
      <link>https://dev.to/keshav_simplieap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keshav_simplieap"/>
    <language>en</language>
    <item>
      <title>The Crypto Invoicing Problem Nobody Talks About — And Why We Built Settlematic</title>
      <dc:creator>Keshav Sharma</dc:creator>
      <pubDate>Sat, 20 Jun 2026 22:12:56 +0000</pubDate>
      <link>https://dev.to/keshav_simplieap/the-crypto-invoicing-problem-nobody-talks-about-and-why-we-built-settlematic-38p4</link>
      <guid>https://dev.to/keshav_simplieap/the-crypto-invoicing-problem-nobody-talks-about-and-why-we-built-settlematic-38p4</guid>
      <description>&lt;p&gt;For all the innovation happening in crypto, one of the most important business workflows remains surprisingly broken: invoicing.&lt;/p&gt;

&lt;p&gt;Over the last few years, cryptocurrencies and stablecoins have transformed how money moves across borders. Businesses can now receive payments globally within minutes, freelancers can work with clients anywhere in the world, and SaaS companies can reach customers without relying entirely on traditional banking infrastructure.&lt;/p&gt;

&lt;p&gt;Yet despite these advancements, the process of invoicing and collecting payments in crypto remains far more complicated than it should be.&lt;/p&gt;

&lt;p&gt;Most businesses accepting cryptocurrency today are still relying on a patchwork of spreadsheets, wallet addresses, manual reconciliation, and disconnected tools. The blockchain may be programmable money, but the invoicing experience often feels stuck in the early days of the internet.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://settlematic.com" rel="noopener noreferrer"&gt;Settlematic&lt;/a&gt;, we believe crypto payments should be as simple, professional, and automated as traditional invoicing—while preserving all the advantages that blockchain technology brings.&lt;/p&gt;

&lt;p&gt;This article explores the challenges businesses face when invoicing in crypto, why existing solutions fall short, and how Settlematic is building the infrastructure needed for the next generation of global commerce.&lt;/p&gt;

&lt;p&gt;The Hidden Complexity of &lt;a href="https://settlematic.com" rel="noopener noreferrer"&gt;Crypto Invoicing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the surface, accepting cryptocurrency seems simple.&lt;/p&gt;

&lt;p&gt;A business generates a wallet address.&lt;/p&gt;

&lt;p&gt;The customer sends funds.&lt;/p&gt;

&lt;p&gt;Payment received.&lt;/p&gt;

&lt;p&gt;Problem solved.&lt;/p&gt;

&lt;p&gt;Unfortunately, reality is much messier.&lt;/p&gt;

&lt;p&gt;As soon as businesses begin processing more than a handful of transactions, operational complexity starts to grow rapidly.&lt;/p&gt;

&lt;p&gt;Consider a company that sends 100 invoices every month.&lt;/p&gt;

&lt;p&gt;Questions immediately begin to emerge:&lt;/p&gt;

&lt;p&gt;Which payment belongs to which invoice?&lt;br&gt;
What happens if a customer pays using a different token?&lt;br&gt;
What happens if they make multiple payments?&lt;br&gt;
How do you manage recurring invoices?&lt;br&gt;
How do finance teams track outstanding balances?&lt;br&gt;
How do you calculate discounts and penalties?&lt;br&gt;
How do you automate revenue sharing?&lt;br&gt;
How do you generate tax reports?&lt;/p&gt;

&lt;p&gt;Most crypto payment tools solve only a small portion of this workflow.&lt;/p&gt;

&lt;p&gt;The result is a growing administrative burden that becomes increasingly difficult to manage as businesses scale.&lt;/p&gt;

&lt;p&gt;Why Wallet Addresses Are Not Invoices&lt;/p&gt;

&lt;p&gt;One of the biggest misconceptions in crypto payments is that a wallet address is equivalent to an invoice.&lt;/p&gt;

&lt;p&gt;It isn't.&lt;/p&gt;

&lt;p&gt;A wallet address simply tells someone where funds should be sent.&lt;/p&gt;

&lt;p&gt;An invoice provides context.&lt;/p&gt;

&lt;p&gt;An invoice answers questions such as:&lt;/p&gt;

&lt;p&gt;Who is paying?&lt;br&gt;
What are they paying for?&lt;br&gt;
When is payment due?&lt;br&gt;
Has the payment been completed?&lt;br&gt;
Is the invoice partially paid?&lt;br&gt;
Are there late fees?&lt;br&gt;
Are there discounts?&lt;br&gt;
What accounting records should be created?&lt;/p&gt;

&lt;p&gt;Traditional businesses have spent decades refining invoicing processes because they are essential for managing cash flow.&lt;/p&gt;

&lt;p&gt;Crypto businesses deserve the same level of sophistication.&lt;/p&gt;

&lt;p&gt;The Multi-Token Reality&lt;/p&gt;

&lt;p&gt;One challenge unique to crypto is the existence of multiple assets.&lt;/p&gt;

&lt;p&gt;Imagine issuing a $1,000 invoice.&lt;/p&gt;

&lt;p&gt;One customer holds USDT.&lt;/p&gt;

&lt;p&gt;Another holds USDC.&lt;/p&gt;

&lt;p&gt;A third holds ETH.&lt;/p&gt;

&lt;p&gt;A fourth holds MATIC.&lt;/p&gt;

&lt;p&gt;A fifth holds a mix of all four.&lt;/p&gt;

&lt;p&gt;Most existing systems force the customer to swap assets before paying.&lt;/p&gt;

&lt;p&gt;This introduces:&lt;/p&gt;

&lt;p&gt;Additional fees&lt;br&gt;
Extra steps&lt;br&gt;
Friction&lt;br&gt;
Delays&lt;br&gt;
Failed payments&lt;/p&gt;

&lt;p&gt;In many cases, customers simply postpone payment because the process becomes inconvenient.&lt;/p&gt;

&lt;p&gt;Businesses lose time.&lt;/p&gt;

&lt;p&gt;Customers experience frustration.&lt;/p&gt;

&lt;p&gt;Nobody wins.&lt;/p&gt;

&lt;p&gt;Partial Payments Shouldn't Be A Problem&lt;/p&gt;

&lt;p&gt;Traditional invoicing systems have supported partial payments for years.&lt;/p&gt;

&lt;p&gt;Crypto invoicing platforms often struggle with this.&lt;/p&gt;

&lt;p&gt;Imagine a customer owes $5,000.&lt;/p&gt;

&lt;p&gt;Instead of paying in one transaction, they send:&lt;/p&gt;

&lt;p&gt;$2,000 in USDT&lt;br&gt;
$1,500 in USDC&lt;br&gt;
$1,500 in ETH&lt;/p&gt;

&lt;p&gt;From the customer's perspective, the invoice has been fully paid.&lt;/p&gt;

&lt;p&gt;From the business perspective, however, reconciliation can become a nightmare.&lt;/p&gt;

&lt;p&gt;Someone has to manually verify each transaction and determine whether the invoice balance has been settled.&lt;/p&gt;

&lt;p&gt;This is exactly the type of operational work that software should eliminate.&lt;/p&gt;

&lt;p&gt;With Settlematic, invoices can be paid through multiple transactions and even multiple supported cryptocurrencies.&lt;/p&gt;

&lt;p&gt;The platform automatically tracks every payment, reconciles balances, and marks invoices as completed once payment obligations have been fulfilled.&lt;/p&gt;

&lt;p&gt;The customer gets flexibility.&lt;/p&gt;

&lt;p&gt;The business gets automation.&lt;/p&gt;

&lt;p&gt;The Problem With Shared Wallet Addresses&lt;/p&gt;

&lt;p&gt;Many businesses receive all payments into a single wallet.&lt;/p&gt;

&lt;p&gt;This seems convenient initially.&lt;/p&gt;

&lt;p&gt;However, as transaction volume grows, tracking becomes increasingly difficult.&lt;/p&gt;

&lt;p&gt;A finance team may receive hundreds or thousands of incoming transactions.&lt;/p&gt;

&lt;p&gt;Determining which transaction corresponds to which invoice becomes a manual exercise involving blockchain explorers, spreadsheets, and accounting systems.&lt;/p&gt;

&lt;p&gt;This process consumes valuable time and introduces opportunities for human error.&lt;/p&gt;

&lt;p&gt;Settlematic addresses this by generating dedicated payment addresses for invoices, allowing every payment to be tracked and associated with the correct transaction context.&lt;/p&gt;

&lt;p&gt;The result is cleaner accounting and dramatically simpler reconciliation.&lt;/p&gt;

&lt;p&gt;Automating Treasury Management&lt;/p&gt;

&lt;p&gt;Receiving funds is only the first step.&lt;/p&gt;

&lt;p&gt;Businesses also need to decide what happens next.&lt;/p&gt;

&lt;p&gt;In many organizations, incoming funds must be distributed across multiple wallets, departments, partners, or operational accounts.&lt;/p&gt;

&lt;p&gt;Without automation, teams perform these transfers manually.&lt;/p&gt;

&lt;p&gt;Manual treasury management creates operational risk and consumes time.&lt;/p&gt;

&lt;p&gt;This challenge inspired one of Settlematic's most powerful capabilities: Conversion Flows.&lt;/p&gt;

&lt;p&gt;Using configurable workflows, businesses can automatically define how incoming funds should be handled.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;80% to treasury wallet&lt;br&gt;
20% to operational wallet&lt;/p&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;p&gt;50% to partner wallet&lt;br&gt;
30% to reserve wallet&lt;br&gt;
20% to tax wallet&lt;/p&gt;

&lt;p&gt;The allocation happens automatically according to predefined rules.&lt;/p&gt;

&lt;p&gt;No spreadsheets.&lt;/p&gt;

&lt;p&gt;No manual transfers.&lt;/p&gt;

&lt;p&gt;No repetitive operational work.&lt;/p&gt;

&lt;p&gt;Introducing Auto Sweep&lt;/p&gt;

&lt;p&gt;One issue frequently encountered by businesses using dedicated invoice addresses is wallet management.&lt;/p&gt;

&lt;p&gt;If every invoice generates a new address, funds become distributed across many wallets.&lt;/p&gt;

&lt;p&gt;Managing those balances manually becomes inefficient.&lt;/p&gt;

&lt;p&gt;Settlematic solves this through Auto Sweep.&lt;/p&gt;

&lt;p&gt;Once invoice payments are confirmed, assets can be automatically transferred to designated destination wallets.&lt;/p&gt;

&lt;p&gt;Businesses retain the organizational advantages of dedicated invoice addresses while maintaining centralized custody of funds.&lt;/p&gt;

&lt;p&gt;The experience becomes seamless.&lt;/p&gt;

&lt;p&gt;Smart Invoices For Modern Businesses&lt;/p&gt;

&lt;p&gt;Traditional invoices are static documents.&lt;/p&gt;

&lt;p&gt;Real-world business relationships are dynamic.&lt;/p&gt;

&lt;p&gt;Many companies incentivize early payments.&lt;/p&gt;

&lt;p&gt;Others apply late payment penalties.&lt;/p&gt;

&lt;p&gt;Historically, these calculations have required manual intervention.&lt;/p&gt;

&lt;p&gt;Settlematic introduces Smart Invoices that automatically adapt based on payment timing.&lt;/p&gt;

&lt;p&gt;Businesses can configure:&lt;/p&gt;

&lt;p&gt;Early payment discounts&lt;br&gt;
Late payment fees&lt;br&gt;
Dynamic invoice calculations&lt;/p&gt;

&lt;p&gt;The platform automatically adjusts invoice values according to predefined business rules.&lt;/p&gt;

&lt;p&gt;This creates a more intelligent and automated accounts receivable process.&lt;/p&gt;

&lt;p&gt;Recurring Revenue Deserves Better Infrastructure&lt;/p&gt;

&lt;p&gt;Subscription businesses are becoming increasingly common across the crypto economy.&lt;/p&gt;

&lt;p&gt;DAOs, SaaS platforms, agencies, service providers, and consulting firms often operate on recurring billing cycles.&lt;/p&gt;

&lt;p&gt;Yet recurring crypto invoicing remains surprisingly underdeveloped.&lt;/p&gt;

&lt;p&gt;Many businesses still create recurring invoices manually every month.&lt;/p&gt;

&lt;p&gt;This approach doesn't scale.&lt;/p&gt;

&lt;p&gt;Settlematic enables automated recurring invoicing workflows that generate and distribute invoices according to predefined schedules.&lt;/p&gt;

&lt;p&gt;Businesses can focus on growth instead of administrative tasks.&lt;/p&gt;

&lt;p&gt;Professional Payment Experiences Matter&lt;/p&gt;

&lt;p&gt;First impressions matter.&lt;/p&gt;

&lt;p&gt;A customer receiving a random wallet address in a message does not inspire confidence.&lt;/p&gt;

&lt;p&gt;Businesses need professional payment experiences that reinforce trust and brand identity.&lt;/p&gt;

&lt;p&gt;Settlematic provides hosted invoice payment pages with custom branding capabilities.&lt;/p&gt;

&lt;p&gt;Businesses can:&lt;/p&gt;

&lt;p&gt;Upload logos&lt;br&gt;
Configure brand colors&lt;br&gt;
Create consistent customer experiences&lt;br&gt;
Present professional payment interfaces&lt;/p&gt;

&lt;p&gt;The result is a significantly improved customer experience that aligns with modern business expectations.&lt;/p&gt;

&lt;p&gt;APIs, Webhooks, And Automation&lt;/p&gt;

&lt;p&gt;Modern businesses rarely operate using a single piece of software.&lt;/p&gt;

&lt;p&gt;They rely on interconnected systems.&lt;/p&gt;

&lt;p&gt;CRMs.&lt;/p&gt;

&lt;p&gt;Accounting platforms.&lt;/p&gt;

&lt;p&gt;ERP systems.&lt;/p&gt;

&lt;p&gt;Analytics tools.&lt;/p&gt;

&lt;p&gt;Payment infrastructure.&lt;/p&gt;

&lt;p&gt;Automation therefore becomes essential.&lt;/p&gt;

&lt;p&gt;Settlematic includes APIs and webhooks that allow organizations to integrate invoicing workflows directly into existing systems.&lt;/p&gt;

&lt;p&gt;Businesses can:&lt;/p&gt;

&lt;p&gt;Create invoices programmatically&lt;br&gt;
Receive payment notifications&lt;br&gt;
Synchronize accounting data&lt;br&gt;
Build custom workflows&lt;br&gt;
Automate reporting&lt;/p&gt;

&lt;p&gt;The platform becomes an infrastructure layer rather than simply another standalone application.&lt;/p&gt;

&lt;p&gt;AI-Native Financial Operations&lt;/p&gt;

&lt;p&gt;Artificial intelligence is rapidly changing how businesses operate.&lt;/p&gt;

&lt;p&gt;The next generation of financial software will not be built around forms and dashboards alone.&lt;/p&gt;

&lt;p&gt;It will be conversational.&lt;/p&gt;

&lt;p&gt;It will be automated.&lt;/p&gt;

&lt;p&gt;It will be AI-native.&lt;/p&gt;

&lt;p&gt;This is why Settlematic includes support for AI-driven interactions through its MCP capabilities.&lt;/p&gt;

&lt;p&gt;Businesses can interact with invoice data using AI assistants.&lt;/p&gt;

&lt;p&gt;Imagine asking:&lt;/p&gt;

&lt;p&gt;"Create an invoice for Client A."&lt;/p&gt;

&lt;p&gt;"Show overdue invoices."&lt;/p&gt;

&lt;p&gt;"Generate tax reports."&lt;/p&gt;

&lt;p&gt;"Send payment reminders."&lt;/p&gt;

&lt;p&gt;"Show revenue by month."&lt;/p&gt;

&lt;p&gt;Instead of navigating multiple screens, users can perform tasks through natural language interactions.&lt;/p&gt;

&lt;p&gt;This is where financial operations are heading.&lt;/p&gt;

&lt;p&gt;We believe crypto invoicing should be ready for that future today.&lt;/p&gt;

&lt;p&gt;Tax Reporting Cannot Be An Afterthought&lt;/p&gt;

&lt;p&gt;One of the largest barriers to crypto adoption for businesses is compliance.&lt;/p&gt;

&lt;p&gt;Receiving payments is easy.&lt;/p&gt;

&lt;p&gt;Maintaining accurate records is harder.&lt;/p&gt;

&lt;p&gt;Generating reports for accounting and tax purposes is even harder.&lt;/p&gt;

&lt;p&gt;Without proper tooling, businesses often rely on manual exports and spreadsheets.&lt;/p&gt;

&lt;p&gt;Settlematic includes foundational tax reporting capabilities that help organizations maintain cleaner records and improve financial visibility.&lt;/p&gt;

&lt;p&gt;As regulatory environments continue to evolve globally, reporting infrastructure will become increasingly important.&lt;/p&gt;

&lt;p&gt;Building The Future Of Crypto Commerce&lt;/p&gt;

&lt;p&gt;The long-term vision behind Settlematic extends beyond invoicing.&lt;/p&gt;

&lt;p&gt;We believe businesses need an operating system for crypto receivables.&lt;/p&gt;

&lt;p&gt;A platform that handles:&lt;/p&gt;

&lt;p&gt;Invoice generation&lt;br&gt;
Payment collection&lt;br&gt;
Reconciliation&lt;br&gt;
Treasury automation&lt;br&gt;
Revenue distribution&lt;br&gt;
Reporting&lt;br&gt;
Compliance&lt;br&gt;
AI-powered workflows&lt;/p&gt;

&lt;p&gt;Crypto has already transformed how value moves across the internet.&lt;/p&gt;

&lt;p&gt;The next challenge is making those payment flows operationally efficient for businesses.&lt;/p&gt;

&lt;p&gt;That is the problem we are focused on solving.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;The crypto industry has built incredible innovations around trading, custody, staking, and decentralized finance.&lt;/p&gt;

&lt;p&gt;Yet everyday business operations still lack the infrastructure that traditional companies take for granted.&lt;/p&gt;

&lt;p&gt;Invoicing may not be the most glamorous problem in crypto.&lt;/p&gt;

&lt;p&gt;But it is one of the most important.&lt;/p&gt;

&lt;p&gt;Because businesses do not grow through speculation.&lt;/p&gt;

&lt;p&gt;They grow through revenue.&lt;/p&gt;

&lt;p&gt;They grow through customers.&lt;/p&gt;

&lt;p&gt;They grow through getting paid.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://settlematic.com" rel="noopener noreferrer"&gt;Settlematic&lt;/a&gt;, our mission is simple:&lt;/p&gt;

&lt;p&gt;Make crypto invoicing as professional, automated, and scalable as modern businesses expect it to be.&lt;/p&gt;

&lt;p&gt;And in doing so, help accelerate the adoption of crypto as a legitimate payment method for businesses around the world.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Stellar360: The Ultimate Stellar Wallet, Exchange, Payment Gateway, and Faucet with Integrated Staking</title>
      <dc:creator>Keshav Sharma</dc:creator>
      <pubDate>Sun, 18 Aug 2024 20:52:00 +0000</pubDate>
      <link>https://dev.to/keshav_simplieap/stellar360-the-ultimate-stellar-wallet-exchange-payment-gateway-and-faucet-with-integrated-staking-28cj</link>
      <guid>https://dev.to/keshav_simplieap/stellar360-the-ultimate-stellar-wallet-exchange-payment-gateway-and-faucet-with-integrated-staking-28cj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/stellar"&gt;Build Better on Stellar: Smart Contract Challenge &lt;/a&gt;: Build a dApp&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stellar360: A Comprehensive Stellar WebApp with Wallet, Exchange, Staking, Payment Gateway, and Faucet Functionality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stellar360 is a sophisticated web application developed using Next.js, Node.js, and PostgreSQL, designed to offer an all-in-one solution for Stellar-based transactions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpwjzxbusm40m4owzqdk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpwjzxbusm40m4owzqdk.png" alt=" " width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The platform features:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wallet Functionality:&lt;/strong&gt; Users can register, and upon successful registration, a wallet is automatically created. The wallet supports custom tokens—STLLRUSDC, STLLRUSDT, STLLRBTC, and STLLRCSH—allowing users to view and manage their balances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Faucet:&lt;/strong&gt; Users can utilize the faucet to add tokens to their wallet and check their balances in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Exchange:&lt;/strong&gt; Users can exchange one token for another seamlessly within the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Staking:&lt;/strong&gt; The app supports staking of tokens with flexible time periods (7, 15, 30, 60, and 90 days). A custom smart contract, built using Soroban Stellar, manages the staking process and credits the tokens back to users' wallets at the end of the staking period. A master wallet is used to distribute the earned tokens to users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payment Gateway:&lt;/strong&gt; Users can generate multiple child wallets for their websites. These wallets facilitate payments from customers, with successful transactions triggering WebSocket notifications to complete orders. Each customer gets a unique wallet for processing payments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; To ensure smooth transactions, a paymaster contract is implemented to cover transaction fees in XLM. This contract enhances user experience by making transactions frictionless and cost-effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Trustlines:&lt;/strong&gt; Trustlines for the custom tokens are automatically created, ensuring seamless and successful transactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Whole code can be checked by referring the github links, Below are some code snippets which are the backbone contracts for this project -&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paymaster contract&lt;/strong&gt;&lt;br&gt;
The paymaster contract on Stellar is designed to pay for the transaction fees (in XLM) for users who do not have XLM in their accounts. The contract will also support whitelisting of addresses that are authorized to use the paymaster's services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pay for Transaction Fees:&lt;/strong&gt; The paymaster covers the XLM fees for transactions initiated by whitelisted addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whitelist Management:&lt;/strong&gt; Admin can add or remove addresses from the whitelist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Components:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; Manages the payment of transaction fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whitelist Management:&lt;/strong&gt; Allows adding/removing addresses to/from the whitelist.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use soroban_sdk::{contractimpl, Address, Env, Symbol, Vec};

pub struct Paymaster;

#[contractimpl]
impl Paymaster {
    // Initialize the contract with an admin address
    pub fn initialize(env: Env, admin: Address) {
        let whitelist = Vec::new();
        env.storage().set(&amp;amp;Symbol::from("admin"), &amp;amp;admin);
        env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
    }

    // Add an address to the whitelist
    pub fn add_to_whitelist(env: Env, address: Address) {
        let admin = env.storage().get::&amp;lt;Address&amp;gt;(&amp;amp;Symbol::from("admin")).unwrap();
        if env.caller() != admin {
            panic!("Only admin can add to whitelist");
        }

        let mut whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        if !whitelist.contains(&amp;amp;address) {
            whitelist.push(address);
            env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
        }
    }

    // Remove an address from the whitelist
    pub fn remove_from_whitelist(env: Env, address: Address) {
        let admin = env.storage().get::&amp;lt;Address&amp;gt;(&amp;amp;Symbol::from("admin")).unwrap();
        if env.caller() != admin {
            panic!("Only admin can remove from whitelist");
        }

        let mut whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        whitelist.retain(|a| a != &amp;amp;address);
        env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
    }

    // Check if an address is whitelisted
    pub fn is_whitelisted(env: Env, address: Address) -&amp;gt; bool {
        let whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        whitelist.contains(&amp;amp;address)
    }

    // Pay for transaction fees
    pub fn pay_transaction_fee(env: Env, source: Address, fee: u64) {
        if !Self::is_whitelisted(env.clone(), source.clone()) {
            panic!("Address not whitelisted");
        }

        // Here, you would include logic to cover the fee.
        // This typically involves interacting with Stellar to handle the fee.
        // For demonstration purposes, we'll print the action.
        println!("Paying {} XLM for transaction fee for {}", fee, source);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Staking Contract&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The contract allows users to stake tokens for predefined periods, earning rewards based on the duration of their stake.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Staking Periods:&lt;/strong&gt; Users can choose from five staking periods—7, 15, 30, 60, or 90 days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reward Percentages:&lt;/strong&gt; The reward percentage increases with the length of the staking period—0.1%, 2%, 5%, 10%, or 15%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Management:&lt;/strong&gt; Users can stake tokens, and after the staking period ends, they can claim their tokens along with the rewards.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use soroban_sdk::{contractimpl, symbol, Address, Env, Symbol};

#[derive(Clone, Copy, Debug)]
pub enum StakingPeriod {
    SevenDays,
    FifteenDays,
    ThirtyDays,
    SixtyDays,
    NinetyDays,
}

#[derive(Clone, Copy, Debug)]
pub enum RewardPercentage {
    PointOnePercent,
    TwoPercent,
    FivePercent,
    TenPercent,
    FifteenPercent,
}

pub struct StakingContract;

#[contractimpl]
impl StakingContract {
    pub fn stake_tokens(env: Env, user: Address, amount: u64, period: StakingPeriod) {
        // Logic to handle token staking
        let current_time = env.ledger().now();
        let end_time = match period {
            StakingPeriod::SevenDays =&amp;gt; current_time + 7 * 24 * 60 * 60,
            StakingPeriod::FifteenDays =&amp;gt; current_time + 15 * 24 * 60 * 60,
            StakingPeriod::ThirtyDays =&amp;gt; current_time + 30 * 24 * 60 * 60,
            StakingPeriod::SixtyDays =&amp;gt; current_time + 60 * 24 * 60 * 60,
            StakingPeriod::NinetyDays =&amp;gt; current_time + 90 * 24 * 60 * 60,
        };

        // Store staking information
        let staking_info = StakingInfo {
            amount,
            end_time,
            period,
        };

        // Here, you would typically store this information in a state variable
        // For demonstration, we will just print it
        env.log(&amp;amp;format!(
            "User: {:?}, Amount: {}, End Time: {}, Period: {:?}",
            user, amount, end_time, period
        ));
    }

    pub fn claim_rewards(env: Env, user: Address) {
        // Logic to calculate and distribute rewards
        // This would involve checking if the staking period is over
        // and calculating rewards based on the stored staking info

        // For demonstration, we will just print a message
        env.log(&amp;amp;format!("User: {:?} claiming rewards", user));
    }
}

#[derive(Clone, Debug)]
pub struct StakingInfo {
    amount: u64,
    end_time: u64,
    period: StakingPeriod,
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;You can explore the Stellar360 dApp through the following link: &lt;a href="https://stellarexchangefrontend-oc4hxc2zoq-uc.a.run.app/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;The source code for Stellar360 is available on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend Repository:&lt;/strong&gt; &lt;a href="https://github.com/KeshavSimplileap/stellarexchangefrontend" rel="noopener noreferrer"&gt;Link to Frontend Repository&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Backend Repository:&lt;/strong&gt; &lt;a href="https://github.com/KeshavSimplileap/stellarexchangebackend" rel="noopener noreferrer"&gt;Link to Backend Repository&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Developing Stellar360 has been an exciting and challenging journey. The project began with the goal of creating a unified platform to manage and interact with Stellar assets, incorporating wallet, exchange, staking, and payment functionalities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation and Smart Contract Design:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Smart Contracts:&lt;/strong&gt; We utilized Soroban Stellar to create a custom smart contract for managing staking, ensuring accurate token credits at the end of each staking period.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; The paymaster contract was designed to handle transaction fees, thus eliminating the need for users to hold XLM for transaction costs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Motivation:
&lt;/h2&gt;

&lt;p&gt;Our motivation was to simplify the user experience by integrating multiple features into a single platform, providing users with a seamless and efficient way to manage their Stellar assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning and Experience:
&lt;/h2&gt;

&lt;p&gt;Throughout the development process, we deepened our understanding of Stellar’s ecosystem, smart contract capabilities, and efficient token management. We also gained insights into integrating various functionalities to enhance user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pride and Future Goals:&lt;/strong&gt;&lt;br&gt;
We are particularly proud of the seamless integration of diverse functionalities and the automation of trustline creation. Moving forward, we aim to refine the user experience further, gather user feedback, and explore additional enhancements based on real-world usage.&lt;/p&gt;

</description>
      <category>stellarchallenge</category>
    </item>
    <item>
      <title>Stellar360: The Ultimate Stellar Wallet, Exchange, Payment Gateway, and Faucet with Integrated Staking</title>
      <dc:creator>Keshav Sharma</dc:creator>
      <pubDate>Sun, 18 Aug 2024 20:50:38 +0000</pubDate>
      <link>https://dev.to/keshav_simplieap/stellar360-the-ultimate-stellar-wallet-exchange-payment-gateway-and-faucet-with-integrated-staking-4nam</link>
      <guid>https://dev.to/keshav_simplieap/stellar360-the-ultimate-stellar-wallet-exchange-payment-gateway-and-faucet-with-integrated-staking-4nam</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/stellar"&gt;Build Better on Stellar: Smart Contract Challenge &lt;/a&gt;: Build a dApp&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stellar360: A Comprehensive Stellar WebApp with Wallet, Exchange, Staking, Payment Gateway, and Faucet Functionality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stellar360 is a sophisticated web application developed using Next.js, Node.js, and PostgreSQL, designed to offer an all-in-one solution for Stellar-based transactions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpwjzxbusm40m4owzqdk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpwjzxbusm40m4owzqdk.png" alt=" " width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The platform features:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wallet Functionality:&lt;/strong&gt; Users can register, and upon successful registration, a wallet is automatically created. The wallet supports custom tokens—STLLRUSDC, STLLRUSDT, STLLRBTC, and STLLRCSH—allowing users to view and manage their balances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Faucet:&lt;/strong&gt; Users can utilize the faucet to add tokens to their wallet and check their balances in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Exchange:&lt;/strong&gt; Users can exchange one token for another seamlessly within the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Staking:&lt;/strong&gt; The app supports staking of tokens with flexible time periods (7, 15, 30, 60, and 90 days). A custom smart contract, built using Soroban Stellar, manages the staking process and credits the tokens back to users' wallets at the end of the staking period. A master wallet is used to distribute the earned tokens to users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payment Gateway:&lt;/strong&gt; Users can generate multiple child wallets for their websites. These wallets facilitate payments from customers, with successful transactions triggering WebSocket notifications to complete orders. Each customer gets a unique wallet for processing payments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; To ensure smooth transactions, a paymaster contract is implemented to cover transaction fees in XLM. This contract enhances user experience by making transactions frictionless and cost-effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Trustlines:&lt;/strong&gt; Trustlines for the custom tokens are automatically created, ensuring seamless and successful transactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Whole code can be checked by referring the github links, Below are some code snippets which are the backbone contracts for this project -&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paymaster contract&lt;/strong&gt;&lt;br&gt;
The paymaster contract on Stellar is designed to pay for the transaction fees (in XLM) for users who do not have XLM in their accounts. The contract will also support whitelisting of addresses that are authorized to use the paymaster's services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pay for Transaction Fees:&lt;/strong&gt; The paymaster covers the XLM fees for transactions initiated by whitelisted addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whitelist Management:&lt;/strong&gt; Admin can add or remove addresses from the whitelist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Components:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; Manages the payment of transaction fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whitelist Management:&lt;/strong&gt; Allows adding/removing addresses to/from the whitelist.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use soroban_sdk::{contractimpl, Address, Env, Symbol, Vec};

pub struct Paymaster;

#[contractimpl]
impl Paymaster {
    // Initialize the contract with an admin address
    pub fn initialize(env: Env, admin: Address) {
        let whitelist = Vec::new();
        env.storage().set(&amp;amp;Symbol::from("admin"), &amp;amp;admin);
        env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
    }

    // Add an address to the whitelist
    pub fn add_to_whitelist(env: Env, address: Address) {
        let admin = env.storage().get::&amp;lt;Address&amp;gt;(&amp;amp;Symbol::from("admin")).unwrap();
        if env.caller() != admin {
            panic!("Only admin can add to whitelist");
        }

        let mut whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        if !whitelist.contains(&amp;amp;address) {
            whitelist.push(address);
            env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
        }
    }

    // Remove an address from the whitelist
    pub fn remove_from_whitelist(env: Env, address: Address) {
        let admin = env.storage().get::&amp;lt;Address&amp;gt;(&amp;amp;Symbol::from("admin")).unwrap();
        if env.caller() != admin {
            panic!("Only admin can remove from whitelist");
        }

        let mut whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        whitelist.retain(|a| a != &amp;amp;address);
        env.storage().set(&amp;amp;Symbol::from("whitelist"), &amp;amp;whitelist);
    }

    // Check if an address is whitelisted
    pub fn is_whitelisted(env: Env, address: Address) -&amp;gt; bool {
        let whitelist: Vec&amp;lt;Address&amp;gt; = env.storage().get(&amp;amp;Symbol::from("whitelist")).unwrap();
        whitelist.contains(&amp;amp;address)
    }

    // Pay for transaction fees
    pub fn pay_transaction_fee(env: Env, source: Address, fee: u64) {
        if !Self::is_whitelisted(env.clone(), source.clone()) {
            panic!("Address not whitelisted");
        }

        // Here, you would include logic to cover the fee.
        // This typically involves interacting with Stellar to handle the fee.
        // For demonstration purposes, we'll print the action.
        println!("Paying {} XLM for transaction fee for {}", fee, source);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Staking Contract&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The contract allows users to stake tokens for predefined periods, earning rewards based on the duration of their stake.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Staking Periods:&lt;/strong&gt; Users can choose from five staking periods—7, 15, 30, 60, or 90 days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reward Percentages:&lt;/strong&gt; The reward percentage increases with the length of the staking period—0.1%, 2%, 5%, 10%, or 15%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Management:&lt;/strong&gt; Users can stake tokens, and after the staking period ends, they can claim their tokens along with the rewards.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use soroban_sdk::{contractimpl, symbol, Address, Env, Symbol};

#[derive(Clone, Copy, Debug)]
pub enum StakingPeriod {
    SevenDays,
    FifteenDays,
    ThirtyDays,
    SixtyDays,
    NinetyDays,
}

#[derive(Clone, Copy, Debug)]
pub enum RewardPercentage {
    PointOnePercent,
    TwoPercent,
    FivePercent,
    TenPercent,
    FifteenPercent,
}

pub struct StakingContract;

#[contractimpl]
impl StakingContract {
    pub fn stake_tokens(env: Env, user: Address, amount: u64, period: StakingPeriod) {
        // Logic to handle token staking
        let current_time = env.ledger().now();
        let end_time = match period {
            StakingPeriod::SevenDays =&amp;gt; current_time + 7 * 24 * 60 * 60,
            StakingPeriod::FifteenDays =&amp;gt; current_time + 15 * 24 * 60 * 60,
            StakingPeriod::ThirtyDays =&amp;gt; current_time + 30 * 24 * 60 * 60,
            StakingPeriod::SixtyDays =&amp;gt; current_time + 60 * 24 * 60 * 60,
            StakingPeriod::NinetyDays =&amp;gt; current_time + 90 * 24 * 60 * 60,
        };

        // Store staking information
        let staking_info = StakingInfo {
            amount,
            end_time,
            period,
        };

        // Here, you would typically store this information in a state variable
        // For demonstration, we will just print it
        env.log(&amp;amp;format!(
            "User: {:?}, Amount: {}, End Time: {}, Period: {:?}",
            user, amount, end_time, period
        ));
    }

    pub fn claim_rewards(env: Env, user: Address) {
        // Logic to calculate and distribute rewards
        // This would involve checking if the staking period is over
        // and calculating rewards based on the stored staking info

        // For demonstration, we will just print a message
        env.log(&amp;amp;format!("User: {:?} claiming rewards", user));
    }
}

#[derive(Clone, Debug)]
pub struct StakingInfo {
    amount: u64,
    end_time: u64,
    period: StakingPeriod,
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;You can explore the Stellar360 dApp through the following link: &lt;a href="https://stellarexchangefrontend-oc4hxc2zoq-uc.a.run.app/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;The source code for Stellar360 is available on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend Repository:&lt;/strong&gt; &lt;a href="https://github.com/KeshavSimplileap/stellarexchangefrontend" rel="noopener noreferrer"&gt;Link to Frontend Repository&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Backend Repository:&lt;/strong&gt; &lt;a href="https://github.com/KeshavSimplileap/stellarexchangebackend" rel="noopener noreferrer"&gt;Link to Backend Repository&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Developing Stellar360 has been an exciting and challenging journey. The project began with the goal of creating a unified platform to manage and interact with Stellar assets, incorporating wallet, exchange, staking, and payment functionalities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation and Smart Contract Design:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Smart Contracts:&lt;/strong&gt; We utilized Soroban Stellar to create a custom smart contract for managing staking, ensuring accurate token credits at the end of each staking period.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paymaster Contract:&lt;/strong&gt; The paymaster contract was designed to handle transaction fees, thus eliminating the need for users to hold XLM for transaction costs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Motivation:
&lt;/h2&gt;

&lt;p&gt;Our motivation was to simplify the user experience by integrating multiple features into a single platform, providing users with a seamless and efficient way to manage their Stellar assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning and Experience:
&lt;/h2&gt;

&lt;p&gt;Throughout the development process, we deepened our understanding of Stellar’s ecosystem, smart contract capabilities, and efficient token management. We also gained insights into integrating various functionalities to enhance user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pride and Future Goals:&lt;/strong&gt;&lt;br&gt;
We are particularly proud of the seamless integration of diverse functionalities and the automation of trustline creation. Moving forward, we aim to refine the user experience further, gather user feedback, and explore additional enhancements based on real-world usage.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>stellarchallenge</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
