Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.55 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.55 KB

Spark PSM

Foundry CI Foundry License: AGPL v3

PSM contracts to either:

  • Convert between a tokenization of an asset (ex. USDC) and a yield-bearing version of the asset (ex. sDAI).
  • Convert one to one between directly correlated assets (ex. USDC-DAI).

[CRITICAL]: First Depositor Attack Prevention on Deployment

On the deployment of the PSM, the deployer MUST make an initial deposit to get AT LEAST 1e18 shares in order to protect the first depositor from getting attacked with a share inflation attack. This is outlined further here. Technical details related to this can be found in test/InflationAttack.t.sol. The deployment script [TODO] in this repo contains logic for the deployer to perform this initial deposit, so it is HIGHLY RECOMMENDED to use this deployment script when deploying the PSM. Reasoning for the technical implementation approach taken is outlined in more detail here.

Usage

forge build

Test

forge test

The IP in this repository was assigned to Mars SPC Limited in respect of the MarsOne SP