An open API service indexing awesome lists of open source software.

https://github.com/developerfred/meow-singled-pool


https://github.com/developerfred/meow-singled-pool

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# Overview

This suite of Solidity smart contracts introduces a pioneering approach to the creation and exchange of ERC20 tokens
within the Ethereum blockchain ecosystem. Centered around `TokenFactory`, this framework streamlines the process of
deploying custom tokens and facilitates efficient market engagement by utilizing a pricing curve for token exchange,
which significantly contributes to the advancement of the decentralized finance (DeFi) landscape.

## Key Features

- **TokenFactory Contract**: Facilitates the creation of ERC20 tokens (`MEOWChild`) with customizable attributes such as
name, symbol, and initial supply. It uniquely integrates a pricing curve mechanism for each token, determined by a
slope and reserve weight, ensuring dynamic pricing and immediate market interaction without the need for traditional
liquidity pools.
- **Pricing Curve**: Instead of relying on liquidity pools, the system uses a pricing curve to dynamically adjust token
prices based on supply and demand factors. This approach ensures fair and efficient market conditions by automatically
balancing price fluctuations.

## Workflow

1. **Initialization**: Deploy the `TokenFactory`, specifying a default reserve token. This reserve token acts as a base
for transactions within the ecosystem.
2. **Token Creation**: Utilize the `createToken` function to launch new `MEOWChild` tokens. Each token is automatically
configured with a pricing curve based on specified parameters (slope and reserve weight), facilitating immediate
market engagement.
3. **Market Participation**: Traders interact with the ecosystem (through an exchange interface not detailed here) to
buy or sell tokens. The pricing curve ensures transactions are executed at fair market prices, adjusting dynamically
to market conditions.
4. **Comprehensive Testing**: A robust testing framework validates all functionalities, from token creation to dynamic
pricing mechanisms, ensuring the system's integrity within the DeFi space.

## Example Use Case: Interaction Among Participants

- **Alice** uses `TokenFactory` to create her token, "AliceToken" (`ALC`), specifying its initial supply and pricing
curve parameters. The token is immediately ready for market engagement.
- **Bob** wishes to purchase `ALC` tokens. He interacts with the system, which calculates the current price based on the
pricing curve, ensuring Bob pays a fair price according to market dynamics.
- **Carol** decides to sell her `ALC` tokens. The system similarly uses the pricing curve to determine the sell price,
providing liquidity and ensuring efficient market conditions.

## Testing Scenario: Contract Functionality Verification

The provided Solidity test contract outlines a comprehensive testing scenario that includes:

- Deploying and initializing the `TokenFactory`, setting up the default reserve token, and configuring the exchange
interface.
- Creating a `MEOWChild` token with specific parameters, including the slope and reserve weight for the pricing curve.
- Simulating buying and selling transactions to verify the dynamic pricing mechanism, ensuring that token prices adjust
according to the preset curve.

## Deploy Contracts

| Network | Sepolia |
| ------------------------------------------- | ------------------------------------------ |
| [TokenFactory](./src/TokenFactory.sol) | 0xcfFa6a5951B3b01B1b08E386Ac1fb4B567eCc9fD |
| [TokenExchange](./src/TokenExchange.sol) | 0x2c4145a98611B2Dc6Ecfcd0bcc2A2f841E0916BF |
| [Meow Test token](./src/mock/TokenTest.sol) | 0x54ceABC39627d9cEB578BB5fC4CE3DB972b2ce69 |