A computable financial transaction model
The Future of On-Chain Market Making is Here 🤑 📈📉💰
https://cofix.io/doc/CoFiX_White_Paper.pdf
https://github.com/Computable-Finance/Doc
npm install
npm run test
Run truffle compile
, get build results in build/contracts
folder, including ABI
json files.
or
Use npx oz compile
to adopt @openzeppelin/cli
toolchain.
Deploy with truffle
and you will get a contract deployement summary on contract addresses.
truffle migrate --network ropsten
You may need to activate()
the price oracle through CoFiXController
contract manually and set kTable with the help of scripts/setKTable.js.
There are several scripts used to invoke with the protocol in scripts/
folder. Simplely run truffle exec scripts/SPECIFIC_SCRIPT.JS
with flags to execute. Here are some examples.
npm run genabi
Contract | Address |
---|---|
USDT | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
HBTC | 0x0316EB71485b0Ab14103307bf65a021042c6d380 |
NEST | 0x04abEdA201850aC0124161F037Efd70c74ddC74C |
WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
NestPriceOracle | 0x94F36FAa6bB4f74009637292b09C355CcD3e80Eb |
NEST3VoteFactory | 0x6Cd5698E8854Fb6879d6B1C694223b389B465dea |
CoFiXKTable | 0x75E360Be6248Bd46030C6818624a09403EF5eC21 |
CoFiToken | 0xc2283C20a61847240d2eb10e6925d85bcaef89aE |
CoFiXNode | 0x558201DC4741efc11031Cdc3BC1bC728C23bF512 |
CoFiXFactory | 0x155BDA3255115b244Fe3767a9eDC002dC76023ad |
CoFiXRouter | 0xA2B29F965b537a9D279f75E1498413248C265Ead |
CoFiXController | 0x2f51563044d96105611Cdb5Bee621a5002Ee0264 |
CoFiXVaultForLP | 0xF128802361580FB2A74574ddEd4E09F44f4Ec4cF |
CoFiXVaultForTrader | 0x357811E0cA5AD4C66f1d44d05A3C73d98b4583CF |
CoFiXVaultForCNode | 0x1500b2621042fB814C38D9322a62ae214beeeA77 |
CoFiStakingRewards | 0xD16EeAfc4f614589eED0bc9294C1aE15F459831A |
- ETH/USDT
- Pair (XToken): 0x893554c9D24583dc4A926A0E6F5118028f4145eB
- XToken StakingRewards Pool: 0xaF6cE9CEc2D13773895A6B683f1Ce454505D89b1
- ETH/HBTC
- Pair (XToken): 0x5455064a184b41a8229E359b481c58F9CfEbc991
- XToken StakingRewards Pool: 0x12114849048B43cB57282027f574A8B92a01eaC7
Contract | Address |
---|---|
USDT | 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
HBTC | 0x0316EB71485b0Ab14103307bf65a021042c6d380 |
NEST | 0x04abEdA201850aC0124161F037Efd70c74ddC74C |
WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
NestPriceOracle | 0x7722891Ee45aD38AE05bDA8349bA4CF23cFd270F |
CoFiXController | 0xC16E5eECc0948604eb326296c71311aC8D9BC786 |
CoFiXFactory | 0xD5a19E1ADb5592921dcC42E48623d75c4C91e405 |
CoFiXKTable | 0x75E360Be6248Bd46030C6818624a09403EF5eC21 |
CoFiXRouter | 0x2878469c466638E8c0878bB86898073CA6C91b45 |
Contract | Address |
---|---|
USDT | 0x200506568C2980B4943B5EaA8713A5740eb2c98A |
HBTC | 0xA674f71ce49CE7F298aea2F23D918d114965eb40 |
NEST | 0xD287Bc43eCD3D892204aA3792165fe8728636E29 |
WETH | 0x59b8881812Ac484Ab78b8fc7c10b2543e079a6C3 |
NestPriceOracle | 0x70B9b6F0e1E4073403cF7143b45a862fe73af3B9 |
CoFiXKTable | 0xe609B978635c7Bb8D22Ffc4Ec7f7a16615a3b1cA |
CoFiToken | 0xE68976a81572B185899205C7b8BCBD1515DF4f5b |
CoFiXNode | 0x1B9B116BAbb32474A367d004aCE928db4215481F |
CoFiXFactory | 0xC85987c73300CFd1838da40F0A4b29bB64EAed8e |
CoFiXRouter | 0x66aa2AC8F6557B956AE144efe85feF860d848851 |
CoFiXController | 0xff460A541DC7Af7FeA7b98E0Ba5eF64C80B1409B |
CoFiXVaultForLP | 0xA4c1FcbB8B2bc0347F2736f78558cF2F1a99BF82 |
CoFiXVaultForTrader | 0xCfA46cDdC9142fE1Fa86F780Aeb32799ef008cDA |
CoFiXVaultForCNode | 0x1a31b517ABF0D2F4f11A797d7b8622859429AA25 |
CoFiStakingRewards | 0xDe80d5423569Ea4104d127e14E3fC1BE0486531d |
- ETH/USDT
- Pair (XToken): 0x5f22a04F81A87a7aBe9191C338fA5Ba092Af4562
- XToken StakingRewards Pool: 0xA3904574E4Fbf7592B3A3c1439cAe97D5622FBFD
- ETH/HBTC
- Pair (XToken): 0x9D90e9e5AFF7545046FF66544B7848C21118Da22
- XToken StakingRewards Pool: 0xe6c3bd6D258cE7fc7554723fc2b93F848CEF30E7
Contract | Address |
---|---|
USDT | 0x200506568C2980B4943B5EaA8713A5740eb2c98A |
HBTC | 0xA674f71ce49CE7F298aea2F23D918d114965eb40 |
NEST | 0xD287Bc43eCD3D892204aA3792165fe8728636E29 |
WETH | 0x59b8881812Ac484Ab78b8fc7c10b2543e079a6C3 |
NestPriceOracle | 0x70B9b6F0e1E4073403cF7143b45a862fe73af3B9 |
CoFiXKTable | 0xe609B978635c7Bb8D22Ffc4Ec7f7a16615a3b1cA |
CoFiToken | 0x0c7caD803686a284542d807406f4CD0b2c6B5d17 |
CoFiXNode | 0xA4B1412EcabAbB6F3188Aa411546491790bde89B |
CoFiXFactory | 0xB19EbE64A0ca9626824abBdbdeC4a76294D460A5 |
CoFiXRouter | 0xB9a933FE0Eeb184b2E35372B3ad55fDC4b325469 |
CoFiXController | 0xe4fa2dAA56e87a927386790D41E3F9906e40f4C2 |
CoFiXVaultForLP | 0xB6ae9774D2C743B0886123A1C98d4fc92558BaBC |
CoFiXVaultForTrader | 0xcF3167AFCAf33f899d4Fa0ab431D3B6038C79dbf |
CoFiXVaultForCNode | 0xEf1976634a2fbCCeD89DFAa44FAd85A4A211E4B3 |
CoFiStakingRewards | 0xC8b29e0b4F5e9A55a0130934A690655BefbA34B4 |
Contract | Address |
---|---|
USDT | 0x3399EB8165888221A30c822753648dfc16ed3803 |
HBTC | 0xC34156BE35c870D47638eFdCfA20E39e299607B0 |
NEST | 0xa50CB75ee798268aeA5de0F0aEE271595e1CAAa2 |
WETH | 0x39edE2c2ca91295BEA2F20080C0B82872B7C64b7 |
NestPriceOracle | 0x505A054e6064fADB9277864647641EF64B7c783B |
CoFiXKTable | 0xa01FeCbeD543DCF5612D379ecbE23b0D2763c0D6 |
CoFiToken | 0x61f423C704FcFd84adF006dB84a905dDca2ba4fA |
CoFiXNode | 0xC2B66C87bFCA3900031b246a169fB6A67A911D8a |
CoFiXFactory | 0x3B4d6962A3f5184D9eb240D70070516addC3F4c5 |
CoFiXRouter | 0x5f6c887B22a8b30C2eca90B9C63ff370494790B7 |
CoFiXController | 0xed03772aFF6B83875De68C89961f83899D29EeD1 |
CoFiXVaultForLP | 0x1eAF116d62eB943fcf28A0645b8059EFBb829FAB |
CoFiXVaultForTrader | 0x37289c1d3BEAE79c0EEF494ABf5209668E1704B9 |
CoFiXVaultForCNode | 0x04983eEA3aA0A73A1487B255abA688619844B023 |
CoFiStakingRewards | 0x453FEd6fE31a17C8277bd7F477ebbCB542D4Ad5D |
Contract | Address |
---|---|
USDT | 0x04716BaA169f6E5BAFe92E4643C2f18480ba46D3 |
HBTC | 0xcae23767DF5BbEBD0d64402a7d3d82776f97bE46 |
NEST | 0x08cFf00044dECe1D817F3D30A7cc8aef43A284De |
WETH | 0x6A04aF9c9793D9eE1a27eB7A343f940282a0AB9e |
NestPriceOracle | 0x93Afa4ff16874Cf9D4f29da4973be277f53607Af |
CoFiXController | 0xf71141F66e15740DB5d59E4c31ee0D84d6584452 |
CoFiXFactory | 0x9984dCe65387d9AE8a495452F72dF0A0D4F85d2c |
CoFiXKTable | 0x0441e7e4C1ecd73a068F0696Cf4cB10Ea69dD74A |
CoFiXRouter | 0xB5852d2cC06cd394f52C9edEbF0f1d59aD4A0615 |
check test/CoFiX.test.js
for details.