Advancing
LoadingContract
1EaGq2PtdsxhZicYsrMXcVMLXMdyqpbUNQJjfZBpump
Advancing
LoadingAssay Office
The attribution feed takes a list of positions and reports how much of the yield each one publishes is paid by people using the venue, how much by a token schedule, and how much by somebody on the losing side of a trade. What it will not do is fill in the parts it cannot measure. This page calls it from your browser so you can watch the request leave.
Every request below leaves your browser and goes straight to https://api.lodz.money. There is no server of ours in between, which means you do not have to take this page’s word for any of it.
Open the developer tools and watch it happen. Press F12, open the Network tab, then press one of the buttons below. Three things there are worth checking:
When the reads on a key run out the call answers 402 and your browser writes a line about it in the console. Nothing is broken when that happens: it is the meter doing the only thing a meter is for. What to do next is printed here when it does.
You do not need to hold $LODZ to try this. A key is issued free on request, with no wallet, no signature and no token, and it arrives with twenty-five reads on it. $LODZ is what you settle with when you want more than that.
A key is issued on the first press, or the one this browser already has is reused.
Pressing one sends it. The middle two are the reason this exists: one shows the feed covering less than it was given, and one shows it refusing to guess.
Both match the catalogue. Coverage is complete and the split covers the whole book.
curl -- Two positions we measure
curl -X POST https://api.lodz.money/adit/attribution \
-H 'Content-Type: application/json' \
-H 'X-Adit-Key: <your key>' \
-d '{"positions":[{"seam_id":"orca-cbbtc-usdc-lp","btc_amount":4},{"seam_id":"kamino-cbbtc-lend","btc_amount":6}]}'Ten bitcoin at a venue nobody here measures. Coverage falls to half, and the half that is missing is stated rather than filled in.
curl -- Add one we cannot measure
curl -X POST https://api.lodz.money/adit/attribution \
-H 'Content-Type: application/json' \
-H 'X-Adit-Key: <your key>' \
-d '{"positions":[{"seam_id":"orca-cbbtc-usdc-lp","btc_amount":4},{"seam_id":"kamino-cbbtc-lend","btc_amount":6},{"venue":"SomeVenueWeDoNotMeasure","asset":"cbBTC","btc_amount":10}]}'A seam id the catalogue does hold, sent as a venue. The answer names the field it should have been sent as and does not quietly fix it.
curl -- A value in the wrong field
curl -X POST https://api.lodz.money/adit/attribution \
-H 'Content-Type: application/json' \
-H 'X-Adit-Key: <your key>' \
-d '{"positions":[{"venue":"orca-cbbtc-usdc-lp","btc_amount":1}]}'A value that exists nowhere. Put beside the one above, the two get different answers -- which is the difference between not knowing and not being told properly.
curl -- Nothing we measure at all
curl -X POST https://api.lodz.money/adit/attribution \
-H 'Content-Type: application/json' \
-H 'X-Adit-Key: <your key>' \
-d '{"positions":[{"venue":"totally-made-up-venue-xyz","btc_amount":1}]}'A position is a seam id, or a venue name with an asset, and an amount. The field it goes in is chosen rather than guessed, which is what the third example above is about.
Seam ids the catalogue holds
Get a key
curl -X POST https://api.lodz.money/adit/key -H 'Content-Type: application/json' -d '{}'Send the book
curl -X POST https://api.lodz.money/adit/attribution \
-H 'Content-Type: application/json' \
-H 'X-Adit-Key: <your key>' \
-d '{"positions":[{"btc_amount":4,"seam_id":"orca-cbbtc-usdc-lp"},{"btc_amount":6,"seam_id":"kamino-cbbtc-lend"},{"btc_amount":10,"venue":"SomeVenueWeDoNotMeasure","asset":"cbBTC"}]}'