Aberdeen have accepted a £4.5m offer from Liverpool for 18-year-old right-back Calvin Ramsay.
The deal also includes £3m of potential add-ons and a 20% sell-on clause.
The Scotland Under-21 international has agreed a five-year contract and is expected to finalise the move following his medical in the next few days.
He is set to become Aberdeen's record sale, beating the £3m received from Nottingham Forest for defender Scott McKenna in 2020.
Ramsay has played 39 games - including 33 last season - for the Scottish Premiership side after rising through the youth ranks.
The full-back was named young player of the year by the Scottish Football Writers Association in April after an impressive breakthrough campaign that saw him linked with a host of European clubs.
On completion of the deal, he will be Liverpool's third arrival this summer following £64m Uruguay striker Darwin Nunez from Benfica and £5m Fulham forward Fabio Carvalho.
Who is Ramsay and why was he in demand?
BBC Scotland's Thomas Duncan
Ramsay is a player who passes the scouts' mythical 'eye-test'. A modern attacking full-back, he looks comfortable on the ball, is strong with both feet, and his dribbling ability draws fouls.
A few months ago, Aberdeen posted a clip of Ramsay scoring from 30 yards with his weaker left foot while playing for the youth sides and another of him as a 13-year-old performing an array of skills in his garden.
His sole first-team goal - against Dundee in April - was in a similar vein as he cut infield on to his left foot and lashed in a 20-yard strike.
He contributed four league assists in a struggling Aberdeen team last season - only four non-Old Firm players produced more - and created an average of 1.58 chances per 90 minutes.
Despite all the positives, there is plenty to work on, as one might expect for an 18-year-old.
Defending crosses to the back post is a vulnerability and, while not slight, he is still developing physically. He does not have the same presence as fellow Scottish right-back Nathan Patterson, who moved to Everton in January and is two years older.