A few thoughts:
I increasingly have been thinking of an ocap as just a function reference, which could itself just be a wrapper or closure around another function. In this way, the ultimate caveat is just code.
Imagine if I have a function openTheDoor()
, and then if you were my dog walker, I might give you a reference to this function:
function () {
if (isWednesday()) {
openTheDoor()
}
}
Now that seems simple enough as pseudo-code, but what about when the closure includes a variable according to its scope? If I wanted to let you take five oranges from my orange dispenser, I might give you a function like:
function() {
let limit = 5
return function () {
if (limit-- > 0) { dispenseOrange() }
}
}()
The thing that strikes me about this is that it puts a burden of storing and running this code on the redeeming machine, and so there could be an attack where a delegated method holder composes very complex caveat code and partially redeems it, clogging up memory usage.
This relates very directly to the storage rent problems in Ethereum today.
I guess this implies that a redeeming machine needs to meter its computer usage, possibly with a gas model like Ethereum? Does anyone know of a JS or Jessie metering tool?
Also, kindof aside, but is related enough I’ll ask here: @tribble had mentioned how an english auction could be much more efficient than the current ethereum/bitcoin type transaction fee pricing model, could anyone link me to such an improved model?