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).
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.
forge build
forge test
The IP in this repository was assigned to Mars SPC Limited in respect of the MarsOne SP