Spot is a multi-pool type DEX built on Fuel.
Package | Description |
---|---|
@spot/abis |
Contract ABIs used throughout the whole repo |
@spot/factory_registry |
The contract where all Spot factories are whitelisted |
@spot/fee_swapper |
The contract where all protocol fees are swapped to a single token |
@spot/pools/constant_product |
The XYK pool type and its associated factory |
@spot/pools/stable |
The stableswap pool type and its associated factory |
@spot/router |
The contract used to swap tokens as well as LP and withdraw liquidity from Spot pools |
To compile the smart contracts, you need to have fuelup and the Fuel toolkit installed locally and then execute the following (in any of the smart contract packages):
$ forc build
fuelup
0.2.2rustc
1.62.1 (e092d0b6b 2022-07-16)forc
0.20.2
To clean up smart contract builds, run the following in either of the packages:
$ forc clean
To run tests in any package, execute:
$ forc test
- Lots and lots of unit/integration tests
- Check contract binaries when adding pools in factories
- Add logic to handle block timestamps in pool contracts
- Remove unnecessary casting to
u64
in pool code to avoid precision loss - Implement
sqrt
directly for U128 instead of casting tou64
before applying it - Use
u256
for math