$COMP Distribution Help

Hi, new to compound here.

Was wondering how do they calculate $COMP token distribution now that its a %APY of the USD amount borrowed or loan.

Do they take the % first in USD amount then translate the value to comp tokens? If so what price is it based on? Spot price at a specific time, or average price, etc etc etc…

Thanks