Woebegone
mellifluous;
You are on the right track the only thing left is that 20 is the final number, it can't go higher then that so getting a 20 means it's a perfect action.
So if two people both roll 20s who wins? The person with the highest base stat, basically it's a tie breaker.
By base stat, do you mean 82 = 82?
or Perception - Dex (this kind of a thing?)