# LISTA / veLISTA

## 概述

LISTA 和 veLISTA 是基于区块链的代币，设计用于特定的去中心化应用（dApps）和智能合约生态系统。LISTA 是一个可交易的代币，而 veLISTA 是一个代表长期持有者权益的非交易代币。

## 功能

### LISTA

LISTA 代币主要用于以下目的：

* **治理**：LISTA 持有者可以投票决定项目的未来发展方向。
* **交易**：在各种去中心化交易所（DEXs）上可交易。
* **激励**：激励网络参与者和开发者。

### veLISTA

veLISTA 代币是基于持有时间加权的系统，旨在奖励长期持有者：

* **增强治理权重**：veLISTA 持有者在投票中拥有更高的权重。
* **收益分配**：根据veLISTA的持有比例分配协议收益。

## 技术实现

### 智能合约

LISTA 和 veLISTA 通过智能合约在以太坊区块链上实现。以下是智能合约的基本结构：

```solidity
pragma solidity ^0.8.0;

contract ListaToken {
    string public constant name = "LISTA Token";
    string public constant symbol = "LISTA";
    uint8 public constant decimals = 18;

    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor(uint256 initialSupply) {
        totalSupply = initialSupply;
        balanceOf[msg.sender] = initialSupply;
        emit Transfer(address(0), msg.sender, initialSupply);
    }

    function transfer(address to, uint256 value) public returns (bool) {
        require(balanceOf[msg.sender] >= value, "Insufficient balance");
        balanceOf[msg.sender] -= value;
        balanceOf[to] += value;
        emit Transfer(msg.sender, to, value);
        return true;
    }

    function approve(address spender, uint256 value) public returns (bool) {
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        require(value <= balanceOf[from], "Insufficient balance");
        require(value <= allowance[from][msg.sender], "Insufficient allowance");
        balanceOf[from] -= value;
        balanceOf[to] += value;
        allowance[from][msg.sender] -= value;
        emit Transfer(from, to, value);
        return true;
    }
}
```

### 部署和交互

智能合约部署到以太坊区块链后，开发者和用户可以通过Web3.js或其他库与之交互。例如，使用Web3.js初始化合约实例：

```javascript
const Web3 = require('web3');
const web3 = new Web3('https://mainnet.infura.io/v3/YOUR_INFURA_KEY');

const listaTokenAddress = '0x...'; // LISTA Token合约地址
const listaTokenABI = [...]; // LISTA Token的ABI

const listaTokenContract = new web3.eth.Contract(listaTokenABI, listaTokenAddress);
```

## 总结

LISTA 和 veLISTA 代币是区块链技术中的重要组成部分，通过智能合约和去中心化机制，为用户和开发者提供了多样化的功能和激励。这些代币的实现和应用展示了区块链技术在现代数字经济中的潜力和多样性。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bsc.lista.org/zh-cn/yong-hu-zhi-nan/lista-velista.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
