DEV Community

Peter
Peter

Posted on

A Developer's Guide to SwapBased: The ve(3,3) DEX on Base

This guide provides a technical overview for developers looking to integrate with SwapBased Official Site, focusing on its core SwapBased ve(3,3) DEX architecture and how to interact with its liquidity and governance mechanisms on the SwapBased on Base network.

Step 1: Understanding the ve(3,3) Architecture

SwapBased is a powerful DEX built on the "ve(3,3)" model, a game-theoretic design for incentivizing liquidity, specifically tailored for the Base network.

Tokenomics: It uses a dual-token system: BASE Token Staking (the utility token) and veBASE (vote-escrowed BASE).

Mechanism: Users lock BASE to receive veBASE. veBASE holders receive protocol fees, bribes, and the power to direct SwapBased Emissions to specific SwapBased Liquidity Pools through SwapBased Gauge Voting.

Step 2: Providing Liquidity and Earning Emissions

Developers can build interfaces for users to become liquidity providers (LPs).

Deposit: Users deposit an equivalent value of two tokens into a chosen pool.

Receive LP Tokens: They receive LP tokens, which must then be staked in the corresponding "Gauge" contract.

Gauge Rewards: The amount of BASE emissions earned by LPs in a specific pool is directly proportional to the votes (veBASE weight) that pool receives. Your dApp can query the gauge contracts to display current emission rates (APRs).

Step 3: Interacting with veBASE Governance

For developers building governance-focused dApps or analytics tools, veBASE is the key.

Locking BASE: Users lock their BASE for a chosen duration to receive veBASE.

Voting: veBASE holders vote weekly on which gauges should receive BASE emissions. This is the core of the ve(3,3) model.

Bribes: Protocols can attach "bribes" to gauges to incentivize veBASE holders to vote for their pools. Your dApp can display these bribes to inform voters.

Step 4: Swaps and Security

To Trade on SwapBased, users interact with its AMM router contracts. The security model, a key part of answering "Is SwapBased Safe?", relies on its audited codebase and the transparent, on-chain nature of the ve(3,3) system.

For all smart contract ABIs, gauge addresses, and SDK documentation, refer to the Full Official Documentation.
https://sites.google.com/staking-guide.com/swapbased/home

Top comments (0)