Commit Graph

865 Commits

Author SHA1 Message Date
dependabot[bot] 11928f02db
Bump @solana/web3.js from 0.87.0 to 0.88.0 in /token-swap/js (#970)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.87.0 to 0.88.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.87.0...v0.88.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-25 10:45:08 +00:00
dependabot[bot] 67b2b59729
Bump ts-node from 9.0.0 to 9.1.1 in /token-lending/js (#969)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.0.0 to 9.1.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.0.0...v9.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-25 10:42:24 +00:00
dependabot[bot] 5a098026ac
Bump @solana/web3.js from 0.87.0 to 0.88.0 in /token-lending/js (#968)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.87.0 to 0.88.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.87.0...v0.88.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-25 10:23:52 +00:00
Jon Cinque 95ad894c25
Print fuzz file content on failure for local repro (#964) 2020-12-21 18:55:47 +01:00
Justin Starry 891b6794f3
Introduce SPL Token Lending (#696)
* Add spl-token-lending

* lending-client

* cargo clippy

* Limit bpf tests

* Enable lending bpf tests

* Remove obligation signer requirement

* Fix token lending js cli test

* Fix
2020-12-19 08:17:07 +08:00
Jon Cinque 9e7e63f405
token-swap: Add new instructions to fuzzing (#961) 2020-12-18 16:35:17 +01:00
Jon Cinque 942bf77c90
token-swap: Add proptest for deposit draining (#959)
* Add deposit drain proptest

* Add special logic for constant price curve normalized value when close to u128

* Cargo fmt

* Fix bpf build
2020-12-18 13:32:34 +01:00
Michael Vines d0d2a22545 Disable tests that link directly with the BPF VM. 2020-12-17 21:24:30 -08:00
Michael Vines 829b51c9f4 Update to Rust 1.48.0 2020-12-17 21:24:30 -08:00
Michael Vines 8ae34d2137 Update to Solana 1.5.0 2020-12-17 21:24:30 -08:00
Michael Vines da98fc691f Port token js tests from solana-localnet to solana-test-validator 2020-12-17 21:24:30 -08:00
Jon Cinque 2158214c84
token-swap: Add fuzz check for pool token value (#958)
* Add extra check on instruction fuzz

* Refactor division

* Fix tests from fixed deposit math

* Fixup comments and cleanup fuzz

* Run fmt

* Address review feedback

* Fix JS test
2020-12-17 21:13:48 +01:00
Jon Cinque cc7e8e0d98
token-swap: Add proptests for decreasing curve value (#952)
* Add proptest-regressions to .gitignore, created from failed proptests

* Add proptests to ensure swapping maintains value

* Address review feedback

* Add doc to public test function
2020-12-17 20:09:58 +01:00
Trent Nelson 7e5ef20c44 Bump token-cli to v2.0.6 2020-12-16 22:45:52 +00:00
Trent Nelson 9eb524feae Bump token to v3.0.1 2020-12-16 22:45:52 +00:00
Trent Nelson 775700952c Bump memo to v2.0.1 2020-12-16 22:45:52 +00:00
Trent Nelson 3f84cc99d0 Bump ATA to v1.0.2 2020-12-16 22:45:52 +00:00
Trent Nelson 603e3517f8 Bump {ata,memo,token-{program,cli}} to solana v1.4.17
To pick up cargo audit fixes for monorepo
2020-12-16 22:45:52 +00:00
Trent Nelson 096d2ec5e2 Bump CI solana CLI version to v1.4.16
fixes criterion setup issue
2020-12-16 22:13:01 +00:00
Jon Cinque d46f010195
token-swap: Add proptests for single token conversion (#950)
* Add proptests for single token conversion

* Update token-swap/program/src/curve/calculator.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update token-swap/program/src/curve/calculator.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Revert change from fuzzing

* Reduce the constant price b->a test range

* Use constant for basis points guarantee

* Address review feedback

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-12-16 18:30:28 +01:00
Jon Cinque ec2cd04c82
Add proptest for stable swap intead of all numbers (#944) 2020-12-16 10:19:08 +01:00
Jon Cinque 7190672a0f
token-swap: Add instructions to deposit / withdraw one token (#937)
* Add instructions to deposit / withdraw one token

* Run cargo fmt

* Fix clippy issues

* Add JS interface

* Add tests for new instructions

* Run prettier

* Rename deposit and withdraw

* Rename withdraw -> withdraw all in program

* Rename single token instructions
2020-12-16 10:02:27 +01:00
Michael Vines 020b13d80c Fix coverage on macOS 2020-12-14 12:07:16 -08:00
Jon Cinque f8ba091a36
Fix bpf build, need to fully reference u128::MAX (#946) 2020-12-14 18:06:38 +01:00
Jon Cinque 8233d35fda
token-swap: Refactor math into sqrt function and add proptest (#943)
* Refactor into sqrt function and add proptest

* Run cargo fmt + clippy

* Address review feedback
2020-12-14 17:48:41 +01:00
Jon Cinque 55deb6c1af
token-swap: Constant price curve (#936)
* Update constant price curve conversion to/from pool tokens

* Add test for pool token conversion

* Fix tests

* run cargo fmt

* Assess fee on half source amount for conversion
2020-12-11 10:27:28 +01:00
Jon Cinque 087ae2e242
token-swap: Add offset curve and math (#935)
* Add offset curve

* Fix for math

* Add PreciseNumber

* Use Balancer formulation for trading token -> pool token conversion

* Add round-trip conversion testing

* Add offset curve to JS

* Run cargo fmt

* Update JS test numbers for new calcs

* Integrate review feedback

* Allow for withdrawals when one side is 0

* Run cargo fmt

* Disallow deposits for offset curve

* Run cargo fmt

* Allow for withdrawals through 0
2020-12-10 18:31:21 +01:00
Jon Cinque 3dcb1c5665
token-swap: Add pool token conversion interface (#934)
* Add pool token conversion interface for all curves

This reverts commit 8400bc7bfe4fcc18580d8f81cbb19a4ef5a437ff.

* Improve tests

* Run cargo fmt
2020-12-09 11:30:22 +01:00
Jon Cinque c0f5ff182c
token-swap: Refactor for new curves (#930)
* Add price parameter for flat / constant price curve

This encompasses a lot of changes to properly support the constant price
curve, and fixes some old pain points to make the whole thing easier to
use, including:
* refactor fees out of the curve
* move all fee calculations into new Fees type
* modify constraints to only care about curve types and fee
* add price parameter into constant price curve (flat curve)

* Run cargo fmt and clippy

* Revert interface changes and math update

* Run cargo fmt

* Address review feedback

* Fix fraction validation for zeros
2020-12-08 18:22:32 +01:00
Tyera Eulberg 0047d347b0
Bump feature-proposal cli (#932) 2020-12-07 15:08:24 -07:00
Paul Bernier bd701830eb Fix typo in account list numbering 2020-12-05 19:41:40 -07:00
dependabot[bot] 7828871e5f
Bump @rollup/plugin-commonjs from 16.0.0 to 17.0.0 in /token-swap/js (#920)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 16.0.0 to 17.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v16.0.0...commonjs-v17.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-03 11:19:07 +00:00
Jon Cinque 04a3c833f0
token-swap: Cleanup check (#903)
* Add extra check

* Add extra check on init

* Run cargo fmt

* Clippy

* Add token program id check on unpack

* Run cargo fmt

* Add checks for program id ownership on swap account

* Add truncation check during swapping

* Run cargo fmt

* Update truncation to ceiling the value

* Run cargo fmt

* Fix JS test

* Refund back not needed source tokens

* Run cargo fmt

* Add swap_without_fees method to trait

* Fix merge problem

Co-authored-by: Justin Starry <justin@solana.com>
2020-12-03 12:17:32 +01:00
dependabot[bot] e49201b420
Bump eslint-plugin-prettier from 3.1.4 to 3.2.0 in /token-lending/js (#918)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.4 to 3.2.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.4...v3.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-03 10:37:57 +00:00
dependabot[bot] 07e0352f10
Bump rollup from 2.34.0 to 2.34.1 in /token-lending/js (#919)
Bumps [rollup](https://github.com/rollup/rollup) from 2.34.0 to 2.34.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.34.0...v2.34.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-03 10:20:37 +00:00
Yuriy Savchenko c03f45ec30
Multi-account withdraw added the stake-pool CLI (#895)
* Multi-account withdraw added the stake-pool CLI

* Multi-account withdraw refactoring in stake-pool cli, added merge of multiple claim accounts

* Fixed formatting

* Added tests to stake pool CLI withdraw accounts selection

* Formatting fixed

* Clippy warnings fixed
2020-12-03 11:11:56 +01:00
dependabot[bot] 2225db97d7
Bump rollup from 2.34.0 to 2.34.1 in /token/js (#917)
Bumps [rollup](https://github.com/rollup/rollup) from 2.34.0 to 2.34.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.34.0...v2.34.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-03 09:19:41 +00:00
Michael Vines e7ca84b9ee Disable client_ristretto build 2020-12-03 05:39:55 +00:00
Michael Vines 158fa1dea6 Upgrade to Solana v1.4.14 2020-12-03 05:39:55 +00:00
Michael Vines a477895f02 program-test now adds SPL Token automatically 2020-12-03 05:39:55 +00:00
dependabot[bot] 6aa1d8cce1
Bump solana-program from 1.4.9 to 1.4.13 (#916)
Bumps [solana-program](https://github.com/solana-labs/solana) from 1.4.9 to 1.4.13.
- [Release notes](https://github.com/solana-labs/solana/releases)
- [Changelog](https://github.com/solana-labs/solana/blob/master/RELEASE.md)
- [Commits](https://github.com/solana-labs/solana/compare/v1.4.9...v1.4.13)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 12:54:42 +00:00
dependabot[bot] cfcfc79482
Bump prettier from 2.2.0 to 2.2.1 in /token-swap/js (#915)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.0...2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 11:31:28 +00:00
dependabot[bot] 1e4292a720
Bump typescript from 4.0.5 to 4.1.2 in /token-lending/js (#914)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 10:32:59 +00:00
dependabot[bot] 28be684311
Bump @rollup/plugin-commonjs from 16.0.0 to 17.0.0 in /token-lending/js (#913)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 16.0.0 to 17.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v16.0.0...commonjs-v17.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 10:31:13 +00:00
dependabot[bot] 64c99a5f5b
Bump @rollup/plugin-commonjs from 16.0.0 to 17.0.0 in /token/js (#911)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 16.0.0 to 17.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Commits](https://github.com/rollup/plugins/compare/commonjs-v16.0.0...commonjs-v17.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 09:32:16 +00:00
dependabot[bot] 2d9ec02dc0
Bump tokio from 0.3.3 to 0.3.5 (#910)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 0.3.3 to 0.3.5.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.3.3...tokio-0.3.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 12:52:58 +00:00
dependabot[bot] b1753dfc20
Bump @babel/cli from 7.12.1 to 7.12.8 in /token-swap/js (#909)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.12.1 to 7.12.8.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.8/packages/babel-cli)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 11:31:12 +00:00
dependabot[bot] 21a3ed3c20
Bump @typescript-eslint/eslint-plugin in /token-lending/js (#908)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.8.2 to 4.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.9.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 11:04:42 +00:00
dependabot[bot] 7cc7718ee2
Bump @types/node from 14.14.9 to 14.14.10 in /token-lending/js (#907)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.9 to 14.14.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 10:32:55 +00:00
dependabot[bot] 2ead9d38c7
Bump eslint from 7.13.0 to 7.14.0 in /token/js (#905)
Bumps [eslint](https://github.com/eslint/eslint) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.13.0...v7.14.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 09:35:45 +00:00