Skip to content

🧬 Core smart contracts of Platypus Finance

License

Notifications You must be signed in to change notification settings

cryptoelite29/core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lint Tests Slither

Platypus Finance v1 Core

Core smart contracts of Platypus Finance.

Before getting started with this repo, please read:

Overview

Platypus has devised a whole new kind of StableSwap for enhanced capital efficiency, scalability and user experience in the Avalanche ecosystem.

Contracts

We detail a few of the core contracts for the Platypus Finance Protocol.

Core.sol

Handles most of the math: fees, slippage and haircut as defined in the yellow paper.

Pool.sol

Handles deposits, withdrawals and swaps with an open and extendable pool design.

Testing and Development

Local Development

Requires node@>=14

Install dependencies

yarn

Compile Contracts

yarn compile

Run tests

yarn test

Slither

Run

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.

Echidna fuzzer

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

UML Diagram

Audits and Security

Read our bug bounty program details and SECURITY disclosure.

Licensing

The primary license for Platypus Finance Core v1 is the Business Source License 1.1 (BUSL-1.1), see LICENSE.

About

🧬 Core smart contracts of Platypus Finance

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 68.5%
  • Solidity 31.2%
  • JavaScript 0.3%