The purpose of this guide is to explain some things to look for while trading to make sure the other person isn't trying to trick you. I will not explain how to avoid getting sharked, or unknowingly selling something way below it's value to someone who does know its value. That has to do with learning how to price things and there are plenty of guides regarding that. I didn't see any guides specifically addressing safety in trading so here's mine.
How to Be Safe in Trading
Patience in All Things Trading Is Key
Don't ever let yourself get rushed. People in POE tend to be impatient, but don't let yourself become like them or let them rush you. Take the time you need to carefully examine everything in the trade window, including your own items. I once accidentally sold the wrong magic flask to a person, and they even accepted because they weren't paying attention either. Fortunately I realized a minute later, contacted them, and we swapped flasks. If you should accidentally give someone a much more valuable item when they wanted to buy a cheaper one, they may not swap and you'll be out of luck. Double check your own items! Fortunately this game has tons of names for items so it's easy to use the search bar of your tab to find the one they want to buy. Also be wary of people changing the sell amount you have listed by editing the copied message. Be sure to double check the price of the item you are selling before you remove it from your stash tab and that information becomes lost. A lot of people like to have separate stash tabs for commonly valued items like 1 alchemy or 1 chaos. Some people like to send a trade invite the second they enter your hideout, ignoring the fact you only just arrived back from mapping and need to get their items ready. Don't let them rush you! Usually it's just impatient people but be wary of rush scams hoping they can make you go too fast and not pay attention.
Ultimately, go slow and take your time until you get the hang of unchanging items. What I mean is chaos comes in a max stack of 10, so a column of 5 10 stacks of chaos is 50 chaos. After you've verified each stack is in fact 10 and indeed chaos, you can quickly do the math in your head by counting by column. No need to take forever counting individually. It gets tricky though when other currency has different stacks, like why does augmentation orbs come in stacks of 30?
What to Look for in Trades
Check your own items first
I like to check my items first, make sure I'm giving the right item(s), as explained previously. Few people will correct you if you accidentally give them a more valuable item. Make sure it's the right item and it is priced correctly.
Check their item(s)
If you are selling an item and they are buying it with currency make sure all of the currency stacks are the correct type, and make sure each stack is the proper amount. Then make sure there are enough stacks. It can be handy to have a calculator nearby if you're receiving a lot of some currency and the math in your head escapes you. I once was selling a bunch of some currency for 200 chaos. The guy put up only 100 chaos (2 columns of 5 rows so only 100 chaos) and then hits accept. Seeing this very clear deception I hit cancel and reconfirm in chat the price of 200 chaos. He then leaves the party and ignores me. Always count!
If you are buying an item then there are several things you must double check. Now it can get tedious to memorize the stats of the item you are wanting to buy, especially if the stats themselves don't matter to you but rather some unique effect of the item. It can be easy to gloss over the stats, see only the unique effect you want, and assume it's the correct item. This happened to me. I was looking to buy a 6 link unique body armor, talked the guy down in price, and being excited about a decent deal didn't look hard enough at the item. I didn't notice the stats were slightly off, but most importantly I didn't notice it wasn't a 6 link but rather a 4 and 2 link. So not only make sure the stats line up, but the links do too, most especially if you're buying a 6 link which are always valuable. If you're buying something for the socket colors make sure they line up as well. Make sure all of it does.
Watch out for cancel scams
What some people may try is to trade and put up the correct item. After you've placed your currency and hit accept, they will then cancel the trade. Maybe even say sorry. They will then trade again and maybe put up a different but similar item, hoping you won't notice the switch. Check every single item in every instance of the trade as if it was the first time, because it is.
Don't accept items as barter that you didn't ask for
If you're selling an item for say 1 exalted, and a guy comes along saying "hey I'd like to buy your item will you accept my item? It's worth 1 exalted [or more]!" Then the guy is probably trying to scam you. Even if you look up the current value of the item and see he appears to be telling the truth, that it is worth what he claims, it is quite possible that he or a group of his bought up all the cheap ones then relisted them for higher than normal, just to try to artificially inflate the price. So what he claims and what appears to be worth 1 exalted might actually be worth half. So unless you are extremely familiar with what they are offering, refuse all attempts at bartering and accept only what you are asking for. But even being familiar isn't enough because the value of items changes between leagues. "Oh yea that item was indeed worth 1 exalted last league, and it looks to still be worth the same here, I'll take the deal" you could still be wrong!
Not everyone is a scammer
Some people do make mistakes, so cancel the trade and reconfirm the trade information and trade again. If they refuse to trade, leave the party, and ignore you then they were probably trying to scam you. Just put them on ignore ingame and via the website if you were buying.
Be Wary of Paying for or Selling Challenges
Some challenges or achievements are really hard. You might be tempted to pay someone for access to a challenge area, like a missing uber lab trial you need to unlock the uber lab. Or pay someone to do a challenge for you like beating the super hard Hall of the Grandmasters unique map. And many more examples. The problem is if you pay someone for one of these, they may just take your currency and walk away. Or if you're selling the service they may not pay you after. Figuring out how to work this out is tricky and I'm not aware of any right answer. I have seen someone advertising that they will beat HotG for you, you provide the map in your own atlas, and their payment is they keep the loot. This seems reasonable I don't see any way for you to get scammed unless they don't actually complete it for you and are just like "haha you wasted the map". Yea some people are like that. In any situation like this where you're paying for a challenge you're either taking a risk by paying first, or they are taking a risk by trusting you to pay them afterwards.
Don't Fall for the Obvious Scams
By now most people should be aware of the old scam of "trust me with your item for nothing, and I'll give you cash or another item later", but there's always someone new. If they aren't giving you the ingame item right then and there, then don't trade. Trading items for real world money or buying items with real world money is against the rules and will get you banned.
You might be thinking, what if the person is willing to go first in a trade of items between the current league and standard, as an example? He can't scam me if he's going first. This may be true, but it is also against the rules in this particular game to trade between a new league and standard. I don't understand all of the specifics, just don't be simple and don't do it at all. This however is a common tactic scammers use with an honest person. They will trust you with one of their items first in a trade like this, then at a later date ask for another trade but this time request that you go first. Since they trusted you the first time they want you to trust them this time. Don't fall for this scam. Some may even try to use friendship against you. In Team Fortress 2 I've heard of friends of years doing similar to one of their "friends", putting profit over a long friendship. Never give away or loan something you aren't willing to lose.
If you're totally new to this game follow the standard advice and don't trade anything until you get a better handle on the game and what things are worth, so you don't shark yourself. Save all your currency until you figure out what it's good for.
What to Do if You Get Scammed
Nothing you can do. GGG doesn't do anything about scammers, because you have to mouse over every item in the trade before hitting accept. This means it's your responsibility to make sure you are getting what you're supposed to. So if you get scammed don't bother crying about it on the forums. I would suggest writing a guide about how to be safe in trading but I beat you to it. You can share your experiences if you fell for a scam not covered here and I'll add it to the guide.
Why doesn't GGG do something about people who advertise one item, but put a much cheaper version in the trade for the same price as the more valuable one?
Because proving intent is very hard. I can't prove the guy who scammed me isn't a giant moron who "accidentally" put the wrong item up not knowing there was a difference. This is due to the ambiguous way trade listing works. You don't describe the item yourself, which means you could be ignorant of the specifics of the item. It also doesn't help that records of listings and trades aren't kept. Furthermore, these scammers almost always ignore you when questioned about the scam, so that you can't prove they have knowledge of the scam. Further still I suspect most of these scammers are using throwaway accounts so that if the unlikely happens and they get banned then it's no real loss to them and they can easily make another since the game is F2P.
So if you get scammed the only thing you can do is add that person to your ignore list on the trade site so you don't see their listings anymore and hopefully come out of it wiser but a little poorer.