Yes everything must be legal, just like the legal roms we're all using to play this 🙂
Anyway if player A wants to sell something for a specific price and player B buys that for the price player A requested, then that's it. Irrespective of the original value of product the trade is legally binding.
If player A sells a shiny on GTL for 10k even though it's worth 1m+, then that is their choice as it is an item they own.
Player B who bought it simply made profit off a less informed player but this in no way counts as scamming. This is just ripping someone off, but still not a scam.
In another case if player B told player A that your shiny is worth 10k and I will buy it for 10k and player A decides to sell it for the offered price, then that is again not a scam as player A agreed to the price he was offered. Just the way it is each player's individual responsibility to go through the Code of Conduct, similarly if a player is misinformed about the economy and makes stupid trade selling his stuff for lower price, then that is purely their fault / choice.
However if you tell someone you will buy something for 1m but while trading only give 100k and they don't pay attention, that's a scam.
Or if you promise you will return the item to them after some time, but then proceed ahead to not do it, then that is again a scam. Basically in any scenario where there is a breach of promise from one player's end that would result in a scam.
But as long as the desired outcome is something what both parties agreed on at the time of trading, that does not amount to scam.
As for being banned for 'GTL Scam'.
The only reason for bans is when you've broke the COC (did RMT or accessed another player's account, etc) and probably to hide your trade trail, you are now using GTL to get the products you desire from the other account.
For example, via hack or RMT player B now has player A's account.
Now if B wants to transfer money, he lists a potion or some other cheap item for 1m or so and player B buys it.
Then player A lists his valuables for super cheap and player A buys those.
This is the only scenario I can think of where it would on front be a legal trade via GTL but is actually part of a greater scam.
Would recommend to verify it all with staff team either way.