Go to file
Christian Kamm dc4acd0dd7 Serum: loan origination fee, don't auto-settle, fix vault check
- Loan origination fees: The previous approach of tracking the reserved
  amount did not work because OutEvents will also reduce the reserved
  amount. This means we can't know if it was an OutEvent-cancel or an
  order execution that caused the reduction.

  Instead, we now track the amount of borrows that was made (without
  applying origination fees) in place order. Whenever we try to settle
  and the amount of tokens on the oo account is less than the potential
  borrows, we can be certain that the borrow has actualized.

- Place order is no longer automatically followed by a settle.

  This can reduce compute use when people want to place multiple orders
  in sequence. Now they can use the HealthRegion instructions to place
  their orders, settle once at the end, and then have health checked.

- Vault check: Place order previously rejected valid orders because it
  didn't consider that there could be free tokens on the oo account.

- Tests: Some infrastructure for less verbose serum testing.
2022-08-30 08:38:13 +02:00
.cargo
.github/workflows Update trigger branch 2022-08-09 12:14:48 +01:00
anchor@b52f236146 make functions consistent, always return positive values for deposits or borrows 2022-08-23 13:47:08 +02:00
anchor-tests Clarkeni/ids from api (#177) 2022-08-18 08:48:45 +02:00
cli Liquidator: basic sell/buy to keep only quote 2022-08-10 16:18:41 +02:00
client Add HealthRegion instructions 2022-08-24 10:07:45 +02:00
keeper Add metrics output to crank (#186) 2022-08-24 09:53:46 +02:00
lib/checked_math checked_math: support casts and I80F48::from 2022-08-14 15:01:15 +02:00
liquidator Add HealthRegion instructions 2022-08-24 10:07:45 +02:00
mango-macro
migrations
programs Serum: loan origination fee, don't auto-settle, fix vault check 2022-08-30 08:38:13 +02:00
py
ts/client Merge branch 'main' into dev 2022-08-26 10:45:56 +02:00
.dockerignore wip docker 2022-07-29 11:15:26 +02:00
.eslintignore add eslint config and fix errors 2022-08-04 13:42:41 -04:00
.eslintrc.json add custom sendTransaction to support post send callbacks 2022-08-12 17:15:12 -07:00
.gitignore Clarkeni/anchor tests (#120) 2022-08-03 09:05:16 -07:00
.gitmodules fix small things to make ci work again (#126) 2022-07-30 09:49:56 +02:00
.prettierignore run prettier and add prettierignore 2022-08-04 14:45:09 -04:00
Anchor.toml Clarkeni/group logging (#142) 2022-08-05 10:11:44 -07:00
CHANGELOG.md Add HealthRegion instructions 2022-08-24 10:07:45 +02:00
Cargo.lock Tests: Fix program log capture 2022-08-24 10:07:45 +02:00
Cargo.toml Add "cli" command line tool to generate pda addresses 2022-08-02 09:45:12 +02:00
Dockerfile Upgrade docker runtime distro 2022-08-12 14:17:18 +01:00
HOW-TO-RELEASE.md update 2022-07-14 10:14:23 +02:00
README.md update 2022-08-18 08:59:51 +02:00
idl-fixup.sh IDL: Remove NodeRef and NodeRefMut enums 2022-07-22 08:35:30 +02:00
mc-release-to-devnet.sh Make anchor's lint pass 2022-08-15 10:48:43 +02:00
package.json mc/switchboard ts support (#182) 2022-08-24 10:16:43 +02:00
release-to-devnet.sh Make anchor's lint pass 2022-08-15 10:48:43 +02:00
release-to-mainnet.sh Make anchor's lint pass 2022-08-15 10:48:43 +02:00
tsconfig.build.json
tsconfig.cjs.json
tsconfig.esm.json add esm tsconfig 2022-06-30 13:17:10 -04:00
tsconfig.json make jup-ag/core a devdependency 2022-07-05 23:38:53 -04:00
update-local-idl.sh Make anchor's lint pass 2022-08-15 10:48:43 +02:00
yarn.lock mc/switchboard ts support (#182) 2022-08-24 10:16:43 +02:00

README.md

Development

  • rust version 1.59.0 (9d1b2106e 2022-02-23)
  • solana-cli 1.9.13
  • anchor-cli 0.24.2
  • npm 8.1.2
  • node v16.13.1

Devnet deployment - m43thNJ58XCjL798ZSq6JGAG1BnWskhdq5or6kcnfsD

For testing latest program changes while developing, just run below scripts in given order form any branch, these set of scripts should more or less always work, bump up GROUP_NUM if you unsure if previous GROUP_NUM has not been cleanly closed or setup with older program code

./release-to-devnet.sh
GROUP_NUM=4 yarn ts-node ts/client/src/scripts/devnet-admin.ts
GROUP_NUM=4 yarn ts-node ts/client/src/scripts/devnet-user.ts
GROUP_NUM=4 yarn ts-node ts/client/src/scripts/devnet-user-close-account.ts
GROUP_NUM=4 yarn ts-node ts/client/src/scripts/devnet-admin-close.ts