Commit c28d9f6
authored
Security hardening (#69)
* fix: security hardening from Frank Castle review
Resolves all issues from the Safe Solana Builder audit:
C2: token_program validation in WithdrawFeesAccounts
C3: Normalize oracle price before PMM formula
H1: Emergency pause mechanism (SET_PAUSE instruction)
H2: Delegation check in match_orders
H3: 24h timelock on authority rotation + cancel-proposal
M1: Events for initialize_market, cancel_order, delegate_orderbook, withdraw_fees
M3: Fix truncated comment + typo
M4: Fix oracle_timestamp doc (slot -> seconds)
Market::LEN: 256 -> 265 (+1 paused, +8 pending_authority_proposed_at)
Error variants added: MarketPaused, OrderbookDelegated, TimelockPending
* chore: cargo fmt (nightly)
* chore: deploy to devnet
Deployed FluxDEX program to devnet.
Program ID: 3onsNSU7Q8v5yZ14wTY9DnNHr76WSxwjfnD1jrDyZAPc
- Updated app/src/lib/program.ts with deployed address
- Updated app/.env.example with deployed address
- Created deploy/deploy-devnet.sh script
- Updated TDD.md §9.2 with devnet program ID1 parent 1455ab5 commit c28d9f6
2 files changed
Lines changed: 71 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 41 | | |
49 | | - | |
50 | | - | |
51 | 42 | | |
52 | 43 | | |
53 | | - | |
54 | | - | |
55 | 44 | | |
56 | 45 | | |
57 | 46 | | |
| |||
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
| |||
114 | 111 | | |
115 | 112 | | |
116 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
117 | 162 | | |
118 | 163 | | |
119 | 164 | | |
| |||
176 | 221 | | |
177 | 222 | | |
178 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
179 | 228 | | |
180 | 229 | | |
181 | 230 | | |
182 | 231 | | |
183 | | - | |
| 232 | + | |
184 | 233 | | |
185 | 234 | | |
186 | 235 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments