{"action":"created","issue":{"url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/71","repository_url":"https://api.github.com/repos/MakerDAO/maker-otc","labels_url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/71/comments","events_url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/71/events","html_url":"https://github.com/MakerDAO/maker-otc/issues/71","id":151068678,"number":71,"title":"Explain LPC in math notation one-pager","user":{"login":"jorisbontje","id":620959,"avatar_url":"https://avatars.githubusercontent.com/u/620959?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisbontje","html_url":"https://github.com/jorisbontje","followers_url":"https://api.github.com/users/jorisbontje/followers","following_url":"https://api.github.com/users/jorisbontje/following{/other_user}","gists_url":"https://api.github.com/users/jorisbontje/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisbontje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisbontje/subscriptions","organizations_url":"https://api.github.com/users/jorisbontje/orgs","repos_url":"https://api.github.com/users/jorisbontje/repos","events_url":"https://api.github.com/users/jorisbontje/events{/privacy}","received_events_url":"https://api.github.com/users/jorisbontje/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MakerDAO/maker-otc/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"nmushegian","id":924397,"avatar_url":"https://avatars.githubusercontent.com/u/924397?v=3","gravatar_id":"","url":"https://api.github.com/users/nmushegian","html_url":"https://github.com/nmushegian","followers_url":"https://api.github.com/users/nmushegian/followers","following_url":"https://api.github.com/users/nmushegian/following{/other_user}","gists_url":"https://api.github.com/users/nmushegian/gists{/gist_id}","starred_url":"https://api.github.com/users/nmushegian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmushegian/subscriptions","organizations_url":"https://api.github.com/users/nmushegian/orgs","repos_url":"https://api.github.com/users/nmushegian/repos","events_url":"https://api.github.com/users/nmushegian/events{/privacy}","received_events_url":"https://api.github.com/users/nmushegian/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-26T08:00:12Z","updated_at":"2016-05-03T19:23:01Z","closed_at":null,"body":"Request from @NTPape: please provide a one page explanation with proper math notation where you explain how you want the LPC to work (especially the cost calculation part, slope and error).  "},"comment":{"url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/comments/216637572","html_url":"https://github.com/MakerDAO/maker-otc/issues/71#issuecomment-216637572","issue_url":"https://api.github.com/repos/MakerDAO/maker-otc/issues/71","id":216637572,"user":{"login":"nmushegian","id":924397,"avatar_url":"https://avatars.githubusercontent.com/u/924397?v=3","gravatar_id":"","url":"https://api.github.com/users/nmushegian","html_url":"https://github.com/nmushegian","followers_url":"https://api.github.com/users/nmushegian/followers","following_url":"https://api.github.com/users/nmushegian/following{/other_user}","gists_url":"https://api.github.com/users/nmushegian/gists{/gist_id}","starred_url":"https://api.github.com/users/nmushegian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmushegian/subscriptions","organizations_url":"https://api.github.com/users/nmushegian/orgs","repos_url":"https://api.github.com/users/nmushegian/repos","events_url":"https://api.github.com/users/nmushegian/events{/privacy}","received_events_url":"https://api.github.com/users/nmushegian/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T19:23:00Z","updated_at":"2016-05-03T19:23:00Z","body":"We can start with a simpler version, where one of the parameters is changed with a call to `reset` instead of varying over time.\r\n\r\nTo specify an LPC which sells ETH for dai, we owner defines a **dai price at ETH quantity** function, which tells you the instantaneous price of the last delta of ETH you'd be buying.\r\n\r\n`priceAt(quantity) = slope * qantity + (feed_price * error)`\r\n\r\nWe also have a notion of `eth_sold`:\r\n\r\n`buyCost(quantity) = integral_{eth_sold}^{quantity + eth_sold}   p(q) dq`\r\n\r\nIn this simple version, `eth_sold` is simply updated to be `quantity + eth_sold`, and is reset to 0 on `reset`.\r\n\r\nThe time-based component I want to add once a POC of this is working, is to have \"eth_sold\" decay back to 0 *so that the dai amount appears to be \"refilling\" at a constant rate* - this requires computing the inverse of the integral above. Actually, it's even worse, because this gives the market an explicit orientation, since one of the two assets is going to be the one that is stable (you always want to specify rate in terms of dai, regardless of which one you are selling)."}}