Skip to content

M3tering/Solaxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solaxy: ERC-20 Token with DAI Linear Bonding Curve

Overview

Solaxy is an ERC-20 token contract that implements a linear bonding curve with DAI (a stablecoin) as the reserve currency. The bonding curve allows users to buy and sell Solaxy tokens directly from/to the contract at a dynamic price determined by the curve's slope.

Token Bonding Curves

A token bonding curve is a mathematical formula that defines the token's price based on its supply. In the case of Solaxy, a linear bonding curve is employed. This means the price of Solaxy tokens increases linearly with each token sold and decreases linearly with each token redeemed.

Linear Bonding Curve Formula

The price of tokens in a linear bonding curve is calculated as follows: $$f(x) = mx + c$$

Here, the slope (m) represents the rate at which the price changes concerning the supply. In Solaxy's case, the slope is set to 25 bps (0.0025), determining the curve's steepness. Visit the gitbook docs to learn more.

Example Linear Bonding Curve

ERC-4626 Support

Solaxy extends its functionality by providing support for ERC-4626; a tokenized vault interface. This interface allows the Solaxy contract to interact with other DeFi protocols and platforms seamlessly. ERC-4626 integration enhances the capabilities of Solaxy in the context of token bonding curves.

Contributing to Solaxy

We welcome contributions from developers, designers, and blockchain enthusiasts to enhance Solaxy. Here's how you can get involved:

  • Code: Contribute by fixing bugs, adding features, or optimizing code. Check out open issues and submit pull requests.
  • Documentation: Improve existing guides or create new ones to enhance Solaxy's usability.
  • Testing: Help test Solaxy, identify edge cases, and ensure its security and functionality.
  • Bug Reporting: Report bugs or issues you encounter while using Solaxy to help us improve.
  • Feedback: Share your ideas and suggestions to shape Solaxy's development.

Read our Contribution Guidelines for details. Join us in making Solaxy better!

Project Layout

The project is filed in the following directory structure:

├── lib/                 # Project dependencies stored as git submodules
├── script/              # Foundry testing scripts
├── src/                 # Contains the Solidity smart contract files
│   ├── Interfaces/      # Contract interfaces for Solaxy
├── test/                # Solidity tests for Foundry

How to Run Tests

  1. Ensure you have Foundry installed: See Foundry book
  2. Download or clone the project repository
  3. Navigate to the project directory in your terminal.
  4. Run forge test -vvv to execute tests on a fork of IoTeX mainnet,

License

This project is licensed under the MIT License.

About

ERC20 token native to the M3tering protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published