Comments (2)
AMM(Automated Market Maker) Protocol
- add_liquidity xrc-20/xdag
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 1 | add_liquidity |
3 | Token Name | 5 | BTC | Token name |
4 | AmountDesire | 8 | 1 | The amount of token you wish to deposit. |
5 | AmountMin | 1 | 5 | Percentage of Minimal Deposited Token. |
6 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
- add_liquidity xrc-20/xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 2 | add_liquidity |
3 | TokenA | 5 | BTC | Token name A |
4 | TokenB | 5 | USDT | Token name B |
5 | AmountADesire | 8 | 1 | The amount of token A you wish to deposit. |
6 | AmountBDesire | 8 | 30000 | The amount of token B you wish to deposit. |
7 | AmountAMin | 1 | 5 | Percentage of Minimal Deposited Token A. |
8 | AmountBMin | 1 | 5 | Percentage of Minimal Deposited Token B. |
9 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
- remove_liquidity xrc-20/xdag
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 3 | add_liquidity |
3 | Token Name | 5 | BTC | Token name |
4 | Liquidity | 8 | 1 | Amount to transfer: States the amount of the xrc-20 to add_liquidity. |
5 | AmountAMin | 1 | 5 | Percentage of Minimal Deposited Token A. |
6 | AmountBMin | 1 | 5 | Percentage of Minimal Deposited Token B. |
7 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
- remove_liquidity xrc-20/xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 4 | remove_liquidity |
3 | TokenA | 5 | BTC | Token name of A |
4 | TokenB | 5 | USDT | Token name of B |
5 | Liquidity | 8 | 1 | Amount to transfer: States the amount of the xrc-20 to add_liquidity. |
6 | AmountAMin | 1 | 5 | Percentage of Minimal Deposited Token A. |
7 | AmountBMin | 1 | 5 | Percentage of Minimal Deposited Token B. |
8 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
- swap xrc-20/xdag
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 5 | swap |
3 | amountIn | 8 | 100 | Swap Token Input Amount. |
4 | amountOutMin | 8 | 1000000 | Swap Token Min Output Amount. |
5 | path | 15 | BTC USDT | Token name array(split by 5 bytes). |
6 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
- swap xrc-20/xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 2 | AMM |
2 | Operation | 1 | 6 | swap |
3 | amountOut | 8 | 100 | Swap Token Output Amount. |
4 | amountInMax | 8 | 1000000 | Swap Token Max Output Amount. |
5 | path | 15 | BTC USDT | Token name array(split by 5 bytes). |
6 | deadline | 1 | 168801901704 | request expiration time. (unix timestamp) |
from xdagj.
Protocol Design:
index | name | bytes | Type | Description |
---|---|---|---|---|
1 | Protocol | 1 | unsigned number | Protocol: XRC-20:1 , AMM: 2 |
XRC-20 Protocol
- Deploy xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 1 | xrc-20 |
2 | Token Name | 5 | BTC | Token name |
3 | Operation | 1 | 1 | deploy |
4 | Max | 8 | 21000000 | Max supply: set max supply of the XRC-20 |
5 | Lim | 8 | 10000 | Mint limit: If letting users mint to themsleves |
6 | Dec | 1 | 8 | Decimals: set decimal precision, max is 8 |
7 | permissions | 1 | 0 | Permissions: 0: allow everyone mint, 1: only allow Deploy address mint |
- Mint xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 1 | xrc-20 |
2 | Token Name | 5 | BTC | Token name |
3 | Operation | 1 | 2 | mint |
4 | Amount | 16 | 100000000 | Amount to mint: States the amount of the xrc-20 to mint. Has to be less than "lim" above if stated. |
- Transfer xrc-20
index | name | bytes | value | Description |
---|---|---|---|---|
1 | Protocol | 1 | 1 | xrc-20 |
2 | Token Name | 5 | BTC | Token name |
3 | Operation | 1 | 3 | transfer |
4 | Amount | 16 | 100000000 | Amount to transfer: States the amount of the xrc-20 to transfer. |
from xdagj.
Related Issues (20)
- BUG : can't run on macbook pro m1 HOT 2
- Excuse me, does the java version of xdag support windows? HOT 3
- Feature : RPC Authentication HOT 2
- Feature : Remove Address block HOT 2
- Refactor : Separation of mining pool function and xdag full node function
- Refactor : Remove native library calls HOT 2
- Feature : Add transaction fee
- Refactor : Reduce CPU load
- Feature : Code coverage reaches 60%
- BUG : connecting to pool HOT 3
- BUG : HOT 2
- BUG : HOT 1
- BUG : Some rewards abnormal
- BUG :
- BUG : Old wallet get account balance failed HOT 2
- How to change Testnet to Mainnet?
- will the Remark data on the chain be deleted? HOT 4
- Solo mininig : pools doesn't payout entire block to miner HOT 1
- Problem with the Xdagg Miner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xdagj.