The UK had initially insisted that EU citizens pay international fees, which can cost about £44,000 for a science degree at a top British university. It eventually agreed to lower them to something closer to home fees of just under £10,000 a year.
Two annexes set out the per capita share for each member state. The same numbers are mirrored for British people travelling in the other direction.
Both sides opted for a per capita system so citizens from a small number of member states could not take the full 100,000 quota before others. The UK insisted on having a quota.
A similar formula will apply to Britons going the other way, according to the leaked draft text detailing how the quota would work.
The visa will cost £340 in the UK and €340 in the EU.
Sources confirm that the UK made a last-minute offer on 19 November to lower the fees to £12,000.
If there is not enough interest in any member state or the UK after a randomised ballot, that country is required to run two further lotteries to maximise take-up of the scheme.
British citizens wishing to travel to more than one EU state can do so after spending at least nine months in one country.
Ireland is not included. Irish and British citizens can live, work, travel and retire in each other's country with full social rights under common travel area arrangements.
Privately, the UK was worried the scheme would mean large numbers coming from poorer member states seeking jobs in the UK.