RAW I believe you can scribe spells based off of spell slots, not spells known. Writing spells in your Spellbook is gated by spell preparation per PHB.
Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a spell level you can prepare and if you can spare the time to decipher and copy it.
Spell preparation is gated by available spell slots per PHB.
You prepare the list of wizard spells that are available for you to cast. To do so, choose a number of wizard spells from your spellbook equal to your Intelligence modifier + your wizard level (minimum of one spell). The spells must be of a level for which you have spell slots.
By the transitive property, if you can scribe any spell you can prepare and you can prepare any spell for which you have spell slots then you can scribe any spell for which you have slots.