<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Adam Frisby &#187; currency</title>
	<atom:link href="http://www.adamfrisby.com/blog/tag/currency/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adamfrisby.com/blog</link>
	<description>ZOMGWTFHAI</description>
	<lastBuildDate>Sat, 26 Dec 2009 07:02:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DTL-PayPal (or how you can transfer money in a virtual world without significant risk.)</title>
		<link>http://www.adamfrisby.com/blog/2009/10/dtl-paypal-or-how-you-can-transfer-money-in-a-virtual-world-without-significant-risk/</link>
		<comments>http://www.adamfrisby.com/blog/2009/10/dtl-paypal-or-how-you-can-transfer-money-in-a-virtual-world-without-significant-risk/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 12:32:24 +0000</pubDate>
		<dc:creator>Adam Frisby</dc:creator>
				<category><![CDATA[DeepThink]]></category>
		<category><![CDATA[OpenSim]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[hypergrid]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[osgrid]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://www.adamfrisby.com/blog/?p=473</guid>
		<description><![CDATA[WARNING:
What is being described below is dealing in real currency &#8211; you owe it to yourself if you plan to use this, to understand how it works, and perform your own risk assessment. The module is completely unsupported and unwarrantied. Use it at your own risk.

Suppose you are a user of one of the Open [...]]]></description>
			<content:encoded><![CDATA[<h3><span style="color: #ff0000;">WARNING:</span></h3>
<p>What is being described below is dealing in real currency &#8211; you owe it to yourself if you plan to use this, to understand how it works, and perform your own risk assessment. The module is completely unsupported and unwarrantied. Use it at your own risk.</p>
<p><a href="http://www.adamfrisby.com/blog/wp-content/uploads/paypal-example.png"><img class="alignnone size-thumbnail wp-image-493" title="PayPal Demonstration - Paying US$0.50 into an object." src="http://www.adamfrisby.com/blog/wp-content/uploads/paypal-example-535x500.png" alt="PayPal Demonstration - Paying US$0.50 into an object." width="535" height="500" /></a></p>
<p>Suppose you are a user of one of the Open Grids or Hypergrid system &#8211; and you want to purchase an item, pay into an object, or otherwise transact business where a real currency transfer occurs somewhere down the line. Up until now, in all environments you are reliant on trusting a third party to act as a middleman, providing some currency-equivilent (such as say V$, L$ or whatever.).</p>
<p>The problems with this scenario is that that currency is at best backed by a single corporate entity (and even then they may not choose to &#8216;back&#8217; it at all) &#8211; leaving you exposed in the event something goes wrong. This is compounded by the general trading size of these operators &#8211; tending to be sole-traders or small-business; the best scenario is one where neither the user nor the merchant needs to rely on a third party beyond the credit card processor.</p>
<p>Which is where DTL-PayPal comes in, this is a free (3-Clause BSD), open source module we&#8217;ve developed to solve this explicit problem. It uses PayPal as the backend for the transaction, and prices inworld goods in US cents. You pay me, OS$100 &#8211; and you get a bill for US$1.00 from PayPal. Every transaction needs to be confirmed by you with PayPal thus adding security into the system; in addition you don&#8217;t need to carry existing balances of &#8216;currency&#8217; in order to buy items &#8211; each item can be bought individually with a seperate transaction on your Credit Card for each purchase.</p>
<p>The transaction is a 2 step process for the user &#8211; which is illustrated in the diagram below. Step one, you &#8216;negotiate&#8217; the payment size &#8212; this is basically filling out the payment or &#8216;buy&#8217; dialog that the vendor or merchant has setup already. Step two is you will be asked to visit a special webpage (which links to one at PayPal) which sets up and pays the transaction. From a users perspective you need to do nothing more.</p>
<p><a href="http://www.adamfrisby.com/blog/wp-content/uploads/pp_paymentprocessing.png"><img class="alignnone size-full wp-image-474" title="Payment Processing Overview" src="http://www.adamfrisby.com/blog/wp-content/uploads/pp_paymentprocessing.png" alt="Payment Processing Overview" width="666" height="317" /></a></p>
<p>Steps 3 and 4 occur when PayPal has confirmed the transaction for you &#8211; once the payment is confirmed (usually within 10 seconds), PayPal notifies the module, which in turn completes the transaction, finally PayPal deposits the balance in the vendors account for immediate use.</p>
<p>Obviously the problems with inventory server issues, vendor malfunctions, etc still exist &#8211; but to a customer PayPal does allow you to dispute charges on non-delivery grounds (however beware doing this to scam the system &#8211; the merchant gets a chance at rebuttal and it can be a complicated process)</p>
<p>From a vendor perspective &#8211; the main drawback to this solution is cost, PayPal will charge you roughly $0.28 plus 2.2% for a standard account in order to process the transaction. On tiny transactions (such as one for $0.50, fee would be $0.31) this can add up to a significant portion of the transaction. For users using this exclusively, I highly recommend using a PayPal <a href="https://www.paypal.com/IntegrationCenter/ic_micropayments.html">MicroTransactions account</a> which has much lower fees (but certain additional terms &amp; conditions).</p>
<p>So, where can I get the code for this? It&#8217;s on my personal GitHub account (along with a few of my other goodies) &#8211; <a href="http://github.com/AdamFrisby/DTL-PayPal">http://github.com/AdamFrisby/DTL-PayPal</a> &#8211; I will add some further notes, first this module is currently somewhat hard coded to present a warning to the user about it&#8217;s experimental nature, remove this at your own risk. Second &#8211; OpenSim is still alpha software, you may run into other issues, so be prepared to handle them if you want to accept payments from users in it. This software has only been tested on the PayPal sandbox so far (and I recommend you do the same), however should work with the live version fine.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamfrisby.com/blog/2009/10/dtl-paypal-or-how-you-can-transfer-money-in-a-virtual-world-without-significant-risk/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Securing Currency Exchange in an Open Environment</title>
		<link>http://www.adamfrisby.com/blog/2009/04/securing-currency-exchange-in-an-open-environment/</link>
		<comments>http://www.adamfrisby.com/blog/2009/04/securing-currency-exchange-in-an-open-environment/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 09:40:15 +0000</pubDate>
		<dc:creator>Adam Frisby</dc:creator>
				<category><![CDATA[DeepThink]]></category>
		<category><![CDATA[OpenSim]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[money]]></category>

		<guid isPermaLink="false">http://www.adamfrisby.com/blog/?p=147</guid>
		<description><![CDATA[As some of you may or may not be aware, earlier in the year someone [see bottom of post] contracted us to develop a secured currency infrastructure for a &#8216;hypergrid-aware&#8217; environment. Meaning, something that will work even when you cannot guaruntee the simulators (or their operators) themselves are trustworthy. Within this infrastructure we only have [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may or may not be aware, earlier in the year someone [<em>see bottom of post</em>] contracted us to develop a secured currency infrastructure for a &#8216;hypergrid-aware&#8217; environment. Meaning, something that will work even when you cannot guaruntee the simulators (or their operators) themselves are trustworthy. Within this infrastructure we only have two trusted entities &#8211; the user, and the &#8220;bank&#8221; which holds their funds.</p>
<p>The flexibility of this design allows us to setup currency systems that could work on a completely user-supported environment like OSGrid, rather than relying on a &#8220;walled garden&#8221; ala Second Life(R). It also could be used for multiple grids simultaneously &#8211; that is, several independent grids agree to utilize a single &#8220;bank&#8221;, and are then capable of grid to grid user transactions (most likely supported over a hypergrid link).</p>
<h3>How does it work?</h3>
<p>The basic method of operation is fairly simple &#8211; in both cases, the user attempts to make a payment from within the viewer (such as to another avatar, into a vendor, etc). Where the HG version differs is, it then sends the user to a website operated by the &#8220;bank&#8221; to confirm the action. The user is authenticated against the bank (via a password or other login), and is presented with the transaction details (amount, who to, etc). If the user is happy with the transaction, they approve it &#8211; and it continues to process on the server like any other normal transaction. If the user denies the transaction, then it reverses itself as if it had never been requested.</p>
<h3>The basic process</h3>
<p>If you examine the module we ship by default with OpenSim, the &#8220;SampleMoneyModule&#8221; &#8211; it is fairly straight forward when operating in a grid environment. When you make a payment in the region <strong>(1)</strong>, the simulator can check and process the payment via the money server <strong>(2)</strong>, then finally confirm the transaction with the seller <strong>(3)</strong>. The biggest limitation here is that it requires trust on most parties involved &#8211; for instance if the simulator went &#8216;rogue&#8217;, then it would be possible to just say you made a payment, without your involvement.</p>
<p><img class="aligncenter size-full wp-image-149" title="Sample Currency Server Operation" src="http://www.adamfrisby.com/blog/wp-content/uploads/currency_sample.png" alt="Sample Currency Server Operation" width="608" height="321" /></p>
<p>This is essential for some types of payments (eg, llGiveMoney), but completely unpractical in an open environment. Eg &#8211; it allows for the &#8216;credit card fraud&#8217; situation, whereby if the seller knows you exist and your account number, then it is entirely possible to debit from it without your permission. Credit cards are badly designed on this respect &#8211; there is no &#8216;confirmation of identity&#8217; with the bank required. (<a href="http://en.wikipedia.org/wiki/3-D_Secure">Something there has been some work into fixing</a>.)</p>
<p>By comparison, the DTL currency processor is a lot more complicated &#8211; it requires some &#8220;handshaking&#8221; between the parties before the transaction can proceed. To the user this is transparent mostly, however on the backend there is a more complicated web of data flow, of which there are six major steps.</p>
<p><img class="aligncenter size-full wp-image-148" title="DTL Currency Processing" src="http://www.adamfrisby.com/blog/wp-content/uploads/currency_dtl.png" alt="DTL Currency Processing" width="608" height="346" /></p>
<p>The first step is the negotiation step &#8211; in this step, the user initiates a payment to an object or user (requests a money transfer). The simulator will contact its registered money server and ask for a link that the user can confirm their intent with <strong>(1)</strong>. The user is then given that link via an IM (we&#8217;ve also made it possible to configure so that you can get that link sent to you via email from the moneyserver directly.).</p>
<p>The user should at this point (for anti-&#8221;phishing&#8221; purposes) check that the link they are given is sent from the money server (we strongly recommend using a recognizable domain with an SSL certificate). This link acts as a verification of intent &#8211; the money server will present the user with the details of the transaction, and ask them to login to confirm the transaction <strong>(2)</strong>. Eg, see the picture below:</p>
<p><img class="aligncenter size-full wp-image-150" title="Currency Confirmation Form" src="http://www.adamfrisby.com/blog/wp-content/uploads/currency_approveform.png" alt="Currency Confirmation Form" width="470" height="326" />If the user aborts the transaction, then it simply stops all further processing &#8211; only a request for payment was made, and no funds have exchanged hands. However, if the user approves the transaction, then the money server notifies the simulator that the transaction was approved <strong>(3)</strong>, this acts in a similar way to PayPal Instant Payment Notification. At this point, the simulator can execute <em>money()</em> events in scripts, approve an object purchase, or send notifications to buyer <strong>(5)</strong> or seller <strong>(6)</strong> that their balance has been updated. The money server also updates the sellers account balance with the new funds <strong>(4)</strong>.</p>
<p>To the end user, the exchange can be shown in the following screenshot (the user webpage is a slightly old version now, also ignore the spelling mistake.)</p>
<p><img class="aligncenter size-full wp-image-151" title="&quot;In Action&quot; Screenshot" src="http://www.adamfrisby.com/blog/wp-content/uploads/currency_inaction.png" alt="&quot;In Action&quot; Screenshot" width="663" height="388" /></p>
<h3>Disclaimer of liability</h3>
<p>The above does not guaruntee security &#8211; we&#8217;ve made as many steps as possible to make this usable in a public environment, <strong>however OpenSim is alpha software</strong>, and this code does not provide any kind of guaruntee of mechantability or usefulness. If you are planning on starting a virtual bank with &#8220;Real Money Trade&#8221; allowed, then you need to do a lot more work into fraud prevention and audits of this code before thinking about using it. <strong>You use this strictly at your own risk.</strong></p>
<h3>Final notes</h3>
<p>This is not the final version yet, we still have work to do in that department, however you can access a alpha version on the OpenSimulator forge (Please note, there are no NAnt build files for this project yet &#8211; it&#8217;s on the TODO list, but Linux users will need to generate them if you want to use this, or get a Visual Studio user to compile for you.)</p>
<p><a href="http://forge.opensimulator.org/gf/project/currency/">http://forge.opensimulator.org/gf/project/currency/</a></p>
<h3>Credits</h3>
<p>This was developed with funds provided by Michael Huntington &#8211; credit to him for sponsoring this project.</p>
<p>Development was done by DeepThink&#8217;s Shanghai development team (Korey Wan, Leon Zhu and Jed Zhu [in our plush SH office shared with SineWave]), planning was done by Korey and Leon, with the master architectural design done by yours truly. We&#8217;re planning on finishing this project up this week, once we have done so &#8211; we will be moving onto a Groups implementation, also sponsored by Michael Huntington.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamfrisby.com/blog/2009/04/securing-currency-exchange-in-an-open-environment/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
