Core smart contracts of Platypus Finance.
Before getting started with this repo, please read:
Platypus has devised a whole new kind of StableSwap for enhanced capital efficiency, scalability and user experience in the Avalanche ecosystem.
We detail a few of the core contracts for the Platypus Finance Protocol.
- Handles most of the math: fees, slippage and haircut as defined in the yellow paper.
- Handles deposits, withdrawals and swaps with an open and extendable pool design.
Requires node@>=14
yarn
yarn compile
yarn test
We use a mirror of slither to guarantee consistency and compatibility. It is located in this repository.
docker run --rm -it -v "$PWD":/src platypusfinance/eth-security-toolbox
# Inside container
cd /src
slither .
Slither may generate false positives that may break CI. To suppress these false positives :
docker run --rm -it -v "$PWD":/src platypusfinance/eth-security-toolbox
# Inside container
cd /src
slither . --triage
# An interactive prompt will be invoked for suppressing the warnings
A new slither.db.json
will be created and should be commited.
To launch echidna fuzzer, first cd into the core directory.
rm -rf crytic-export/; yarn compile; docker run -it -v "$PWD":/src platypusfinance/eth-security-toolbox
# Inside container
solc-select 0.8.9; cd /src/; echidna-test . --contract IntegrationTest --config echidna.yaml
Read our bug bounty program details and SECURITY disclosure.
The primary license for Platypus Finance Core v1 is the Business Source License 1.1 (BUSL-1.1
), see LICENSE
.