Releases: stableex/sx.curve
Releases · stableex/sx.curve
SX Curve v1.0.3 Release Notes
Peripheral EOSIO smart contracts for interacting with SX Curve
Security Audit
Sentnl Audit (2020-03)
SHA256 Checksum
Local
eosio-cpp version 1.7.0
$ git clone https://github.com/stableex/sx.curve.git
$ git checkout v1.0.3
$ eosio-cpp curve.sx.cpp -I include
$ shasum -a 256 curve.sx.wasm
a9aa7e60901cfc3ffe481099daa7f13f0b9cdba19c64ffd18aa5789932336f8c curve.sx.wasm
EOS Mainnet
$ cleos -u https://eos.greymass.com get code curve.sx
code hash: a9aa7e60901cfc3ffe481099daa7f13f0b9cdba19c64ffd18aa5789932336f8c
Changes
- improve error handling checks
- allow deployment of smart contract account name
- code refactoring
SX Curve v1.0.2 Release Notes
Peripheral EOSIO smart contracts for interacting with SX Curve
Security Audit
SHA256 Checksum
Local
eosio-cpp version 1.7.0
$ git clone https://github.com/stableex/sx.curve.git
$ git checkout v1.0.2
$ eosio-cpp curve.sx.cpp -I include
$ shasum -a 256 curve.sx.wasm
9126cde6ddd504df91922aff921f42e5a5618b6d38df5184c865dc4112ac4880 curve.sx.wasm
EOS Mainnet
$ cleos -u https://api.eosn.io get code curve.sx
code hash: 9126cde6ddd504df91922aff921f42e5a5618b6d38df5184c865dc4112ac4880
Changes
- (#2): add deposit slippage protection
SX Curve v1.0.1 Release Notes
Peripheral EOSIO smart contracts for interacting with SX Curve
SHA256 Checksum
Local
$ git checkout v1.0.1
$ eosio-cpp curve.sx.cpp -I include
$ shasum -a 256 curve.sx.wasm
abb4b445cac42c9e0a1ceac33dc7e9c36a1452eb89bdff05b907cf3936b2ff9c curve.sx.wasm
EOS Mainnet
$ cleos -u https://api.eosn.io get code curve.sx
code hash: abb4b445cac42c9e0a1ceac33dc7e9c36a1452eb89bdff05b907cf3936b2ff9c
Fixes
- (7a9525d): mul_amount overflow check
- (5c0d3e9): use max precision 6 for curve calculations
- (19ce853): improve symbol code
- (65a6ffa): test d1 overflow issue
Changes
setnotifiers
ACTION: to allow notifying other supporting smart contracts usingrequire_recpient
.
SX Curve v1.0.0 Release Notes
Peripheral EOSIO smart contracts for interacting with SX Curve
SHA256 Checksum
Local
$ git checkout v1.0.0
$ eosio-cpp curve.sx.cpp -I include
$ shasum -a 256 curve.sx.wasm
e8960a51393f0d262e6d712af58b8f90d624a65e75096947014465ef77983338 curve.sx.wasm
EOS Mainnet
$ cleos -u https://api.eosn.io get code curve.sx
code hash: e8960a51393f0d262e6d712af58b8f90d624a65e75096947014465ef77983338
Quickstart
convert
memo schema:
swap,<min_return>,<pair_ids>
$ cleos transfer myaccount curve.sx "10.0000 USDT" "swap,0,SXA" --contract tethertether
# => receive "10.0000 USN@danchortoken"
deposit
memo schema:
deposit,<pair_id>
$ cleos transfer myaccount curve.sx "10.0000 USDT" "deposit,SXA" --contract tethertether
$ cleos transfer myaccount curve.sx "10.0000 USN" "deposit,SXA" --contract danchortoken
$ cleos push action curve.sx deposit '["myaccount", "SXA"]' -p myaccount
# => receive "20.0000 [email protected]"
withdraw
memo schema:
N/A
$ cleos transfer myaccount curve.sx "20.0000 SXA" "" --contract lptoken.sx
# => receive "10.0000 USDT@tethertether" + "10.0000 USN@danchortoken"
C++
#include "curve.sx.hpp"
// User Inputs
const asset in = asset{10'0000, {"USDT", 4}};
const symbol_code pair_id = symbol_code{"SXA"};
// Calculated Output
const asset out = sx::curve::get_amount_out( in, pair_id );
//=> "10.0000 USN"