## Current state (as of 03.06.2025)
- The setup is based on the [makerdao/dss-allocator](https://github.com/makerdao/dss-allocator) system
- Contracts audited [here](https://www.chainsecurity.com/security-audit/makerdao-dss-allocator), with [separately audited scripts](https://www.chainsecurity.com/security-audit/makerdao-allocator-deployment-scripts)
- Relevant [stats maintained by BA-labs](https://info.sky.money/collateral/nova/ALLOCATOR-NOVA-A/activity)
- Current [auto-line](https://github.com/makerdao/dss-auto-line) parameters
- max line: `60 Million`
- gap: `1 Million`
- ttl: `20 hours`
- Current debt: `0`
- Current rate: `0`
- Operator and other Star-related addresses [can be found in the forum announcement](https://forum.sky.money/t/technical-scope-of-the-nova-allocator-instance/26031)
## Available options
- [Operator (current setup)](https://forum.sky.money/t/technical-scope-of-the-nova-allocator-instance/26031)
- Doesn't need any governance processes, therefore risky, only possible with low auto-line `gap` and `maxLine`
- Don’t have admin rights in the system (but can only `draw`, `wipe` on the [AllocatorVault](https://github.com/makerdao/dss-allocator/blob/dev/src/AllocatorVault.sol) and transfer USDS from the [AllocatorBuffer](https://github.com/makerdao/dss-allocator/blob/dev/src/AllocatorBuffer.sol))
- [ALM controller](https://github.com/sparkdotfi/spark-alm-controller)
- Originally [developed by Spark Star](https://github.com/sparkdotfi/spark-alm-controller), now also [used by another Star](https://forum.sky.money/t/technical-test-of-the-star2-allocation-system/26289)
- [Audited by ChainSecurity](https://www.chainsecurity.com/security-audit/spark-alm-controller)
- Requires [SubProxy](https://github.com/makerdao/endgame-toolkit/blob/master/src/SubProxy.sol) contract and Star spells to update the controller, set new rate limits, etc
- Example Star spells could be find here [sparkdotfi/spark-spells](https://github.com/sparkdotfi/spark-spells)
- Actual transactions within rate limits are submitted by the `RELAYER` (Msig/EOA)
- See [example transaction initiated by Spark Relayer](https://dashboard.tenderly.co/tx/0xcb9838d6a56c8f247ee3160c83c8a291bcc4b565969a82573bb2523534891fce?trace=0.1.7.0.0)
- `FREEZER` (Msig/EOA) can remove `RELAYER` in case it’s compromised
- Note: Spark [is currently working on adding LayerZero support to their ALM controller](https://github.com/sparkdotfi/spark-alm-controller/pull/119), perhaps something that can be reused by your team as well
- Funnels, Conduits
- The allocator system [was build with those patterns in mind](https://github.com/makerdao/dss-allocator/tree/dev?tab=readme-ov-file#layers). Example funnels were audited as [part of the DSS Allocator](https://www.chainsecurity.com/security-audit/makerdao-dss-allocator). Audit of the example conduit can be found [here](https://www.chainsecurity.com/security-audit/makerdao-arrangerconduit).
### High-level diagram

**Note**: outlined communication steps are slightly simplified. Please use traces of the actual transactions to more detailed understanding:
- [Trace of the 2025-04-30 Core spell which executed Spark spell](https://dashboard.tenderly.co/tx/0xf84bbb02e89091769f32e593856bb70a9886b1f425fef22ee6e7dfc8e6e3fa1b?trace=0.5.8.1.15)
- [Trace of the Relayer to Controller.mintUSDS](https://dashboard.tenderly.co/tx/0xcb9838d6a56c8f247ee3160c83c8a291bcc4b565969a82573bb2523534891fce?trace=0.1.7.0.0)
## Potentially relevant infrastructure and practices
- [Sky chainlog](https://chainlog.sky.money/) – up-to-date and onchain source of Sky-related contracts
- [Repository where Core spells are developed and archived](https://github.com/makerdao/spells-mainnet/tree/master/archive/)
- Example 1: Spell 2025-04-30 [executes Spark spell via the relevant SubProxy contract](https://github.com/makerdao/spells-mainnet/blob/94293ab49652ad017764736dee3bff93d7b63fc0/archive/2025-04-30-DssSpell/DssSpell.sol#L160-L161). [Transaction trace](https://dashboard.tenderly.co/tx/0xf84bbb02e89091769f32e593856bb70a9886b1f425fef22ee6e7dfc8e6e3fa1b?trace=0.5.8.1.15) of the executed spell.
- [Tenderly Testents](https://docs.tenderly.co/virtual-testnets) – Sky does not maintain official testnet, instead uses a service from Tenderly which can fork a network, execute some transactions in the forked environment and then provide public RPC endpoint and explorer to use this network state as a starting point in other apps
- Typically, spell teams will create a new testnet for every upcoming protocol update (spell), for example: [testnet created for the 2025-05-29 spell](https://dashboard.tenderly.co/explorer/vnet/21b57903-83cb-4d36-9a5e-890660040e96/transactions)
- [Core Spell coordination schedule](https://github.com/makerdao/pe-checklists/blob/161895d52e144fec1e4d8cca52f1379ce63950cb/spell/spell-crafter-mainnet-workflow.md?plain=1#L7-L29)
- Star needs to provide their spells for review the latest on Monday Week 1 (although for the first few spells, we would need to agree on the deadlines case-by-case)
- Deployed Star spell address needs to be provided the latest to Governance Facilitators by Friday Week 1
- Core spell is crafted on Monday Week 2, handed over to the Governance Facilitators on Thursday Week 2. Then it’s voted in by the Sky holders and when it has enough votes, scheduled.
- Execution of the spell is possible only after the [delay](https://github.com/makerdao/ds-pause/blob/5e798dd96bfaac978cd9fe3c0259b486e8afd213/src/pause.sol#L82) ([set to 24 hours atm](https://etherscan.io/address/0xbe286431454714f511008713973d3b053a2d38f3#readContract#F2)). In case [officeHours](https://github.com/makerdao/dss-exec-lib/blob/69b658f35d8618272cd139dfc18c5713caf6b96b/src/DssAction.sol#L39-L44) are enabled, it will be executable only during specific hours (14-21 UTC on weekdays). Typically that means the Core spell together with the included Star spells is executed at 14:00 UTC on Monday Week 3