Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: RWA Offboarding Checklist #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

amusingaxl
Copy link
Contributor

No description provided.

spell/rwa-checklists.md Outdated Show resolved Hide resolved
spell/rwa-checklists.md Outdated Show resolved Hide resolved
spell/rwa-checklists.md Outdated Show resolved Hide resolved
spell/rwa-checklists.md Outdated Show resolved Hide resolved
* [ ] Increase Ilk Debt Ceiling (set DC + increase Global DC)
* [ ] File Ilk `pip` in the `spotter`
* [ ] File Ilk `mat` in the `spotter`
* [ ] Poke `spotter` to pull in the price
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Should we sanity check if the price is reasonable?

Copy link
Contributor Author

@amusingaxl amusingaxl Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's actually a correct way to calculate it. We should probably add it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* [ ] `bump` `RwaLiquidationOracle` with new computed increased price (`val`)
* [ ] ensure `val` is set accordingly with autoline max debt ceiling (`line`)
* [ ] `val` should enable DAI to be drawn over the loan period while taking into account the configured `ink` amount, interest rate and liquidation ratio (see below)
* [ ] New `val` is calculated with `line * [(1 + duty) ** years] * mat` - rounded up - and makes sense in context of the [rate mechanism](https://github.com/makerdao/developerguides/blob/master/mcd/intro-rate-mechanism/intro-rate-mechanism.md). Minimum duration is usually in the Exec Doc of the spell with the RWAXXX ilk onboarding.
* [ ] Comment explaining `val` formula (`Debt ceiling * [ (1 + RWA stability fee ) ^ (minimum deal duration in years) ] * liquidation ratio`) is present
* [ ] Accompanying comment above `bump` line in format `// XXM * 1.XX^X * X.XX as a WAD` corresponding to the `val` calculation formula (e.g. `// 15M * 1.03^2 * 1.00 as a WAD`) is present along with the calculation formula on the line above
* [ ] IF combining `val` of multiple RWA ilks being combined, `val` calculation is done once per ilk and added to make the total, with workings provided in code comments. The existing `val` value can be retrieved by calling `read()` on `PIP_RWAXX` and converting the result into decimal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check these.

* [ ] `RwaLiquidationOracle.tell(ilk)` call is present
* [ ] IF `RWAXYZ_A_INPUT_CONDUIT` is an instance of [`TinlakeMgr`](https://github.com/centrifuge/tinlake-maker-lib/blob/master/src/mgr.sol) (it is a Centrifuge integration), additional `TinlakeMgr.tell()` call is present (in order to prevent further `TIN` redemptions in the Centrifuge pool)

## RWA Offboarding Checklist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we require removal from the IlkRegistry here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is that we usually don't remove anything from the ilk registry. I'm not sure if we should do it for this specific case only.


## RWA Offboarding Checklist

* IF there is debt in the RWA Vault (`vat.urns(ilk, RWAXYZ_A_URN).art > 0`), proceed with the write-off (i.e.: vault is in default):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a situation where the RWA Vault has surplus when being offboarded? In this case, what should be done with it? (send it to surplus buffer?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by surplus? ink > art?

* [ ] IF the stability fee for the ilk is not zero (`jug.ilks(ilk).duty > 1 * RAY`), `jug.drip(ilk)` call is present
* [ ] `RwaLiquidationOracle.cull(ilk, RWAXYZ_A_URN)` call is present
* OTHERWISE IF there is no more debt remaining in the vault (`vat.urns(ilk, RWAXYZ_A_URN).art == 0`):
* [ ] The debt ceiling (`vat.ilks(ilk).line`) is currently being set to `0`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we deny the Join on the Vat?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RWAs gem joins are permissioned, so in theory there's no harm in leaving the permission there.
We should have a general checklist for "scuttling" contracts (aka the removal of all permissions in the system for a contract) that covers it.

amusingaxl and others added 2 commits November 20, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants